source: BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/m/BMXG.m@ 1237

Last change on this file since 1237 was 1209, checked in by Sam Habiel, 13 years ago

BMXMON fix; updated all routines to v 2.31

File size: 2.0 KB
Line 
1BMXG ; IHS/OIT/HMW - UTIL: GET DATA ;
2 ;;2.31;BMX;;Jul 25, 2011
3 ;;Stolen from:* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
4 ;
5 ;
6 ;----------
7GET(FILE,Y,PC) ;EP
8 ;---> Return text of .01 Field of an entry in a file.
9 ;---> Parameters:
10 ; 1 - FILE (req) Number corresponding to desired file:
11 ; 1 = State File, #5
12 ; 2 = Community File, #9999999.5
13 ; 3 = Employer File, #9999999.75
14 ; 4 = Beneficiary File, #9999999.25
15 ; 5 = Tribe File, #9999999.03
16 ; 6 = Insurer File, #9999999.18
17 ; 7 = Suffix File, #9999999.32
18 ; 8 = Employer Group Insurance File, #9999999.77
19 ; 9 = Medicare Eligible File, #9000003
20 ; 10 = Medicaid Eligible File, #9000004
21 ; 11 = Private Insurance Eligible File, #9000006
22 ; 12 = Patient File, #9000001
23 ; 13 = VA Patient File, #2
24 ; 14 = Policy Holder File, #9000003.1
25 ; 15 = Relationship File, #9999999.36
26 ;
27 ; 2 - Y (req) IEN in the File storing the desired entry.
28 ; 3 - PC (opt) Piece of 0-Node to return (default=1).
29 ; If PC=0 return entire 0-node.
30 ;
31 Q:($G(Y)'?1N.N) ""
32 Q:'$G(FILE) ""
33 S:$G(PC)="" PC=1 S U="^"
34 ;
35 D
36 .I FILE=1 S GLB="^DIC(5,"_Y_",0)" Q
37 .I FILE=2 S GLB="^AUTTCOM("_Y_",0)" Q
38 .I FILE=3 S GLB="^AUTNEMPL("_Y_",0)" Q
39 .I FILE=4 S GLB="^AUTTBEN("_Y_",0)" Q
40 .I FILE=5 S GLB="^AUTTTRI("_Y_",0)" Q
41 .I FILE=6 S GLB="^AUTNINS("_Y_",0)" Q
42 .I FILE=7 S GLB="^AUTTMCS("_Y_",0)" Q
43 .I FILE=8 S GLB="^AUTNEGRP("_Y_",0)" Q
44 .I FILE=9 S GLB="^AUPNMCR("_Y_",0)" Q
45 .I FILE=10 S GLB="^AUPNMCD("_Y_",0)" Q
46 .I FILE=11 S GLB="^AUPNPRVT("_Y_",0)" Q
47 .I FILE=12 S GLB="^AUPNPAT("_Y_",0)" Q
48 .I FILE=13 S GLB="^DPT("_Y_",0)" Q
49 .I FILE=14 S GLB="^AUPN3PPH("_Y_",0)" Q
50 .I FILE=15 S GLB="^AUTTRLSH("_Y_",0)" Q
51 ;
52 Q:'FILE ""
53 Q:PC=0 $G(@GLB)
54 Q $P($G(@GLB),U,PC)
Note: See TracBrowser for help on using the repository browser.