Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ECXP97PT

ECXP97PT.m

Go to the documentation of this file.
  1. ECXP97PT ;ALB/ESD - PATCH ECX*3.0*47 Post-Init Rtn ; 07/26/06 1:00pm
  1. ;;3.0;DSS EXTRACTS;**97**;Dec 22, 1997
  1. ;
  1. ;Post-init routine to add new entries to:
  1. ;
  1. ; NATIONAL CLINIC file (#728.441)
  1. ;
  1. ;
  1. EN D POST1
  1. Q
  1. ;
  1. ;
  1. POST1 ;- Add new entry to file 728.441
  1. ; ECXREC is in format: code^short description
  1. ;
  1. ;
  1. N ECXFDA,ECXERR,ECXCODE,ECXREC,I
  1. D BMES^XPDUTL(">>> Adding entry to the NATIONAL CLINIC (#728.441) file...")
  1. ;
  1. ;- Get NATIONAL CLINIC record
  1. F I=1:1 S ECXREC=$P($T(NATCLIN+I),";;",2) Q:ECXREC="QUIT" D
  1. .;
  1. .;- National Clinic code
  1. .S ECXCODE=$P(ECXREC,"^")
  1. .;
  1. .;- Quit w/error message if entry already exists in file #728.441
  1. .I $$FIND1^DIC(728.441,"","X",ECXCODE) D Q
  1. ..D BMES^XPDUTL(">>>...."_ECXCODE_" "_$P(ECXREC,U,2)_" not added, entry already exists.")
  1. ..D BMES^XPDUTL(">>> Delete entries and reinstall patch if entries were not created by a")
  1. ..D MES^XPDUTL(">>> previous installation of this patch.")
  1. .;
  1. .;- Setup field values of new entry
  1. .S ECXFDA(728.441,"+1,",.01)=ECXCODE
  1. .S ECXFDA(728.441,"+1,",1)=$P(ECXREC,"^",2)
  1. .;
  1. .;- Add new entry to file #728.441
  1. .D UPDATE^DIE("E","ECXFDA","","ECXERR")
  1. .;
  1. .I '$D(ECXERR) D BMES^XPDUTL(">>>...."_ECXCODE_" "_$P(ECXREC,U,2)_" added to file.")
  1. .I $D(ECXERR) D BMES^XPDUTL(">>>....Unable to add "_ECXCODE_" "_$P(ECXREC,U,2)_" to file.")
  1. ;
  1. Q
  1. ;
  1. NATCLIN ;- Contains the NATIONAL CLINIC entry to be added
  1. ;;PLCH^PALLIATIVE CHAPLAIN
  1. ;;LIPD^LIPID
  1. ;;QUIT