Changeset 339


Ignore:
Timestamp:
Jan 19, 2009, 4:20:15 PM (16 years ago)
Author:
George Lilly
Message:

CCRMEDS6 tested, now mostly working

Location:
ccr/trunk/p
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/CCRMEDS6.m

    r332 r339  
    4848 ; If MEDS1 is not defined, then no meds
    4949 I '$D(MEDS1) S @OUTXML@(0)=0 QUIT
    50  I DEBUG ZWR MEDS1
     50 I DEBUG ZWR MEDS1,MINXML
    5151 N MEDCNT S MEDCNT=0 ; Med Count
    5252 ; The next line is a super line. It goes through the array return
     
    204204 . . ; That's the same thing I am going to do.
    205205 . . ; 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")
    207207 . . N INTERVAL S INTERVAL="" ; Default
    208  . . S:SCEHDIEN INTERVAL=$$GET1^DIQ(51.1,SCHEDIEN,2)
     208 . . S:SCHEDIEN INTERVAL=$$GET1^DIQ(51.1,SCHEDIEN,2)
    209209 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDINTERVALVALUE")=INTERVAL
    210210 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDINTERVALUNIT")="Minute"
     
    232232 . . ; If there is another entry in the FMSIG array (i.e. another line
    233233 . . ; in the sig), set the direction count indicator.
     234 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDDIRSEQ")=""  ; Default
    234235 . . S:+$O(FMSIG(FMSIGNUM)) @MAP@("M","DIRECTIONS",DIRCNT,"MEDDIRSEQ")=DIRCNT
    235236 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDMULDIRMOD")=SIGDATA(5)
     
    242243 . N MEDPTIN1 S MEDPTIN1=$$GET1^DIQ(52,RXIEN,115,,"MEDPTIN1")
    243244 . 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)_" "
    245246 . S @MAP@("MEDPTINSTRUCTIONS")=MEDPTIN2
    246247 . K J
     
    248249 . N MEDPVIN1 S MEDPVIN1=$$GET1^DIQ(52,RXIEN,39,,"MEDPVIN1")
    249250 . 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)_" "
    251252 . S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")=MEDPVIN2
    252253 . ;
     
    266267 . D REPLACE^GPLXPATH(RESULT,"","//Medications/Medication/Directions")
    267268 . ; 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))
    271273 . . . D MAP^GPLXPATH(DIRXML1,MDZNA,DIRXML2)
    272274 . . . D INSERT^GPLXPATH(RESULT,DIRXML2,"//Medications/Medication")
  • ccr/trunk/p/CCRUNIT.m

    r335 r339  
    44        ;
    55MEDS
    6         N DEBUG S DEBUG=1
     6        N DEBUG S DEBUG=0
    77        N DFN S DFN=5685
    88        K ^TMP($J)
     
    1111        N XPATH S XPATH="//ContinuityOfCareRecord/Body/Medications"
    1212        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)",!
    1718        W "OUTXML will be ^TMP($J,""OUT"")",!
    1819        N OUTXML S OUTXML=$NA(^TMP($J,"OUT"))
    19         D EXTRACT^CCRMEDS6($NA(MINXML),DFN,OUTXML)
     20        D EXTRACT^CCRMEDS6("INXML",DFN,OUTXML)
    2021        Q
Note: See TracChangeset for help on using the changeset viewer.