source: WorldVistAEHR/trunk/r/DSS_EXTRACTS-ECX/ECX386PT.m@ 1679

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

initial load of WorldVistAEHR

File size: 1.6 KB
RevLine 
[613]1ECX386PT ;ALB/JAM - PATCH ECX*3.0*86 Post-Init Rtn ; 07/13/05
2 ;;3.0;DSS EXTRACTS;**86**;Dec 22, 1997
3 ;
4 ;Post-init routine to add new entries to:
5 ; NATIONAL CLINIC file (#728.441)
6 ;
7EN ;
8 ;- Add new entry to file 728.441
9 ; ECXREC is in format: code^short description
10 ;
11 ;
12 N ECXFDA,ECXERR,ECXCODE,ECXREC,I,CNT0,CNT1
13 D BMES^XPDUTL(">>> Adding entry to the NATIONAL CLINIC (#728.441) file...")
14 D MES^XPDUTL(" ")
15 S (CNT0,CNT1)=0
16 ;
17 ;- Get NATIONAL CLINIC record
18 F I=1:1 S ECXREC=$P($T(NATCLIN+I),";;",2) Q:ECXREC="QUIT" D
19 .;
20 .;- National Clinic code
21 .S ECXCODE=$P(ECXREC,"^")
22 .;
23 .;- Quit w/error message if entry already exists in file #728.441
24 .I $$FIND1^DIC(728.441,"","X",ECXCODE) D Q
25 ..D BMES^XPDUTL(">>>...."_ECXCODE_" "_$P(ECXREC,U,2)_" not added, entry already exists.")
26 ..S CNT1=CNT1+1
27 .;- Setup field values of new entry
28 .S ECXFDA(728.441,"+1,",.01)=ECXCODE
29 .S ECXFDA(728.441,"+1,",1)=$P(ECXREC,"^",2)
30 .;
31 .;- Add new entry to file #728.441
32 .D UPDATE^DIE("E","ECXFDA","","ECXERR")
33 .;
34 .I '$D(ECXERR) D Q
35 ..D BMES^XPDUTL(">>>...."_ECXCODE_" "_$P(ECXREC,U,2)_" added to file.")
36 ..S CNT0=CNT0+1
37 .D BMES^XPDUTL(">>>....Unable to add "_ECXCODE_" "_$P(ECXREC,U,2)_" to file.")
38 .S CNT1=CNT1+1
39 D MES^XPDUTL(" ")
40 D MES^XPDUTL(" Done... Update to NATIONAL CLINIC File (#728.441).")
41 D MES^XPDUTL(" "_$J(CNT0,3)_" new entries added.")
42 D MES^XPDUTL(" "_$J(CNT1,3)_" were not added, already exist.")
43 D MES^XPDUTL(" ")
44 ;
45 Q
46 ;
47NATCLIN ;- Contains the NATIONAL CLINIC entry to be added
48 ;;MICM^MH INTENSIVE CASE MGMT
49 ;;QUIT
Note: See TracBrowser for help on using the repository browser.