- Timestamp:
- Jan 19, 2009, 4:20:15 PM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/CCRMEDS6.m
r332 r339 48 48 ; If MEDS1 is not defined, then no meds 49 49 I '$D(MEDS1) S @OUTXML@(0)=0 QUIT 50 I DEBUG ZWR MEDS1 50 I DEBUG ZWR MEDS1,MINXML 51 51 N MEDCNT S MEDCNT=0 ; Med Count 52 52 ; The next line is a super line. It goes through the array return … … 204 204 . . ; That's the same thing I am going to do. 205 205 . . ; Search B index of 51.1 (Admin Schedule) with first abbr of schedule 206 . . N SCHEDIEN =$$FIND1^DIC(51.1,,,$P(SIGDATA(7)," "),"B")206 . . N SCHEDIEN S SCHEDIEN=$$FIND1^DIC(51.1,,,$P(SIGDATA(7)," "),"B") 207 207 . . N INTERVAL S INTERVAL="" ; Default 208 . . S:SC EHDIEN INTERVAL=$$GET1^DIQ(51.1,SCHEDIEN,2)208 . . S:SCHEDIEN INTERVAL=$$GET1^DIQ(51.1,SCHEDIEN,2) 209 209 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDINTERVALVALUE")=INTERVAL 210 210 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDINTERVALUNIT")="Minute" … … 232 232 . . ; If there is another entry in the FMSIG array (i.e. another line 233 233 . . ; in the sig), set the direction count indicator. 234 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDDIRSEQ")="" ; Default 234 235 . . S:+$O(FMSIG(FMSIGNUM)) @MAP@("M","DIRECTIONS",DIRCNT,"MEDDIRSEQ")=DIRCNT 235 236 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDMULDIRMOD")=SIGDATA(5) … … 242 243 . N MEDPTIN1 S MEDPTIN1=$$GET1^DIQ(52,RXIEN,115,,"MEDPTIN1") 243 244 . N MEDPTIN2,J S (MEDPTIN2,J)="" 244 . F S J=$O(@MEDPTIN1@(J)) Q:J="" Q:$L(MEDPTIN2)>10000 S MEDPTIN2=MEDPTIN2_@MEDPTIN1@(J)_" "245 . I $L(MEDPTIN1) F S J=$O(@MEDPTIN1@(J)) Q:J="" Q:$L(MEDPTIN2)>10000 S MEDPTIN2=MEDPTIN2_@MEDPTIN1@(J)_" " 245 246 . S @MAP@("MEDPTINSTRUCTIONS")=MEDPTIN2 246 247 . K J … … 248 249 . N MEDPVIN1 S MEDPVIN1=$$GET1^DIQ(52,RXIEN,39,,"MEDPVIN1") 249 250 . N MEDPVIN2,J S (MEDPVIN2,J)="" 250 . F S J=$O(@MEDPVIN1@(J)) Q:J="" Q:$L(MEDPVIN2)>10000 S MEDPVIN2=MEDPVIN2_@MEDPVIN1@(J)_" "251 . I $L(MEDPVIN1) F S J=$O(@MEDPVIN1@(J)) Q:J="" Q:$L(MEDPVIN2)>10000 S MEDPVIN2=MEDPVIN2_@MEDPVIN1@(J)_" " 251 252 . S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")=MEDPVIN2 252 253 . ; … … 266 267 . D REPLACE^GPLXPATH(RESULT,"","//Medications/Medication/Directions") 267 268 . ; N MDZ1,MDZNA 268 . I DIRCNT>0 D ; IF THERE ARE DIRCTIONS 269 . . F MDZ1=1:1:DIRCNT D ; FOR EACH DIRECTION 270 . . . S MDZNA=$NA(@MAP@("M","DIRECTIONS",MDZ1)) 269 . N DIRCNT S DIRCNT="" 270 . I +$O(@MAP@("M","DIRECTIONS",DIRCNT)) D ; IF THERE ARE DIRCTIONS 271 . . F DIRCNT=$O(@MAP@("M","DIRECTIONS",DIRCNT)) D ; FOR EACH DIRECTION 272 . . . S MDZNA=$NA(@MAP@("M","DIRECTIONS",DIRCNT)) 271 273 . . . D MAP^GPLXPATH(DIRXML1,MDZNA,DIRXML2) 272 274 . . . D INSERT^GPLXPATH(RESULT,DIRXML2,"//Medications/Medication") -
ccr/trunk/p/CCRUNIT.m
r335 r339 4 4 ; 5 5 MEDS 6 N DEBUG S DEBUG= 16 N DEBUG S DEBUG=0 7 7 N DFN S DFN=5685 8 8 K ^TMP($J) … … 11 11 N XPATH S XPATH="//ContinuityOfCareRecord/Body/Medications" 12 12 W "XPATH is: "_XPATH,! 13 W "Getting Med Template into MINXML using",! 14 W "QUERY^GPLXPATH(T,XPATH,""MINXML"")",!! 15 D QUERY^GPLXPATH(T,XPATH,"MINXML") 16 W "Executing EXTRACT^CCRMEDS(MINXML,DFN,OUTXML)",! 13 W "Getting Med Template into INXML using",! 14 W "QUERY^GPLXPATH(T,XPATH,""INXML"")",!! 15 D QUERY^GPLXPATH(T,XPATH,"INXML") 16 B 17 W "Executing EXTRACT^CCRMEDS(INXML,DFN,OUTXML)",! 17 18 W "OUTXML will be ^TMP($J,""OUT"")",! 18 19 N OUTXML S OUTXML=$NA(^TMP($J,"OUT")) 19 D EXTRACT^CCRMEDS6( $NA(MINXML),DFN,OUTXML)20 D EXTRACT^CCRMEDS6("INXML",DFN,OUTXML) 20 21 Q
Note:
See TracChangeset
for help on using the changeset viewer.