1 | CCRVA200 ;WV/CCDCCR/SMH - Routine to get Provider Data;07/13/2008
|
---|
2 | ;;0.1;CCDCCR;;JUL 13, 2007;Build 0
|
---|
3 |
|
---|
4 | ; This routine uses Kernel APIs and Direct Global Access to get
|
---|
5 | ; Proivder Data from File 200.
|
---|
6 |
|
---|
7 | ; The Global is VA(200,*)
|
---|
8 |
|
---|
9 | FAMILY(DUZ) ; Get Family Name; PUBLIC; EXTRINSIC
|
---|
10 | ; INPUT: DUZ (i.e. File 200 IEN) ByVal
|
---|
11 | ; OUTPUT: String
|
---|
12 | N NAME S NAME=$P(^VA(200,DUZ,0),U)
|
---|
13 | D NAMECOMP^XLFNAME(.NAME)
|
---|
14 | Q NAME("FAMILY")
|
---|
15 | ;
|
---|
16 | GIVEN(DUZ) ; Get Given Name; PUBLIC; EXTRINSIC
|
---|
17 | ; INPUT: DUZ ByVal
|
---|
18 | ; OUTPUT: String
|
---|
19 | N NAME S NAME=$P(^VA(200,DUZ,0),U)
|
---|
20 | D NAMECOMP^XLFNAME(.NAME)
|
---|
21 | Q NAME("GIVEN")
|
---|
22 | ;
|
---|
23 | MIDDLE(DUZ) ; Get Middle Name, PUBLIC; EXTRINSIC
|
---|
24 | ; INPUT: DUZ ByVal
|
---|
25 | ; OUTPUT: String
|
---|
26 | N NAME S NAME=$P(^VA(200,DUZ,0),U)
|
---|
27 | D NAMECOMP^XLFNAME(.NAME)
|
---|
28 | Q NAME("MIDDLE")
|
---|
29 | ;
|
---|
30 | SUFFIX(DUZ) ; Get Suffix Name, PUBLIC; EXTRINSIC
|
---|
31 | ; INPUT: DUZ ByVal
|
---|
32 | ; OUTPUT: String
|
---|
33 | N NAME S NAME=$P(^VA(200,DUZ,0),U)
|
---|
34 | D NAMECOMP^XLFNAME(.NAME)
|
---|
35 | Q NAME("SUFFIX")
|
---|
36 | ;
|
---|
37 | TITLE(DUZ) ; Get Title for Proivder, PUBLIC; EXTRINSIC
|
---|
38 | ; INPUT: DUZ ByVal
|
---|
39 | ; OUTPUT: String
|
---|
40 | ; Gets External Value of Title field in New Person File.
|
---|
41 | ; It's actually a pointer to file 3.1
|
---|
42 | ; 200=New Person File; 8 is Title Field
|
---|
43 | Q $$GET1^DIQ(200,DUZ_",",8)
|
---|
44 | ;
|
---|
45 | NPI(DUZ) ; Get NPI Number, PUBLIC; EXTRINSIC
|
---|
46 | ; INPUT: DUZ ByVal
|
---|
47 | ; OUTPUT: Delimited String in format:
|
---|
48 | ; IDType^ID^IDDescription
|
---|
49 | ; If the NPI doesn't exist, "" is returned.
|
---|
50 | ; This routine uses a call documented in the Kernel dev guide
|
---|
51 | ; This call returns as "NPI^TimeEntered^ActiveInactive"
|
---|
52 | ; It returns -1 for NPI if NPI doesn't exist.
|
---|
53 | N NPI S NPI=$P($$NPI^XUSNPI("Individual_ID",DUZ),U)
|
---|
54 | Q:NPI=-1 ""
|
---|
55 | Q "NPI^"_NPI_"^HHS"
|
---|
56 | ;
|
---|
57 | SPEC(DUZ) ; Get Provider Specialty, PUBLIC; EXTRINSIC
|
---|
58 | ; INPUT: DUZ ByVal
|
---|
59 | ; OUTPUT: String: ProviderType/Specialty/Subspecialty OR ""
|
---|
60 | ; Uses a Kernel API. Returns -1 if a specialty is not specified
|
---|
61 | ; in file 200.
|
---|
62 | ; Otherwise, returns IEN^Profession^Specialty^Sub specialty^Effect date^Expired date^VA code
|
---|
63 | N STR S STR=$$GET^XUA4A72(DUZ)
|
---|
64 | Q:+STR<0 ""
|
---|
65 | ; Sometimes we have 3 pieces, or 2. Deal with that.
|
---|
66 | Q:$L($P(STR,U,4)) $P(STR,U,2)_"/"_$P(STR,U,3)_"/"_$P(STR,U,4)
|
---|
67 | Q $P(STR,U,2)_"/"_$P(STR,U,3)
|
---|
68 | ;
|
---|
69 | ADDTYPE(DUZ) ; Get Address Type, PUBLIC; EXTRINSIC
|
---|
70 | ; INPUT: DUZ, but not needed really... here for future expansion
|
---|
71 | ; OUTPUT: At this point "Work"
|
---|
72 | Q "Work"
|
---|
73 | ;
|
---|
74 |
|
---|