source: FOIAVistA/trunk/r/CONSULT_REQUEST_TRACKING-GMRC-GMRS-GMRT/GMRCYP42.m@ 811

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

initial load of FOIAVistA 6/30/08 version

File size: 4.7 KB
Line 
1GMRCYP42 ;ISP/TDP - PRE/POST INSTALL FOR GMRC*3*42; 3/9/2005
2 ;;3.0;CONSULT/REQUEST TRACKING;**42**;DEC 27, 1997
3ENV ;env check for service name conflict
4 N GMRCMSG,GMRCSVC,I
5 I $$PATCH^XPDUTL("GMRC*3.0*42") Q
6 K ^TMP("GMRCYP42",$J)
7 S GMRCSVC=0
8 F S GMRCSVC=$O(^GMR(123.5,GMRCSVC)) Q:'GMRCSVC D
9 . Q:'$D(^GMR(123.5,GMRCSVC,0))
10 . D CHK1235($P(^GMR(123.5,GMRCSVC,0),U))
11 I '$D(^TMP("GMRCYP42",$J)) D Q
12 . D BMES^XPDUTL("No conflicts with service being filed.")
13 D WARNING(.GMRCMSG),MES^XPDUTL(.GMRCMSG)
14 D BMES^XPDUTL(" ")
15 S I=0 F S I=$O(^TMP("GMRCYP42",$J,I)) Q:'I D
16 . D MES^XPDUTL(^TMP("GMRCYP42",$J,I,0))
17 K ^TMP("GMRCYP42",$J)
18 Q
19CHK1235(SERVNM) ;check service name against exact or possible conflicts
20 N X,Y
21 S X=SERVNM
22 X ^%ZOSF("UPPERCASE")
23 I Y="CARE COORDINATION HOME TELEHEALTH SCREENING" D MSG(SERVNM,0) Q
24 I Y["TELEHEALTH" D MSG(SERVNM,1) Q
25 I Y["TELE HEALTH" D MSG(SERVNM,1) Q
26 Q
27MSG(TEXT,FLG) ;write install message if exact or partial match
28 N MATCH,NEXT,MSG
29 S MATCH=$S(+FLG:" partially ",1:" exactly ")
30 S NEXT=$O(^TMP("GMRCYP42",$J,999),-1)+1
31 S MSG=TEXT_MATCH_"matches the service being imported."
32 S ^TMP("GMRCYP42",$J,NEXT,0)=MSG
33 Q
34WARNING(TXT) ;format warning statement for pre-install in case of conflicts
35 S TXT(1)=$$FMTE^XLFDT($$NOW^XLFDT)
36 S TXT(2)="This patch imports data for 1 service in the REQUEST SERVICES (#123.5) file."
37 S TXT(3)="If the service does not exist in your file, it will be created as a new"
38 S TXT(4)="entry. If the service does exist on your system, some fields of data will"
39 S TXT(5)="be overwritten."
40 ;S TXT(6)="(#1.01) PROVISIONAL DX PROMPT, (#1.02) PROVISIONAL DX INPUT, and "
41 ;S TXT(7)="(#124) DEFAULT REASON FOR REQUEST. "
42 S TXT(8)=" "
43 S TXT(9)="Following this warning message, there will be one or more lines that "
44 S TXT(10)="indicate that either an exact or partial match was found on your system."
45 S TXT(11)="It is highly recommended that the install be aborted at this time until the"
46 S TXT(12)="individual responsible for management of Consult/Request Tracking can "
47 S TXT(13)="review and verify that these changes will not adversely affect operations"
48 S TXT(14)="of the package."
49 Q
50 ;
51PRE ; load service into REQUEST SERVICES (#123.5) file
52 N I,SVC
53 D BMES^XPDUTL("Adding CARE COORDINATION HOME TELEHEALTH SCREENING as a new consult")
54 D MES^XPDUTL(" service in the REQUEST SERVICES (#123.5) file.")
55 S SVC=$$FIND1^DIC(123.5,,"QX","CARE COORDINATION HOME TELEHEALTH SCREENING")
56 I +SVC D EDIT(SVC)
57 I '+SVC D ADD
58 D BMES^XPDUTL("Pre-init complete.")
59 Q
60ADD ; add new REQUEST SERVICE
61 N DEFAULT,DIC,DXI,DXP,INTERNAL,OERR,PRINT,PROTOCOL,X
62 K DO
63 S DIC="^GMR(123.5,"
64 S DIC(0)="L"
65 S X="CARE COORDINATION HOME TELEHEALTH SCREENING"
66 S INTERNAL="CCHT SCREENING"
67 S PRINT="CCHT SC"
68 S DXP="O"
69 S DXI="L"
70 S DEFAULT="Initial Screening for Home Telehealth services."
71 S PROTOCOL="GMRCACTM SERVICE ACTION MENU"
72 S OERR="CONSULTS"
73 S DIC("DR")="11////"_INTERNAL_";1.11////"_PRINT_";2////9;1.01////"_DXP_";1.02////"_DXI_";124///"_DEFAULT_";1.03////0;1.1///"_PRINT_"RN;123.03///"_PROTOCOL_";123.01///"_OERR
74 D FILE^DICN
75 I Y<0 D Q
76 . D BMES^XPDUTL("CARE COORDINATION HOME TELEHEALTH SCREENING failed to be added to the")
77 . D MES^XPDUTL(" REQUEST SERVICES (#123.5) file. Follow the instructions in the patch")
78 . D MES^XPDUTL(" description for manually adding this service.")
79 K Y
80 Q
81 ;
82EDIT(SVIEN) ; edit existing REQUEST SERVICE
83 N DA,DEFAULT,DIE,DR,DXI,DXP,INTERNAL,OERR,PRINT,PROTOCOL,X
84 K DO
85 S DA=SVIEN
86 S DIE="^GMR(123.5,"
87 S INTERNAL="CCHT SCREENING"
88 S PRINT="CCHT SC"
89 S DXP="O"
90 S DXI="L"
91 S DEFAULT="Initial Screening for Home Telehealth services."
92 S PROTOCOL="GMRCACTM SERVICE ACTION MENU"
93 S OERR="CONSULTS"
94 S DR="11////"_INTERNAL_";1.11////"_PRINT_";2////9;1.01////"_DXP_";1.02////"_DXI_";124///"_DEFAULT_";1.03////0;I $D(^GMR(123.5,DA,2,""B"",""CCHT SCRN"")) S Y=123.03;1.1////"_PRINT_"RN;123.03///"_PROTOCOL_";123.01///"_OERR
95 D ^DIE
96 K Y
97 Q
98 ;
99POST ; load services into SUB-SERVICE SPECIALTY of ALL SERVICES
100 N SVC
101 D BMES^XPDUTL("Adding CARE COORDINATION HOME TELEHEALTH SCREENING as a sub-service")
102 D MES^XPDUTL(" to ALL SERVICES in the REQUEST SERVICES (#123.5) file.")
103 S SVC=$$FIND1^DIC(123.5,,"QX","CARE COORDINATION HOME TELEHEALTH SCREENING") I +SVC D SUB(SVC)
104 D BMES^XPDUTL("Post-init complete.")
105 Q
106SUB(SVIEN) ; add as sub of ALL SERVICES
107 I $D(^GMR(123.5,"APC",SVIEN)) Q
108 N DIC,DA,X
109 K DO
110 S DA(1)=1
111 S DIC="^GMR(123.5,"_DA(1)_",10,"
112 S DIC(0)="L"
113 S X=SVIEN Q:'$L(X)
114 D FILE^DICN
115 I Y<0 D
116 . D BMES^XPDUTL("CARE COORDINATION HOME TELEHEALTH SCREENING failed to be added as a")
117 . D MES^XPDUTL(" sub-service to ALL SERVICES in the REQUEST SERVICES (#123.5) file.")
118 . D MES^XPDUTL(" Follow the instructions in the patch description for manually adding")
119 . D MES^XPDUTL(" this sub-service.")
120 Q
Note: See TracBrowser for help on using the repository browser.