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

ECX133PT.m

Go to the documentation of this file.
  1. ECX133PT ;ALB/BP - PATCH ECX*3.0*133 Post-Init Rtn ; 11/24/09 2:11pm
  1. ;;3.0;DSS EXTRACTS;**133**;Dec 22, 1997;Build 6
  1. ;
  1. ;Post-init routine to add new entries to:
  1. ;
  1. ; NATIONAL CLINIC file (#728.441)
  1. ;
  1. ;
  1. Q
  1. EN D POST1 ;Add new Clinic codes
  1. D POST2 ;Change short description of existing clinic code
  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. POST2 ;
  1. N ECXCODE,ECXDESC,ECXIEN,DIE,DA,DR
  1. S ECXCODE="CGRP",ECXDESC="Caregiver Support Program"
  1. S ECXIEN=$$FIND1^DIC(728.441,"","X",ECXCODE,"","","ERR")
  1. S DIE="^ECX(728.441,",DA=ECXIEN,DR="1///^S X=ECXDESC"
  1. D ^DIE
  1. ;
  1. NATCLIN ;- Contains the NATIONAL CLINIC entry to be added
  1. ;;CCPH^Critical Care Pharmacist
  1. ;;CDED^Cardiac Disease Education (CHF, etc)
  1. ;;CRRC^Cardiovascular Risk Reduction Pharmacist
  1. ;;DRPH^Dermatology Pharmacist
  1. ;;EDPH^Emergency Department Pharmacist
  1. ;;ESPH^ESA Pharmacist
  1. ;;HEPC^Hepatitis C Pharmacist
  1. ;;HIVD^HIV Pharmacist
  1. ;;IMPH^Internal Medicine Pharmacist
  1. ;;MREC^Medication Reconciliation Pharmacist
  1. ;;MTMP^Medication Therapy Management Pharmacist
  1. ;;NEUR^Neurology Pharmacist
  1. ;;NFPA^Non-Formulary/Prior Approval Pharmacist
  1. ;;NSPH^Nutritional Support Pharmacist
  1. ;;NUCL^Nuclear Medicine Pharmacist
  1. ;;ONCO^Oncology Pharmacist
  1. ;;OPTH^Ophthalmology Pharmacist
  1. ;;PACP^Patient Aligned Care Team Pharmacist
  1. ;;PACT^Patient Aligned Care Team
  1. ;;PGEN^Pharmacogenomics Pharmacist
  1. ;;PKPH^Pharmacokinetics Pharmacist
  1. ;;PTPH^Polytrauma Pharmacist
  1. ;;RHUM^Rheumatology Pharmacist
  1. ;;SPCH^Specialty Care Pharmacist
  1. ;;SUPH^Surgery/Anesthesia/OR Pharmacist
  1. ;;WMPH^Women's Health Pharmacist
  1. ;;QUIT