Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: MDUXMLOX

MDUXMLOX.m

Go to the documentation of this file.
  1. MDUXMLOX ; HOIFO/WAA -OBX converter XML text ; 7/26/00
  1. ;;1.0;CLINICAL PROCEDURES;**6**;Apr 01, 2004;Build 102
  1. ; OBX for the XML Parser
  1. ;
  1. OBX D XML^MDUXMLU1("<OBSERVATION>")
  1. D BLDXML^MDUXMLU1("SEQUENCE",$P(LINE,DL,2))
  1. D XML^MDUXMLU1("<CODE>")
  1. D BLDXML^MDUXMLU1("SCHEME",DEVICE)
  1. I $P($P(LINE,DL,4),"^")="",$P($P(LINE,DL,4),"^",2)'="" S $P(LINE,DL,4)=$P($P(LINE,DL,4),"^",2)
  1. D BLDXML^MDUXMLU1("VALUE",$P(LINE,DL,4))
  1. D BLDXML^MDUXMLU1("ORIGINAL","Y")
  1. D XML^MDUXMLU1("</CODE>")
  1. D BLDXML^MDUXMLU1("DATATYPE",$P(LINE,DL,3))
  1. I $P(LINE,DL,3)="FT" D FREE
  1. E D BLDXML^MDUXMLU1("VALUE",$P(LINE,DL,6))
  1. D BLDXML^MDUXMLU1("UNITS",$P(LINE,DL,7))
  1. I $P(LINE,DL,8)'="" D
  1. . N RANGE
  1. . S RANGE=$P(LINE,DL,8)
  1. . D XML^MDUXMLU1("<REFERENCE_RANGE>")
  1. . D BLDXML^MDUXMLU1("LOW",$P(RANGE,"-",1))
  1. . D BLDXML^MDUXMLU1("HIGH",$P(RANGE,"-",2))
  1. . D XML^MDUXMLU1("</REFERENCE_RANGE>")
  1. D XML^MDUXMLU1("</OBSERVATION>")
  1. Q
  1. FREE ; This will process free test
  1. D XML^MDUXMLU1("<VALUE>")
  1. N I,X,FREE,DATA
  1. S I=1
  1. D XML^MDUXMLU1($P(LINE,DL,6)) ; First line
  1. S X=0
  1. F S X=$O(^TMP($J,"MDHL7A",NUM,X)) Q:X<1 D
  1. . S DATA=$G(^TMP($J,"MDHL7A",NUM,X)) Q:DATA=""
  1. . S DATA=$$VAL^MDUXMLU1($P(DATA,DL))
  1. . D XML^MDUXMLU1(DATA)
  1. . Q
  1. ; ^--- THIS STUFF THE DATA INTO THE DATA ARRAY
  1. D XML^MDUXMLU1("</VALUE>")
  1. Q