Updated to a working CCRVA200 file
This commit is contained in:
parent
c1c9ec5cf7
commit
0a2a7d7a23
84
p/CCRVA200.m
84
p/CCRVA200.m
|
@ -1,6 +1,6 @@
|
||||||
CCRVA200 ;WV/CCDCCR/SMH - Routine to get Provider Data;07/13/2008
|
CCRVA200 ;WV/CCDCCR/SMH - Routine to get Provider Data;07/13/2008
|
||||||
;;0.1;CCDCCR;;JUL 13, 2007;Build 0
|
;;0.1;CCDCCR;;JUL 13, 2007;Build 0
|
||||||
|
Q
|
||||||
; This routine uses Kernel APIs and Direct Global Access to get
|
; This routine uses Kernel APIs and Direct Global Access to get
|
||||||
; Proivder Data from File 200.
|
; Proivder Data from File 200.
|
||||||
|
|
||||||
|
@ -63,12 +63,90 @@ SPEC(DUZ) ; Get Provider Specialty, PUBLIC; EXTRINSIC
|
||||||
N STR S STR=$$GET^XUA4A72(DUZ)
|
N STR S STR=$$GET^XUA4A72(DUZ)
|
||||||
Q:+STR<0 ""
|
Q:+STR<0 ""
|
||||||
; Sometimes we have 3 pieces, or 2. Deal with that.
|
; Sometimes we have 3 pieces, or 2. Deal with that.
|
||||||
Q:$L($P(STR,U,4)) $P(STR,U,2)_"/"_$P(STR,U,3)_"/"_$P(STR,U,4)
|
Q:$L($P(STR,U,4)) $P(STR,U,2)_"-"_$P(STR,U,3)_"-"_$P(STR,U,4)
|
||||||
Q $P(STR,U,2)_"/"_$P(STR,U,3)
|
Q $P(STR,U,2)_"-"_$P(STR,U,3)
|
||||||
;
|
;
|
||||||
ADDTYPE(DUZ) ; Get Address Type, PUBLIC; EXTRINSIC
|
ADDTYPE(DUZ) ; Get Address Type, PUBLIC; EXTRINSIC
|
||||||
; INPUT: DUZ, but not needed really... here for future expansion
|
; INPUT: DUZ, but not needed really... here for future expansion
|
||||||
; OUTPUT: At this point "Work"
|
; OUTPUT: At this point "Work"
|
||||||
Q "Work"
|
Q "Work"
|
||||||
;
|
;
|
||||||
|
ADDLINE1(DUZ) ; Get Address associated with this instituation; PUBLIC; EXTRINSIC
|
||||||
|
; INPUT: DUZ ByVal
|
||||||
|
; Output: String.
|
||||||
|
|
||||||
|
; First, get site number from the institution file.
|
||||||
|
; 1st piece returned by $$SITE^VASITE, which gets the system institution
|
||||||
|
N INST S INST=$P($$SITE^VASITE(),U)
|
||||||
|
|
||||||
|
; Second, get mailing address
|
||||||
|
; There are two APIs to get the address, one for physical and one for
|
||||||
|
; mailing. We will check if mailing exists first, since that's the
|
||||||
|
; one we want to use; then check for physical. If neither exists,
|
||||||
|
; then we return nothing. We check for the existence of an address
|
||||||
|
; by the length of the returned string.
|
||||||
|
; NOTE: API doesn't support Address 2, so I won't even include it
|
||||||
|
; in the template.
|
||||||
|
N ADD
|
||||||
|
S ADD=$$MADD^XUAF4(INST) ; mailing address
|
||||||
|
Q:$L(ADD) $P(ADD,U)
|
||||||
|
S ADD=$$PADD^XUAF4(INST) ; physical address
|
||||||
|
Q:$L(ADD) $P(ADD,U)
|
||||||
|
Q ""
|
||||||
|
;
|
||||||
|
CITY(DUZ) ; Get City for Institution. PUBLIC; EXTRINSIC
|
||||||
|
; INPUT: DUZ ByVal
|
||||||
|
; Output: String.
|
||||||
|
; See ADD1 for comments
|
||||||
|
N INST S INST=$P($$SITE^VASITE(),U)
|
||||||
|
N ADD
|
||||||
|
S ADD=$$MADD^XUAF4(INST) ; mailing address
|
||||||
|
Q:$L(ADD) $P(ADD,U,2)
|
||||||
|
S ADD=$$PADD^XUAF4(INST) ; physical address
|
||||||
|
Q:$L(ADD) $P(ADD,U,2)
|
||||||
|
Q ""
|
||||||
|
;
|
||||||
|
STATE(DUZ) ; Get State for Institution. PUBLIC; EXTRINSIC
|
||||||
|
; INPUT: DUZ ByVal
|
||||||
|
; Output: String.
|
||||||
|
; See ADD1 for comments
|
||||||
|
N INST S INST=$P($$SITE^VASITE(),U)
|
||||||
|
N ADD
|
||||||
|
S ADD=$$MADD^XUAF4(INST) ; mailing address
|
||||||
|
Q:$L(ADD) $P(ADD,U,3)
|
||||||
|
S ADD=$$PADD^XUAF4(INST) ; physical address
|
||||||
|
Q:$L(ADD) $P(ADD,U,3)
|
||||||
|
Q ""
|
||||||
|
;
|
||||||
|
POSTCODE(DUZ) ; Get Postal Code for Institution. PUBLIC; EXTRINSIC
|
||||||
|
; INPUT: DUZ ByVal
|
||||||
|
; OUTPUT: String.
|
||||||
|
; See ADD1 for comments
|
||||||
|
N INST S INST=$P($$SITE^VASITE(),U)
|
||||||
|
N ADD
|
||||||
|
S ADD=$$MADD^XUAF4(INST) ; mailing address
|
||||||
|
Q:$L(ADD) $P(ADD,U,4)
|
||||||
|
S ADD=$$PADD^XUAF4(INST) ; physical address
|
||||||
|
Q:$L(ADD) $P(ADD,U,4)
|
||||||
|
Q ""
|
||||||
|
;
|
||||||
|
TEL(DUZ) ; Get Office Phone number. PUBLIC; EXTRINSIC
|
||||||
|
; INPUT: DUZ ByVal
|
||||||
|
; OUTPUT: String.
|
||||||
|
; Direct global access
|
||||||
|
N TEL S TEL=$G(^VA(200,DUZ,.13))
|
||||||
|
Q $P(TEL,U,2)
|
||||||
|
;
|
||||||
|
TELTYPE(DUZ) ; Get Telephone Type. PUBLIC; EXTRINSIC
|
||||||
|
; INPUT: DUZ ByVal
|
||||||
|
; OUTPUT: String.
|
||||||
|
Q "Office"
|
||||||
|
;
|
||||||
|
EMAIL(DUZ) ; Get Provider's Email. PUBLIC; EXTRINSIC
|
||||||
|
; INPUT: DUZ ByVal
|
||||||
|
; OUTPUT: String
|
||||||
|
; Direct global access
|
||||||
|
N EMAIL S EMAIL=$G(^VA(200,DUZ,.15))
|
||||||
|
Q $P(EMAIL,U)
|
||||||
|
;
|
||||||
|
|
||||||
|
|
|
@ -1025,7 +1025,6 @@ LOAD(ARY) ; LOAD A CCR TEMPLATE INTO ARY PASSED BY NAME
|
||||||
;;<Text>@@ACTORADDRESSTYPE@@</Text>
|
;;<Text>@@ACTORADDRESSTYPE@@</Text>
|
||||||
;;</Type>
|
;;</Type>
|
||||||
;;<Line1>@@ACTORADDRESSLINE1@@</Line1>
|
;;<Line1>@@ACTORADDRESSLINE1@@</Line1>
|
||||||
;;<Line2>@@ACTORADDRESSLINE2@@</Line2>
|
|
||||||
;;<City>@@ACTORADDRESSCITY@@</City>
|
;;<City>@@ACTORADDRESSCITY@@</City>
|
||||||
;;<State>@@ACTORADDRESSSTATE@@</State>
|
;;<State>@@ACTORADDRESSSTATE@@</State>
|
||||||
;;<PostalCode>@@ACTORPOSTALCODE@@</PostalCode>
|
;;<PostalCode>@@ACTORPOSTALCODE@@</PostalCode>
|
||||||
|
|
Loading…
Reference in New Issue