source: WorldVistAEHR/trunk/r/DSS_EXTRACTS-ECX/ECXP79PT.m@ 1261

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1ECXP79PT ;ALB/ESD - PATCH ECX*3.0*47 Post-Init Rtn ; 12/1/04 1:00pm
2 ;;3.0;DSS EXTRACTS;**79**;Dec 22, 1997
3 ;
4 ;Post-init routine to add new entries to:
5 ;
6 ; NATIONAL CLINIC file (#728.441)
7 ;
8 ;
9EN D POST1
10 Q
11 ;
12 ;
13POST1 ;- Add new entry to file 728.441
14 ; ECXREC is in format: code^short description
15 ;
16 ;
17 N ECXFDA,ECXERR,ECXCODE,ECXREC,I
18 D BMES^XPDUTL(">>> Adding entry to the NATIONAL CLINIC (#728.441) file...")
19 ;
20 ;- Get NATIONAL CLINIC record
21 F I=1:1 S ECXREC=$P($T(NATCLIN+I),";;",2) Q:ECXREC="QUIT" D
22 .;
23 .;- National Clinic code
24 .S ECXCODE=$P(ECXREC,"^")
25 .;
26 .;- Quit w/error message if entry already exists in file #728.441
27 .I $$FIND1^DIC(728.441,"","X",ECXCODE) D Q
28 ..D BMES^XPDUTL(">>>...."_ECXCODE_" "_$P(ECXREC,U,2)_" not added, entry already exists.")
29 ..D BMES^XPDUTL(">>> Delete entries and reinstall patch if entries were not created by a")
30 ..D MES^XPDUTL(">>> previous installation of this patch.")
31 .;
32 .;- Setup field values of new entry
33 .S ECXFDA(728.441,"+1,",.01)=ECXCODE
34 .S ECXFDA(728.441,"+1,",1)=$P(ECXREC,"^",2)
35 .;
36 .;- Add new entry to file #728.441
37 .D UPDATE^DIE("E","ECXFDA","","ECXERR")
38 .;
39 .I '$D(ECXERR) D BMES^XPDUTL(">>>...."_ECXCODE_" "_$P(ECXREC,U,2)_" added to file.")
40 .I $D(ECXERR) D BMES^XPDUTL(">>>....Unable to add "_ECXCODE_" "_$P(ECXREC,U,2)_" to file.")
41 ;
42 Q
43 ;
44NATCLIN ;- Contains the NATIONAL CLINIC entry to be added
45 ;;AGRP^A GROUP
46 ;;BGRP^B GROUP
47 ;;CGRP^C GROUP
48 ;;DGRP^D GROUP
49 ;;GRPA^GROUP A
50 ;;GRPB^GROUP B
51 ;;GRPC^GROUP C
52 ;;GRPD^GROUP D
53 ;;QUIT
Note: See TracBrowser for help on using the repository browser.