GPLCCD0 ; CCDCCR/GPL - CCD TEMPLATE AND ACCESS ROUTINES; 6/7/08
;;0.1;CCDCCR;nopatch;noreleasedate
W "This is a CCD TEMPLATE with processing routines",!
W !
Q
;
ZT(ZARY,BAT,LINE) ; private routine to add a line to the ZARY array
; ZARY IS PASSED BY NAME
; BAT is a string identifying the section
; LINE is a test which will evaluate to true or false
; I '$G(@ZARY) D
. S @ZARY@(0)=0 ; initially there are no elements
. W "GOT HERE LOADING "_LINE,!
N CNT ; count of array elements
S CNT=@ZARY@(0) ; contains array count
S CNT=CNT+1 ; increment count
S @ZARY@(CNT)=LINE ; put the line in the array
; S @ZARY@(BAT,CNT)="" ; index the test by battery
S @ZARY@(0)=CNT ; update the array counter
Q
;
ZLOAD(ZARY,ROUTINE) ; load tests into ZARY which is passed by reference
; ZARY IS PASSED BY NAME
; ZARY = name of the root, closed array format (e.g., "^TMP($J)")
; ROUTINE = NAME OF THE ROUTINE - PASSED BY VALUE
K @ZARY S @ZARY=""
S @ZARY@(0)=0 ; initialize array count
N LINE,LABEL,BODY
N INTEST S INTEST=0 ; switch for in the TEMPLATE section
N SECTION S SECTION="[anonymous]" ; NO section LABEL
;
N NUM F NUM=1:1 S LINE=$T(+NUM^@ROUTINE) Q:LINE="" D
. I LINE?." "1";".E S INTEST=1 ; entering section
. I LINE?." "1";".E S INTEST=0 ; leaving section
. I INTEST D ; within the section
. . I LINE?." "1";><".E D ; sub-section name found
. . . S SECTION=$P($P(LINE,";><",2),">",1) ; pull out name
. . I LINE?." "1";;".E D ; line found
. . . D ZT(ZARY,SECTION,$P(LINE,";;",2)) ; put the line in the array
Q
;
LOAD(ARY) ; LOAD A CCR TEMPLATE INTO ARY PASSED BY NAME
D ZLOAD(ARY,"GPLCCD0")
; ZWR @ARY
Q
;
;
;;
;;
;;
;;
;;
;;
;;
;; < value="DOCTITLE"/>@@DOCTITLE@@Good Health Clinic Continuity of Care Document
;;
;;
;;
;;
;;
;;
;;
;;
;; @@PATIENTGIVENNAME@@
;; @@PATIENTFAMILYNAME@@
;; @@PATIENTNAMESUFFIX@@
;;
;;
;;
;;
;;
;;
;; @@SITENAME@@Good Health Clinic
;;
;;
;;
;;
;;
;;
;;
;;
;; Dr.@@AUTHORGIVENNAME@@Robert@@AUTHORFAMILYNAME@@Dolin
;;
;;
;;
;; @@AUTHORSITE@@Good Health Clinic
;;
;;
;;
;;
;;
;;
;;
;;
;; @@INFORMANTORG@@Good Health Clinic
;;
;;
;;
;;
;;
;;
;;
;; @@CUSTODIANORG@@Good Health Clinic
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;; @@LEGALORG@@Good Health Clinic
;;
;;
;;
;;
;;
;;
;;
;; @@GUARSTREET@@17 Daws Rd.
;; @@GUARCITY@@Blue Bell
;; @@GUARSTATE@@MA
;; @@GUARZIP@@02368
;;
;;
;;
;;
;; @@GUARGIVENNAME@@Kenneth
;; @@GUARFAMILYNAME@@Ross
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;; @@NOKGIVENNAME@@Henrietta
;; @@NOKFAMILYNAME@@Levin
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;; @@PCPNAMEPREFIX@@Dr.@@PCPNAMEGIVEN@@Robert@@PCPNAMEFAMILY@@Dolin
;;
;;
;;
;; @@PCPORG@@Good Health Clinic
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;; Summary Purpose
;; Transfer of care
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;; < value="OBSERVATIONRANGE"/>
;;
;; @@OBSRANGETEXT@@M 13-18 g/dl; F 12-16 g/dl
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;