I have been messing around with a CDS in EDM where we want a screen for
documenting data on a patient at or after they are departed. The screen
is for capturing data on each patient (i.e. TAT's, etc) to be sent to
the province for funding, etc. There are a large number of fields
and most of then can be pre-populated from EDM data or previous screens
(i.e. Triage) and it is then the clerks duty to review and if anything
is missing, they can manually populate the field at that time.
I have been able to pre-populate the fields by jumping to a macro using
an attribute and looping through each query. It works great....to a
point! When the CDS opens, it immediately populates the fields
correctly and looks very impressive, but if I simply file (with the
cursor still only being in the first field), none of that data
pre-populating all of those fields ever actually gets filed. The only
way they will be filed is if I actually move the cursor through each of
the fields first, then when I F12 to file, the data is actually filed
and retrievable.
Example of the looping code is below. Anyone know how I can "FILE" each
of the fields at F12 without having to first enter through each of the
fields :
DO{+/G.MSE.CDS[R]^R DO{+(/G.MSE.CDS[R,S],DATA)^S 1,
IF{DATA|1="ADMERNI2D" P(R,S,/EDMAMBDATE^/[ANS%0,"ADMERNI2D"]|0)^#;
DATA|1="ADMERNI2T" P(R,S,/EDMAMBTIME^/[ANS%0,"ADMERNI2T"]|0)^#;
DATA|1="ADMERNI4D"
P(R,S,/EDMAMBTRDATE^/[ANS%0,"ADMERNI4D"]|0)^#;
DATA|1="ADMERNI4T"
P(R,S,/EDMAMBTRTIME^/[ANS%0,"ADMERNI4T"]|0)^#;
DATA|1="ADMERNI6D" P(R,S,/EDMREGDATE^/[ANS%0,"ADMERNI6D"]|0)^#;
DATA|1="ADMERNI6T" P(R,S,/EDMREGTIME^/[ANS%0,"ADMERNI6T"]|0)^#;
DATA|1="ADMERNI8D"
P(R,S,/EDMTRIAGEDATE^/[ANS%0,"ADMERNI8D"]|0)^#;
DATA|1="ADMERNI8T"
P(R,S,/EDMTRIAGETIME^/[ANS%0,"ADMERNI8T"]|0)^#;
DATA|1="ADMERNI8TL"
P(R,S,/EDMTRIAGELEV^/[ANS%0,"ADMERNI8TL"]|0)^#;
DATA|1="ADMERNI11D"
P(R,S,/EDMASSDATE^/[ANS%0,"ADMERNI11D"]|0)^#;
DATA|1="ADMERNI11T"
P(R,S,/EDMASSTIME^/[ANS%0,"ADMERNI11T"]|0)^#;
DATA|1="ADMERNI15D"
P(R,S,/EDMDISPDATE^/[ANS%0,"ADMERNI15D"]|0)^#;
DATA|1="ADMERNI15T"
P(R,S,/EDMDISPTIME^/[ANS%0,"ADMERNI15T"]|0)^#;
DATA|1="ADMERNI15V"
P(R,S,/EDMDISPOSITION^/[ANS%0,"ADMERNI15V"]|0)^#;
DATA|1="ADMERNI18D"
P(R,S,/EDMLEFTDATE^/[ANS%0,"ADMERNI18D"]|0)^#;
DATA|1="ADMERNI18T"
P(R,S,/EDMLEFTTIME^/[ANS%0,"ADMERNI18D"]|0)^#;
DATA|1="ADMERNI27S"
P(R,S,/EDMSERVICE^/[ANS%0,"ADMERNI27S"]|0)^#;
DATA|1="ADMERNI20" P(R,S,/EDMHCN^/[ANS%0,"ADMERNI20"]|0)^#;
DATA|1="ADMERNI21" P(R,S,/EDMHCNPROV^/[ANS%0,"ADMERNI21"]|0)^#;
DATA|1="ADMERNI22" P(R,S,/EDMZIP^/[ANS%0,"ADMERNI22"]|0)^#;
DATA|1="ADMERNI23" P(R,S,/EDMRESCODE^/[ANS%0,"ADMERNI23"]|0)^#;
DATA|1="ADMERNI25" P(R,S,/EDMDOB^/[ANS%0,"ADMERNI25"]|0)^#;
DATA|1="ADMERNI37" P(R,S,/EDMAGE^/[ANS%0,"ADMERNI37"]|0)^#;
DATA|1="ADMERNI24" P(R,S,/EDMGENDER^/[ANS%0,"ADMERNI24"]|0)^#;
DATA|1="ADMERNI36" P(R,S,/EDMESTDOB^/[ANS%0,"ADMERNI36"]|0)^#;
DATA|1="ADMERNI26"
P(R,S,/EDM.IS.EST.DOB^/[ANS%0,"ADMERNI26"]|0)^#;
DATA|1="ADMERNI34" P(R,S,/EDMPAYCODE^/[ANS%0,"ADMERNI34"]|0)^#;
DATA|1="ADMERNI35"
P(R,S,/USER.MNEMONIC^/[ANS%0,"ADMERNI35"]|0)^#}}},
Thanks for any assistance,
__________________________________________
Working together for excellence
in healthcare!
David Chamberlain MLT ART
Clinical Applications Consultant
dchamb...@lakeridgehealth.on.ca
905-576-8711 x3347
====================================
Please do NOT send messages that ask "Please post to the list" or "I'd like to see your answers" or "Send that info to me, too" These are useless messages that just waste the email server's resources. Instead, email the original requester and ask that they send you or post the results of their question.
To UNSUBSCRIBE, go to http://MTUSers.net
for information.
You can locate the:
1) meditech-l archives
2) NPR/Magic/CS tips
3) job opportunities in the Meditech community
http://mtusers.net
If you need help or advice on how to use the meditech-l, email lo...@MTUsers.com or ju...@MTUsers.net. Both of these people help manage the meditech-l, so they are your best resource.
In your macro, in addition to printing the values to screen, I believe the problem is you need to populate /[RESP,QUERY] with each value in order to file the data. The filer pulls the values from /RESP, and right now, /RESP is only getting populated as you enter/tab through your fields, which is why the data files after you do this.
In your macro, you would add the following line for each query you want to default (assuming you want to grab the last non nil value from ccdqr):
"EDMAMBDATE"^ADM.PAT.ccdqr.query,@ADM.PAT.ccdqr.response^QRY1^/RESP["ADMERNI2D"]|0,
One caveat I learned working on this type of macro, you need to ensure that /RESP is setup immediately when your EDM screen is opened. In EDM, I believe this happens only if a) you have at least 1 demo recall query somewhere on your CDS or b) the EDM treatment/assessment that references this CDS has the Default Queries field set to "all" or "demo recall". If none of these exist when the screen is opened, /RESP will not be setup to store the values that are derived by your macro. It does sound like /RESP is setup immediately in your example, since the data is filing if you enter through the fields (if /RESP is not setup, the printed values would disappear from the screen when you enter thru the fields).
Hope this helps,
Jim Feen|ACIS CPD Project Leader
Management Information Systems
Southcoast Hospitals Group
508-910-3816
Pager: 508-391-0588
>>> "Chamberlain, David" <dchamb...@lakeridgehealth.on.ca> 2/9/2010 12:40 PM >>>
Hi folks,
Thanks for any assistance,
====================================
CONFIDENTIALITY NOTICE:
This e-mail and any files transmitted with it are confidential and may contain health information protected by law. Any unauthorized use or disclosure is strictly prohibited. If you are not the intended recipient, please notify the sender by return email, delete this email, and destroy any copies. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Southcoast. The recipient should check this e-mail and any attachments for the presence of viruses. Southcoast accepts no liability for any damage caused by any virus transmitted by this e-mail.
I think that you can do as James recommends but I have never done it that way. Instead, I use the /[ANS%0,"QUERY"]|0 as you have. However, the macro opens a new symbol table that will not know the value of ANS unless you pass it in the macro call.
Do you have ANS as one of the arguments in the macro call? If not, that may be all that's needed to resolve this.
Good luck,
Kenny Whiteside
>>> "James Feen" <Fe...@southcoast.org> 2/9/2010 2:09 PM >>>
David,
"EDMAMBDATE"^ADM.PAT.ccdqr.query,@ADM.PAT.ccdqr.response^QRY1^/RESP["ADMERNI2D"]|0,
Hope this helps,
Thanks for any assistance,
====================================
====================================
--
This message has been scanned for viruses and
dangerous content, and is
believed to be clean.
Catawba Valley Medical Center
810 Fairgrove Church Rd
Hickory NC 28602
828-326-3000
"This electronic message may contain information that is confidential and/or legally privileged. It is intended only for the use of the individual(s) and/or entity named as recipients in the message. Please notify the sender immediately and delete the material from your computer if you have received this message in error. Do not deliver, distribute, or copy this message, and do not disclose its contents or take any action as a result of the information it contains. Thank you."
Brilliant call!!!! Totally forgot that ANS would be unknown in the
macro. As you suggested, simply passing it into the macro as an
argument and reassigning that argument to ANS within the macro totally
solved the issue.
Many thanks!
David.
__________________________________________
Working together for excellence
in healthcare!
David Chamberlain MLT ART
Clinical Applications Consultant
dchamb...@lakeridgehealth.on.ca
905-576-8711 x3347
Jim Feen|ACIS CPD Project Leader
Management Information Systems
Southcoast Hospitals Group
508-910-3816
Pager: 508-391-0588
>>> "Kenny Whiteside" <kwhit...@catawbavalleymc.org> 2/9/2010 3:12 PM >>>