Fixed intervals in CCRMEDS6
This commit is contained in:
parent
7a40979a3d
commit
ab16c09ef9
20
p/CCRMEDS6.m
20
p/CCRMEDS6.m
|
@ -202,10 +202,24 @@ EXTRACT(MINXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
|
||||||
. . ; However, it gets translated by a call to the administration schedule file
|
. . ; However, it gets translated by a call to the administration schedule file
|
||||||
. . ; to see if that schedule exists.
|
. . ; to see if that schedule exists.
|
||||||
. . ; That's the same thing I am going to do.
|
. . ; That's the same thing I am going to do.
|
||||||
. . ; Search B index of 51.1 (Admin Schedule) with first abbr of schedule
|
. . ; Search B index of 51.1 (Admin Schedule) with schedule
|
||||||
. . N SCHEDIEN S SCHEDIEN=$$FIND1^DIC(51.1,,,$P(SIGDATA(7)," "),"B")
|
. . ; First, remove "PRN" if it exists (don't ask, that's how the file
|
||||||
|
. . ; works; I wouldn't do it that way).
|
||||||
|
. . N SCHNOPRN S SCHNOPRN=SIGDATA(7)
|
||||||
|
. . I SCHNOPRN["PRN" S SCHNOPRN=$E(SCHNOPRN,1,$F(SCHNOPRN,"PRN")-5)
|
||||||
|
. . ; Super call below:
|
||||||
|
. . ; 1=File 51.1 3=Field 2 (Frequency in Minutes)
|
||||||
|
. . ; 4=Packed format, Exact Match 5=Lookup Value
|
||||||
|
. . ; 6=# of entries to return 7=Index 10=Return Array
|
||||||
|
. . ;
|
||||||
|
. . ; I do not account for the fact that two schedules can be
|
||||||
|
. . ; spelled identically (ie duplicate entry). In that case,
|
||||||
|
. . ; I get the first. That's just a bad pharmacy pkg maintainer.
|
||||||
|
. . N C0C515
|
||||||
|
. . D FIND^DIC(51.1,,"@;2","PX",SCHNOPRN,1,"B",,,"C0C515")
|
||||||
. . N INTERVAL S INTERVAL="" ; Default
|
. . N INTERVAL S INTERVAL="" ; Default
|
||||||
. . S:SCHEDIEN INTERVAL=$$GET1^DIQ(51.1,SCHEDIEN,2)
|
. . ; If there are entries found, get it
|
||||||
|
. . I +$G(C0C515("DILIST",0)) S INTERVAL=$P(C0C515("DILIST",1,0),U,2)
|
||||||
. . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDINTERVALVALUE")=INTERVAL
|
. . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDINTERVALVALUE")=INTERVAL
|
||||||
. . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDINTERVALUNIT")="Minute"
|
. . S @MAP@("M","DIRECTIONS",DIRCNT,"MEDINTERVALUNIT")="Minute"
|
||||||
. . ; Duration is 10M minutes, 10H hours, 10D for Days
|
. . ; Duration is 10M minutes, 10H hours, 10D for Days
|
||||||
|
|
|
@ -13,7 +13,6 @@ MEDS
|
||||||
W "Getting Med Template into INXML using",!
|
W "Getting Med Template into INXML using",!
|
||||||
W "QUERY^GPLXPATH(T,XPATH,""INXML"")",!!
|
W "QUERY^GPLXPATH(T,XPATH,""INXML"")",!!
|
||||||
D QUERY^GPLXPATH(T,XPATH,"INXML")
|
D QUERY^GPLXPATH(T,XPATH,"INXML")
|
||||||
B
|
|
||||||
W "Executing EXTRACT^CCRMEDS(INXML,DFN,OUTXML)",!
|
W "Executing EXTRACT^CCRMEDS(INXML,DFN,OUTXML)",!
|
||||||
W "OUTXML will be ^TMP($J,""OUT"")",!
|
W "OUTXML will be ^TMP($J,""OUT"")",!
|
||||||
N OUTXML S OUTXML=$NA(^TMP($J,"OUT"))
|
N OUTXML S OUTXML=$NA(^TMP($J,"OUT"))
|
||||||
|
|
Loading…
Reference in New Issue