This might be of interest of others who are using WV Pharmacy.
If you put a Message on a Drug in the Drug file, the message shows up in CPRS when you order the drug, but it does not show up in pharmacy when you finish the drug, even though the field "Drug Message" prints out on the list manager form. (Patient is Mona Lisa, not resembling any but Da Vinci's portrait).
Pending OP Orders (ROUTINE) 6/4/10@20:31:46 Page: 1 of 2
LISA,MONA DA
PID: 524-11-1137P Ht(cm): _______ (______)
DOB: 11/11/37 (72) Wt(kg): _______ (______)
*(1) Orderable Item: DEXAMETHASONE TAB
(2) Drug: DEXAMETHASONE 0.5MG
Drug Message:
I fixed it so that it would show the message. Here's an example of what it would show when it is fixed (Patient is Felix the Cat, apparently a popular cartoon character)
Pending OP Orders (ROUTINE) 6/4/10@20:47:38 Page: 1 of 2
THE CAT,FELIX
PID: Ht(cm): _______ (______)
DOB: 23/11/88 (21) Wt(kg): _______ (______)
*(1) Orderable Item: AZATHIOPRINE TAB
(2) Drug: AZATHIOPRINE 50MG TAB,ORAL
Drug Message: SAM'S TEST MESSAGE
I traced down the code to PSOORNEW.m:
DRGMSG ;
;Begin WorldVistA change; PSO*7*208; 08/06/2009
;F SG=1:1:$L($P(^PSDRUG(PSODRUG("IEN"),0),"^",10)) S:$L(^TMP("PSOPO",$J, + IEN,0)_" "_$P($P(^PSDRUG(PSODRUG("IEN"),0),"^",10)," ",SG))>80 + IEN=IEN+1,$P(^TMP("PSOPO",$J,IEN,0)," ",20)=" " D
;.S:$P($P(^PSDRUG(PSODRUG("IEN"),0),"^",10)," ",SG)'="" ^TMP("PSOPO",$J, + IEN,0)=$G(^TMP("PSOPO",$J,IEN,0))_" "_$P($P(^PSDRUG(PSODRUG("IEN"),0), + "^",10)," ",SG)
;K SG
D DRGMSG^PSOORNW2 Q ;vfam
In PSOORNW2:
;WVEHR ;begin p208
;
DRGMSG ;From PSOORNEW
F SG=1:1:$L($P(^PSDRUG(PSODRUG("IEN"),0),"^",10)) S:$L(^TMP("PSOPO",$J, + IEN,0)_" "_$P($P(^PSDRUG(PSODRUG("IEN"),0),"^",10)," ",SG))>80 + IEN=IEN+1,$P(^TMP("PSOPO",$J,IEN,0)," ",20)=" " D
.S:$P($P(^PSDRUG(PSODRUG("IEN"),0),"^",10)," ",SG)'="" ^TMP("PSOPO",$J, + IEN,0)=$G(^TMP("PSOPO",$J,IEN,0))_" "_$P($P(^PSDRUG(PSODRUG("IEN"),0), + "^",10),"",SG)
K SG Q
;
;WVEHR ;end p208
Corrected:
;WVEHR ;begin p208
;
DRGMSG ;From PSOORNEW
F SG=1:1:$L($P(^PSDRUG(PSODRUG("IEN"),0),"^",10)) S:$L(^TMP("PSOPO",$J, + IEN,0)_" "_$P($P(^PSDRUG(PSODRUG("IEN"),0),"^",10)," ",SG))>80 + IEN=IEN+1,$P(^TMP("PSOPO",$J,IEN,0)," ",20)=" " D
.S:$P($P(^PSDRUG(PSODRUG("IEN"),0),"^",10)," ",SG)'="" ^TMP("PSOPO",$J, + IEN,0)=$G(^TMP("PSOPO",$J,IEN,0))_" "_$P($P(^PSDRUG(PSODRUG("IEN"),0), + "^",10)," ",SG)
K SG Q
;
;WVEHR ;end p208
This is (I think) Mark Admunson's work; I have no clue why you would make this change: In essence, the only difference between the old and the new code is that the new WV code $Pieces on "", which returns an empty string. Why???? We want that to show on the Pharmacist screen. So to fix this, you replace the "" (in red above) with " ".
Sam