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

ECX3P171.m

Go to the documentation of this file.
  1. ECX3P171 ;MNT/DTA - NATIONAL CLINIC (#728.441) File Update;04/25/18
  1. ;;3.0;DSS EXTRACTS;**171**;Dec 22, 1997;Build 7
  1. ;
  1. ;Post-init routine adding and updating entries in
  1. ;the NATIONAL CLINIC (#728.441) file
  1. ;
  1. Q
  1. ;
  1. EN ;routine entry point
  1. D ADDNEW ;add new entries
  1. D UPDATE ;change short description of existing clinic codes
  1. D BMES^XPDUTL("Update complete")
  1. ;
  1. Q
  1. ;
  1. ADDNEW ;Add new entries to file 728.441
  1. ;ECXREC is in format: code^short description
  1. ;
  1. N ECXFDA,ECXCODE,ECXREC,ECXI,ECXERR
  1. ;
  1. D BMES^XPDUTL(">>>Adding entries to the NATIONAL CLINIC (728.441) file..")
  1. ;
  1. ;-get National Clinic record
  1. F ECXI=1:1 S ECXREC=$P($T(ADDCLIN+ECXI),";;",2) Q:ECXREC="QUIT" D
  1. .;
  1. .;-get 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, code already exists.")
  1. ..D BMES^XPDUTL("*** Please contact support for assistance. ***")
  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_" to the file.") D
  1. ..D BMES^XPDUTL("*** Please contact support for assistance. ***")
  1. ;
  1. Q
  1. ;
  1. UPDATE ;changing short description of existing entries
  1. ;ECXREC is in format: code^short description
  1. ;
  1. N ECXCODE,ECXDESC,ECXIEN,DIE,DA,DR,ECXI,ECXREC,ECXERR
  1. ;
  1. D BMES^XPDUTL(">>>Updating entries in the NATIONAL CLINIC (728.441) file..")
  1. ;
  1. F ECXI=1:1 S ECXREC=$P($T(UPDCLIN+ECXI),";;",2) Q:ECXREC="QUIT" D
  1. .S ECXCODE=$P(ECXREC,"^"),ECXDESC=$P(ECXREC,"^",2)
  1. .S ECXIEN=$$FIND1^DIC(728.441,"","X",ECXCODE,"","","ECXERR")
  1. .I 'ECXIEN D Q
  1. ..D BMES^XPDUTL(">>>....Unable to find code: "_ECXCODE_".")
  1. ..D BMES^XPDUTL("*** Please contact support for assistance. ***")
  1. .N ECXFDA1
  1. .S ECXFDA1(728.441,ECXIEN_",",1)=ECXDESC
  1. .D FILE^DIE(,"ECXFDA1","ECXERR")
  1. .I '$D(ECXERR) D BMES^XPDUTL(">>>...."_ECXCODE_" - "_$P(ECXREC,U,2)_" updated")
  1. .I $D(ECXERR) D BMES^XPDUTL(">>>....Unable to update code "_ECXCODE_".") D
  1. ..D BMES^XPDUTL("*** Please contact support for assistance. ***")
  1. ;
  1. Q
  1. ;
  1. ADDCLIN ;Contains the NATIONAL CLINIC entries to be added
  1. ;;CCSM^Chronic Condition Self-Management Group
  1. ;;ENDP^Endocrinology Pharmacist
  1. ;;GASP^Gastroenterology Pharmacist
  1. ;;GWFU^Gateway to Healthy Living - Follow-up
  1. ;;GWGR^Gateway to Healthy Living - Group
  1. ;;HBCG^Health Behavior Counseling Group
  1. ;;HBCI^Health Behavior Counseling Indiv
  1. ;;HIHP^Hospital in Home Pharmacist
  1. ;;MHIP^Pri Care MH Integration Pharmacist
  1. ;;NEPP^Nephrology Pharmacist
  1. ;;POPP^Population Management Pharmacist
  1. ;;RESP^Research Pharmacist
  1. ;;SUDP^Substance Use Disorder Pharmacist
  1. ;;TOCP^Transitions of Care Pharmacist
  1. ;;TRAP^Transplant Pharmacist
  1. ;;QUIT
  1. ;
  1. UPDCLIN ;Contains the NATIONAL CLINIC entry description to be updated
  1. ;;DEMT^Telederm App Used
  1. ;;HTAC^Whole Health Partner Group
  1. ;;HTFC^Whole Health Partner Indiv
  1. ;;PDRC^Telecare NP
  1. ;;PDTC^Telecare PA
  1. ;;PDVC^Telecare MD/DO
  1. ;;RHQC^Rehab Rural Telehealth
  1. ;;WCDC^Whole Health Coaching Group
  1. ;;WCHC^Whole Health Coaching Indiv
  1. ;;QUIT