CCRMED a testing version
This commit is contained in:
parent
83cefeca24
commit
cb4cb68ec8
31
p/CCRMEDS.m
31
p/CCRMEDS.m
|
@ -117,12 +117,27 @@ EXTRACT(INXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
|
|||
. S @MAP@("MEDVEHICLETEXT")="" ; For inpatient
|
||||
. S @MAP@("MEDDIRECTIONROUTETEXT")=$$GET1^DIQ(51.2,$P(SIGDATA,U,7),.01)
|
||||
. S @MAP@("MEDFREQUENCYVALUE")=$P(SIGDATA,U,7)
|
||||
. S @MAP@("MEDFREQUENCYUNIT")
|
||||
. S @MAP@("MEDINTERVALVALUE")
|
||||
. S @MAP@("MEDINTERVALUNIT")
|
||||
. ; Invervals... again another call.
|
||||
. ; In the wisdom of the original programmers, the schedule is a free text field
|
||||
. ; However, it gets translated by a call to the administration schedule file
|
||||
. ; to see if that schedule exists.
|
||||
. ; That's the same thing I am going to do.
|
||||
. ; The call is AP^PSS51P1(PSSPP,PSSFT,PSSWDIEN,PSSSTPY,LIST,PSSFREQ).
|
||||
. ; PSSPP is "PSJ" (for some reason, schedules are stored as PSJ, not PSO--
|
||||
. ; I looked), PSSFT is the name, and list is the ^TMP name to store the data in.
|
||||
. ; So...
|
||||
. D AP^PSS51P1("PSJ",$P(SIGDATA,U,7),,,"SCHEDULE")
|
||||
. N SCHEDATA M SCHEDATA=^TMP($J,"SCHEDULE")
|
||||
. N INTERVAL
|
||||
. I SCHEDATA(0)=-1 S INTERVAL=""
|
||||
. E D
|
||||
. . N SUB S SUB=$O(SCHEDATA(0))
|
||||
. . S INTERVAL=SCHEDATA(SUB,2)
|
||||
. S @MAP@("MEDINTERVALVALUE")=INTERVAL
|
||||
. S @MAP@("MEDINTERVALUNIT")="Minute"
|
||||
. S @MAP@("MEDDURATIONVALUE")=$P(SIGDATA,U,5)
|
||||
. S @MAP@("MEDDURATIONUNIT")
|
||||
. S @MAP@("MEDPRNFLAG")
|
||||
. S @MAP@("MEDDURATIONUNIT")=""
|
||||
. S @MAP@("MEDPRNFLAG")=$P(SIGDATA,U,7)["PRN"
|
||||
. S @MAP@("MEDPROBLEMOBJECTID")=""
|
||||
. S @MAP@("MEDPROBLEMDESCRIPTION")=""
|
||||
. S @MAP@("MEDPROBLEMCODEVALUE")=""
|
||||
|
@ -135,8 +150,10 @@ EXTRACT(INXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
|
|||
. ;
|
||||
. ; --- END OF DIRECTIONS ---
|
||||
. ;
|
||||
. S @MAP@("MEDPTINSTRUCTIONS")
|
||||
. S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")
|
||||
. ; ^PSRX(22,"INS1",1,0)="FOR BLOOD PRESSURE"
|
||||
. S @MAP@("MEDPTINSTRUCTIONS")=^PSRX(RXIEN,"INS1",1,0)
|
||||
. ; ^PSRX(22,"PRC",1,0)="Pharmacist: you must obey my command"
|
||||
. S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")=^PSRX(RXIEN,"PRC",1,0)
|
||||
. S @MAP@("MEDRFNO")=MED(9)
|
||||
. N RESULT S RESULT=$NA(^TMP("GPLCCR",$J,"RESULT",J))
|
||||
. K @RESULT
|
||||
|
|
Loading…
Reference in New Issue