source: WorldVistAEHR/trunk/r/DSS_EXTRACTS-ECX/ECX324PT.m@ 701

Last change on this file since 701 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 5.3 KB
Line 
1ECX324PT ;ALB/JAP - PATCH ECX*3*24 Post-Install ; June 3, 1999
2 ;;3.0;DSS EXTRACTS;**24**;Dec 22, 1997
3 ;
4POST ;Entry point
5 N DIC,DIE,DA,DR,DINUM,X,Y,J,IEN,ECXX,DATA,NAME,FILE,FREQ,TYPE,HEAD,MAX,GRP,PIECE,ROU,XF
6 ;inactivate fy99 clinic extract; record #2
7 S XF=$P(^ECX(727.1,2,0),U,2)
8 I XF'=727.803 D Q
9 .D MES^XPDUTL(" WARNING: Could not find FY1999 Clinic Visit Extract definition in")
10 .D MES^XPDUTL(" File #727.1 in order to inactivate.")
11 .D MES^XPDUTL(" ")
12 .D MES^XPDUTL(" No further updates attempted. Exiting...")
13 .D MES^XPDUTL(" ")
14 .D MES^XPDUTL(" Please consult with NVS for DSS EXTRACTS support.")
15 .D MES^XPDUTL(" ")
16 S DIE="^ECX(727.1,",DA=2,HEAD="ZZZ",TYPE="Clinic/Inactive",DR="7///^S X=TYPE;8///^S X=HEAD" D ^DIE
17 D MES^XPDUTL("OK... Clinic Visit Extract (CLI) for FY1999 has been inactivated.")
18 D MES^XPDUTL(" ")
19 ;update file #727.1 with new record data
20 D MES^XPDUTL("Updating EXTRACT DEFINITIONS file (#727.1) with new extract")
21 D MES^XPDUTL("definitions...")
22 D MES^XPDUTL(" ")
23 F J=1:1 S ECXX=$P($T(TEXT+J),";;",2) Q:ECXX="QUIT" D
24 .K DD,DO
25 .S IEN=$P(ECXX,";",1),DATA=$P(ECXX,";",2),NAME=$P(DATA,U,1)
26 .S FILE=$P(DATA,U,2),FREQ=$P(DATA,U,3),TYPE=$P(DATA,U,7),HEAD=$P(DATA,U,8)
27 .S GRP=$P(DATA,U,9),PIECE=$P(DATA,U,10),MAX=$P(DATA,U,11),ROU=$P(DATA,U,12)
28 .K X,Y S DIC="^ECX(727.1,",DIC(0)="L",X=NAME,DINUM=IEN
29 .S DIC("DR")="1///"_FILE_";2///"_FREQ_";7///"_TYPE_";8///"_HEAD_";9///"_GRP_";11///"_PIECE_";12///"_MAX_";4///"_ROU
30 .D FILE^DICN
31 .I Y=-1 D Q
32 ..I $D(^ECX(727.1,IEN)),$O(^ECX(727.1,"AF",FILE,0))=IEN D Q
33 ...D MES^XPDUTL(" Entry #"_IEN_" for "_NAME_" extract already exists.")
34 ...D MES^XPDUTL(" ")
35 ..D MES^XPDUTL(" WARNING: Could not update entry #"_IEN_" for "_NAME_" extract.")
36 ..D MES^XPDUTL(" Please consult with NVS for DSS EXTRACTS support.")
37 ..D MES^XPDUTL(" ")
38 .D MES^XPDUTL(" Setting record #"_IEN_" for the "_NAME_" extract... ok.")
39 .D MES^XPDUTL(" ")
40 ;set audit description for mental health
41 I '$D(^ECX(727.1,11,1)) D
42 .K DIE,DIC,DR,DA
43 .F J=1:1 S ECXX=$P($T(MTL+J),";;",2) Q:ECXX="QUIT" S ^TMP($J,"WP",J)=ECXX
44 .D WP^DIE(727.1,"11,",10,,"^TMP($J,""WP"")")
45 .K ^TMP($J,"WP")
46 ;set all frequency fields to "m" in file #727.1
47 S J=0 F S J=$O(^ECX(727.1,J)) Q:'J D
48 .S $P(^ECX(727.1,J,0),U,3)="M",$P(^(0),U,4)="",$P(^(0),U,5)="",$P(^(0),U,6)=""
49 ;set entries in file #727.5
50 D EN^ECX324MH
51 D OPT
52 D ADD7272
53 Q
54 ;
55TEXT ;data for file #727.1 records
56 ;;11;MENTAL HEALTH^727.812^M^^^^Mental Health^MTL^MTL^24^200^ECXMTL
57 ;;21;CLINIC I^727.816^M^^^^Clinic^CLI^SCX^25^200^ECXSCXN
58 ;;22;CLINIC II^727.818^M^^^^Clinic II^CLJ^SCX^26^200^ECXSCXN
59 ;;QUIT
60 ;
61OPT ;place option back in-service
62 N OPT,DIC,DIE,DA,DR,X,Y
63 S DIC="^DIC(19,",DIC(0)="XO",X="ECXDEFINE"
64 D ^DIC
65 S OPT=+Y
66 Q:OPT<1
67 S DIE=DIC,DA=OPT,DR="2///^S X=""@"""
68 D ^DIE
69 D MES^XPDUTL(" ")
70 D MES^XPDUTL(" ")
71 D MES^XPDUTL(" Setting option ECXDEFINE back in-service... ok.")
72 D MES^XPDUTL(" ")
73 Q
74 ;
75MTL ;audit description for mental health
76 ;;Verify against: Usage Statistics, Site Report by Date
77 ;;Menu Option: Usage Statistics [YSMUSE], Site Report by Date [YSAS
78 ;; MANAGEMENT REPORT]
79 ;;
80 ;;The 'Usage Statistics' report in the MENTAL HEALTH VistA software should be
81 ;;used to verify the Psych instrument segment of the DSS MTL Extract Audit
82 ;;report. It must be noted that the Usage report is produced based on month
83 ;;and year, the days are ignored.
84 ;;
85 ;;The 'Site Report by Date' should be used to verify the ASI segment on the
86 ;;DSS MTL Extract Audit Report. It is possible that the figures on the DSS
87 ;;MTL report may be higher than those on the Site Report. The reason being
88 ;;that the MENTAL HEALTH 'Site Report' does not currently display test that
89 ;;are inactive. The DSS MTL Extract Audit Report will report both active
90 ;;and inactive tests performed during a specified date range.
91 ;;
92 ;;Currently, there is no report in the MENTAL HEALTH VistA package to verify
93 ;;the GAF segment on the DSS MTL Extract Audit Report. However, the general
94 ;;format seen in the MENTAL HEALTH VistA, Print GAF's by Clinic/Date [YSGAF
95 ;;PRINT CLINIC] is being followed.
96 ;;QUIT
97 ;
98ADD7272 ;add entries to file #727.2
99 ;ECXX is in format: ien;test^source
100 N ECX,ECXX,DA,DIC,DINUM,DIE,DR,X,Y,TEST,SOURCE,CNT
101 D MES^XPDUTL(" ")
102 D MES^XPDUTL(" ")
103 D MES^XPDUTL(" Adding entries to DSS LAB TESTS File (#727.2)...")
104 D MES^XPDUTL(" ")
105 S $P(^DD(727.21,.01,0),U,5)="",CNT=0
106 F ECX=1:1 S ECXX=$P($T(NEW7272+ECX),";;",2) Q:ECXX="QUIT" D
107 .S ECXDA=$P(ECXX,";",1),ECXX=$P(ECXX,";",2)
108 .Q:'$D(^ECX(727.2,1))
109 .I $D(^ECX(727.2,1,1,0)),'$D(^ECX(727.2,1,1,ECXDA,0)) D
110 ..S CNT=CNT+1
111 ..S TEST=$P(ECXX,U,1),SOURCE=$P(ECXX,U,2)
112 ..S DA(1)=1,DIC("P")=$P(^DD(727.2,1,0),U,2),DINUM=ECXDA
113 ..S X=TEST,DIC="^ECX(727.2,1,1,",DLAYGO=727.21,DIC(0)="LX",DIC("DR")="2///^S X=SOURCE"
114 ..K DD,DO D FILE^DICN K DLAYGO
115 ..D MES^XPDUTL(" ")
116 ..D MES^XPDUTL(" Adding "_TEST_" as entry #"_ECXDA_"... ok.")
117 ..D MES^XPDUTL(" ")
118 I CNT=0 D
119 .D MES^XPDUTL(" Entries already exist -- nothing added.")
120 .D MES^XPDUTL(" ")
121 S $P(^DD(727.21,.01,0),U,5)="K X"
122 Q
123 ;
124NEW7272 ;new records for file #727.2
125 ;;32;MICROALBUMIN^U
126 ;;33;HEPATITIS B SURFACE ANTIBODY^B
127 ;;34;HEPATITIS C ANTIBODY^B
128 ;;35;HIV ANTIBODY^B
129 ;;36;CD4 RATIO (T CELL SCREEN)^B
130 ;;37;HCV-QUANTITATIVE BY PCR^B
131 ;;38;HIV VIRAL LOAD^B
132 ;;39;HCV-QUALITATIVE BY PCR^B
133 ;;40;HIV 1 BY EIA^B
134 ;;QUIT
Note: See TracBrowser for help on using the repository browser.