Changeset 324 for ccr/trunk/p


Ignore:
Timestamp:
Jan 13, 2009, 7:36:50 AM (16 years ago)
Author:
Sam Habiel
Message:

Finished initial draft of CCRMEDS6

File:
1 edited

Legend:

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

    r323 r324  
    213213 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDDURATIONUNIT")=DURTXT
    214214 . . 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
    216216 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDPROBLEMTYPETXT")=""
    217217 . . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDPROBLEMDESCRIPTION")=""
     
    229229 . ; --- END OF DIRECTIONS ---
    230230 . ;
    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
    236250 . N RESULT S RESULT=$NA(^TMP("GPLCCR",$J,"MAPPED"))
    237251 . K @RESULT
     
    249263 . . . D MAP^GPLXPATH(DIRXML1,MDZNA,DIRXML2)
    250264 . . . D INSERT^GPLXPATH(RESULT,DIRXML2,"//Medications/Medication")
    251  . D:RXIEN=1 CP^GPLXPATH(RESULT,OUTXML) ; First one is a copy
    252  . D:RXIEN>1 INSINNER^GPLXPATH(OUTXML,RESULT) ; AFTER THE FIRST, INSERT INNER XML
     265 . 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
    253267 N MEDTMP,MEDI
    254268 D MISSING^GPLXPATH(OUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
Note: See TracChangeset for help on using the changeset viewer.