text: First Minister Nicola Sturgeon will confirm the plans when she addresses the Royal College of Nursing (RCN) congress in Glasgow on Monday.
  She will tell delegates that discussions will begin over the summer with the aim of putting health staffing on a statutory basis.
  The RCN welcomed the promise but said it would only work if backed up with funding for extra staff.
  The first minister will tell the congress that the planned legislation will reinforce patient safety.
  She is expected to say: "Since this government came to power in 2007 there are more than 2,300 extra qualified nurses and midwives working in our NHS.
  "In addition to having record staffing levels, Scotland has led the UK in the development of mandatory nursing and midwifery workload and workforce planning tools that help health boards to plan for the number of staff they require.
  "By using these tools, health boards can make sure they have the right number of staff to provide the best possible care for patients in a variety of specialities.
  "To build on our record, we will enshrine these planning tools in law and examine what other areas of the workforce would benefit from having similar tools developed, which will further strengthen our commitment to patient safety in our wards."
  Chief nursing officer Prof Fiona McQueen added: "The link between safe and sustainable staffing levels - including qualified nurse numbers - and high quality care is well established.
  "It's vital to have the right number of staff in place, with the right skills. We already have building blocks in place in Scotland to achieve this, including evidence-based planning tools and enhanced training."
  Theresa Fyffe, president of RCN Scotland, said the statutory staffing requirement would be welcome if it was backed up with funding.
  She said: "The challenge is going to be the financial pressures we are under right now.
  "So having mandated staffing levels will be good but if there isn't the finance to pay for the staffing, you end with the pressure being felt back at the (health) boards and it doesn't really resolve the problem."
  Scottish Labour said it was a "worthwhile commitment" that it would support but also emphasised the need for funding.
  The party's health spokesman, Anas Sarwar, said: "Just one third of our hard working and dedicated NHS staff think they have enough colleagues to do their job properly.
  "Doctors, nurses, auxiliaries and others are under enormous pressure and are increasingly being asked to do more with less."
  He added: "Given that NHS Greater Glasgow & Clyde alone faces making cuts of Â£69m, the SNP government must ensure this isn't just an attempt to get a good headline.
  "We need ministers to take decisions for the long term, so we have a health service fit for the future, delivering for the public and respecting its staff."
target: Minimum staffing levels in Scotland's NHS are to be enshrined in law.