PSSHRQ2D ;BIRM/CMF - extension of PSSHRQ23 ;09/20/07
;;1.0;PHARMACY DATA MANAGEMENT;**178**;9/30/97;Build 14
;;
; @authors - Chris Flegel
; @date - 25 February 2014
; @version - 1.0
;;
QUIT
;;
PARSEDSP(DOCHAND,NODE,HASH,COUNT) ;
; @DESC Parses a dose percent element and stores values in HASH parameter
;
; @DOCHAND Handle to XML document
; @NODE Node associated with XML element
; @HASH Passed by ref. Used to store return values.
; @COUNT Count of drugs
;
; @RETURNS Nothing, Values stored in HASH values
;
N NAME
S NAME=$$NAME^MXMLDOM(DOCHAND,NODE)
D:$$NAME^MXMLDOM(DOCHAND,NODE+1)="databaseValue"
.S HASH(COUNT,NAME,"databaseValue")=$$GETTEXT^PSSHRCOM(DOCHAND,NODE+1)
.Q
D:$$NAME^MXMLDOM(DOCHAND,NODE+2)="doseValue"
.S HASH(COUNT,NAME,"doseValue")=$$GETTEXT^PSSHRCOM(DOCHAND,NODE+2)
.Q
D:$$NAME^MXMLDOM(DOCHAND,NODE+3)="percentError"
.S HASH(COUNT,NAME,"percentError")=$$GETTEXT^PSSHRCOM(DOCHAND,NODE+3)
.Q
D:$$NAME^MXMLDOM(DOCHAND,NODE+4)="unitOfMeasure"
.S HASH(COUNT,NAME,"unitOfMeasure")=$$GETTEXT^PSSHRCOM(DOCHAND,NODE+4)
.Q
Q
;;
WRITEDSP(NODE,HASH,COUNT,IEN,NAME,ALTNAME,ALTNODE) ;
; @DESC Writes a dose percent element from HASH parameter to output global
;
; @NODE Node associated with XML element
; @HASH Passed by ref. Used to store return values.
; @COUNT Count of drugs
;
; @RETURNS Nothing, Values stored in HASH values
;
S ALTNAME=$G(ALTNAME)
S ALTNAME=$S(ALTNAME'="":ALTNAME,1:NAME)
S ALTNODE=$G(ALTNODE)
N SUB
F SUB="databaseValue","doseValue","percentError","unitOfMeasure" D
.Q:$G(HASH(COUNT,NAME,SUB))=""
.I ALTNODE'="" S @NODE@(ALTNODE,$$UP^XLFSTR(ALTNAME),$$UP^XLFSTR(SUB),IEN)=$G(HASH(COUNT,NAME,SUB))
.E S @NODE@($$UP^XLFSTR(ALTNAME),$$UP^XLFSTR(SUB),IEN)=$G(HASH(COUNT,NAME,SUB))
.Q
Q
;;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSSHRQ2D 1832 printed Nov 22, 2024@17:42 Page 2
PSSHRQ2D ;BIRM/CMF - extension of PSSHRQ23 ;09/20/07
+1 ;;1.0;PHARMACY DATA MANAGEMENT;**178**;9/30/97;Build 14
+2 ;;
+3 ; @authors - Chris Flegel
+4 ; @date - 25 February 2014
+5 ; @version - 1.0
+6 ;;
+7 QUIT
+8 ;;
PARSEDSP(DOCHAND,NODE,HASH,COUNT) ;
+1 ; @DESC Parses a dose percent element and stores values in HASH parameter
+2 ;
+3 ; @DOCHAND Handle to XML document
+4 ; @NODE Node associated with XML element
+5 ; @HASH Passed by ref. Used to store return values.
+6 ; @COUNT Count of drugs
+7 ;
+8 ; @RETURNS Nothing, Values stored in HASH values
+9 ;
+10 NEW NAME
+11 SET NAME=$$NAME^MXMLDOM(DOCHAND,NODE)
+12 if $$NAME^MXMLDOM(DOCHAND,NODE+1)="databaseValue"
Begin DoDot:1
+13 SET HASH(COUNT,NAME,"databaseValue")=$$GETTEXT^PSSHRCOM(DOCHAND,NODE+1)
+14 QUIT
End DoDot:1
+15 if $$NAME^MXMLDOM(DOCHAND,NODE+2)="doseValue"
Begin DoDot:1
+16 SET HASH(COUNT,NAME,"doseValue")=$$GETTEXT^PSSHRCOM(DOCHAND,NODE+2)
+17 QUIT
End DoDot:1
+18 if $$NAME^MXMLDOM(DOCHAND,NODE+3)="percentError"
Begin DoDot:1
+19 SET HASH(COUNT,NAME,"percentError")=$$GETTEXT^PSSHRCOM(DOCHAND,NODE+3)
+20 QUIT
End DoDot:1
+21 if $$NAME^MXMLDOM(DOCHAND,NODE+4)="unitOfMeasure"
Begin DoDot:1
+22 SET HASH(COUNT,NAME,"unitOfMeasure")=$$GETTEXT^PSSHRCOM(DOCHAND,NODE+4)
+23 QUIT
End DoDot:1
+24 QUIT
+25 ;;
WRITEDSP(NODE,HASH,COUNT,IEN,NAME,ALTNAME,ALTNODE) ;
+1 ; @DESC Writes a dose percent element from HASH parameter to output global
+2 ;
+3 ; @NODE Node associated with XML element
+4 ; @HASH Passed by ref. Used to store return values.
+5 ; @COUNT Count of drugs
+6 ;
+7 ; @RETURNS Nothing, Values stored in HASH values
+8 ;
+9 SET ALTNAME=$GET(ALTNAME)
+10 SET ALTNAME=$SELECT(ALTNAME'="":ALTNAME,1:NAME)
+11 SET ALTNODE=$GET(ALTNODE)
+12 NEW SUB
+13 FOR SUB="databaseValue","doseValue","percentError","unitOfMeasure"
Begin DoDot:1
+14 if $GET(HASH(COUNT,NAME,SUB))=""
QUIT
+15 IF ALTNODE'=""
SET @NODE@(ALTNODE,$$UP^XLFSTR(ALTNAME),$$UP^XLFSTR(SUB),IEN)=$GET(HASH(COUNT,NAME,SUB))
+16 IF '$TEST
SET @NODE@($$UP^XLFSTR(ALTNAME),$$UP^XLFSTR(SUB),IEN)=$GET(HASH(COUNT,NAME,SUB))
+17 QUIT
End DoDot:1
+18 QUIT
+19 ;;