Question for any coding wizards:
Is there a way for function to check and verify whether an imported lab document with the spirometry values has been signed or not on the document list? Is this possible?
I am working on a custom VFE spirometry form used in a clinical visit that captures the NDD spirometer data as observation terms from the flowsheet after the Lab Report: FVL has been signed and the data has been pushed to the flow sheet. When the import the NDD data button is pushed, I first want to have a useryesno() or userok() stating whether the Document - Lab Report: FVL has or has not been signed before proceeding with importing the spirometry obsterms into the form.
Because the document Lab Report: FVL is created after the chart visit has been opened I already using functions to pull an observation term from the flow sheet into the spirometry form loopimg through all spirometry obsterms need for the form.
obsdate = find("_MelCurObs","ObsDate","HDID",str(HDIDnbr)
obsval = find("_MelCurObs","ObsValue","HDID",str(HDIDnbr))
However, I want a way to verify the flow volume loop data in the Document list of Lab report: FVL has been signed before proceeding with the import, otherwise the flow sheet will not have these values.
Any suggestions?
Thank you
Add one more key to your find statement: 'CHANGE'
obsval = find(“_MelCurObs”,”CHANGE”,”HDID”,str(HDIDnbr))
If the value is not 1 or 2, then the value is unsigned or removed (filed in error).
Hope this helps.
Thank you Lee,
This code addition worked as indication. I appreciate your answer to my question.
Jay
Lee,
Can a similar find function be use to extract the OBSTAGNOW value . I am successfully extracting newer OBSNOW values and datetimes for a series of spirometry value sent to CPS as a signed document from the NDD spirometry API after the initial chart visit was opened using the
obsval = find(“_MelCurObs”,”CHANGE”,”HDID”,str(HDIDnbr)) and
obsdate = find(“_MelCurObs”,”ObsDate”,”HDID”,str(HDIDnbr)
and with screening that the obsval / obsdate are from the more recent signed document than the open chart document using your suggested
obsval = find(“_MelCurObs”,”CHANGE”,”HDID”,str(HDIDnbr)) (Thanks Again)
My new question: Is there a similar find function to capture the obstag value? I tried
obstag = find(“_MelCurObs”,”Abnormal”,”HDID”,str(HDIDnbr)) but the function always returned an empty (NULL) value. regardless of whether the OBSTAGNOW in the signed Document had a value such as OBSTAGNOW() value such as "low".
Really appreciate your assistance and expertise, thank you
Jay