Changeset 324 for ccr/trunk/p
- Timestamp:
- Jan 13, 2009, 7:36:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/CCRMEDS6.m
r323 r324 213 213 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDDURATIONUNIT")=DURTXT 214 214 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDPRNFLAG")=SIGDATA(4)["PRN" 215 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDPROBLEMOBJECTID")="" 215 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDPROBLEMOBJECTID")="" ; when avail 216 216 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDPROBLEMTYPETXT")="" 217 217 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDPROBLEMDESCRIPTION")="" … … 229 229 . ; --- END OF DIRECTIONS --- 230 230 . ; 231 . ; ^PSRX(22,"INS1",1,0)="FOR BLOOD PRESSURE" 232 . S @MAP@("MEDPTINSTRUCTIONS")=$G(^PSRX(RXIEN,"INS1",1,0)) 233 . ; ^PSRX(22,"PRC",1,0)="Pharmacist: you must obey my command" 234 . S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")=$G(^PSRX(RXIEN,"PRC",1,0)) 235 . S @MAP@("MEDRFNO")=MED(9) 231 . ; Med instructions is a WP field, thus the acrobatics 232 . ; Notice buffer overflow protection set at 10,000 chars 233 . ; -- 1. Med Patient Instructions 234 . N MEDPTIN1 S MEDPTIN1=$$GET1^DIQ(52,RXIEN,115,,"MEDPTIN1") 235 . N MEDPTIN2,J S (MEDPTIN2,J)="" 236 . F S J=$O(@MEDPTIN1@(J)) Q:J="" Q:$L(MEDPTIN2)>10000 S MEDPTIN2=MEDPTIN2_@MEDPTIN1@(J)_" " 237 . S @MAP@("MEDPTINSTRUCTIONS")=MEDPTIN2 238 . K J 239 . ; -- 2. Med Provider Instructions 240 . N MEDPVIN1 S MEDPVIN1=$$GET1^DIQ(52,RXIEN,39,,"MEDPVIN1") 241 . N MEDPVIN2,J S (MEDPVIN2,J)="" 242 . F S J=$O(@MEDPVIN1@(J)) Q:J="" Q:$L(MEDPVIN2)>10000 S MEDPVIN2=MEDPVIN2_@MEDPVIN1@(J)_" " 243 . S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")=MEDPVIN2 244 . ; 245 . ; Remaining refills 246 . S @MAP@("MEDRFNO")=$P(MEDS(MEDCNT),U,6) 247 . ; ------ END OF MAPPING 248 . ; 249 . ; ------ BEGIN XML INSERTION 236 250 . N RESULT S RESULT=$NA(^TMP("GPLCCR",$J,"MAPPED")) 237 251 . K @RESULT … … 249 263 . . . D MAP^GPLXPATH(DIRXML1,MDZNA,DIRXML2) 250 264 . . . D INSERT^GPLXPATH(RESULT,DIRXML2,"//Medications/Medication") 251 . D: RXIEN=1 CP^GPLXPATH(RESULT,OUTXML) ; First one is a copy252 . D: RXIEN>1 INSINNER^GPLXPATH(OUTXML,RESULT) ; AFTER THE FIRST, INSERT INNER XML265 . D:MEDCNT=1 CP^GPLXPATH(RESULT,OUTXML) ; First one is a copy 266 . D:MEDCNT>1 INSINNER^GPLXPATH(OUTXML,RESULT) ; AFTER THE FIRST, INSERT INNER XML 253 267 N MEDTMP,MEDI 254 268 D MISSING^GPLXPATH(OUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
Note:
See TracChangeset
for help on using the changeset viewer.