Patients, whose age is less than 18 when diagnosed, require parental consent to
undergo treatment. In these cases the field, pconsent, will be flagged, y. Once their
18th birthday has arrived this is no longer necessary.
Give a list of patients currently admitted who are 18 or over and whose record states
they require parental consent for treatment. When this function is executed the system
should update the parental consent flag to n.
I've got the qry which returns ALL patients with pconsent set to 'y', how can i see only those who are 18 or over and then update it for pconsent = 'n'?
SELECT admision.indate , patient.nhsno, pname, dob, diagnos.adno, diagnos.pconsen t
FROM admision, patient, diagnos
WHERE admision.adno=d iagnos.adno And patient.nhsno=a dmision.nhsno And currentdate Between admision.indate And admision.outdat e And diagnos.pconsen t="y";
undergo treatment. In these cases the field, pconsent, will be flagged, y. Once their
18th birthday has arrived this is no longer necessary.
Give a list of patients currently admitted who are 18 or over and whose record states
they require parental consent for treatment. When this function is executed the system
should update the parental consent flag to n.
I've got the qry which returns ALL patients with pconsent set to 'y', how can i see only those who are 18 or over and then update it for pconsent = 'n'?
SELECT admision.indate , patient.nhsno, pname, dob, diagnos.adno, diagnos.pconsen t
FROM admision, patient, diagnos
WHERE admision.adno=d iagnos.adno And patient.nhsno=a dmision.nhsno And currentdate Between admision.indate And admision.outdat e And diagnos.pconsen t="y";
Comment