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

PXP211I.m

Go to the documentation of this file.
  1. PXP211I ;SLC/PKR - Init routine for PX*1.0*211 ;08/27/2020
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**211**;Aug 12, 1996;Build 454
  1. ;======================
  1. ADDDS ;Add entries to PCE DATA SOURCE.
  1. I $O(^PX(839.7,"B","PCE CODE MAPPING",0))>0 Q
  1. N FDA,MSG,WPTMP
  1. S WPTMP(1)="Entry of standard codes as a result of code mapping."
  1. S FDA(839.7,"+1,",.01)="PCE CODE MAPPING"
  1. S FDA(839.7,"+1,",101)="WPTMP"
  1. D UPDATE^DIE("","FDA","","MSG")
  1. Q
  1. ;
  1. ;======================
  1. BINDEX ;Make sure the "B" index matches what is in the .01, for Education
  1. ;Topics, Exams, and Health Factors.
  1. N BNAME,IEN,NAME
  1. D BMES^XPDUTL("Checking B indexes.")
  1. ;
  1. D BMES^XPDUTL("Checking Education Topics.")
  1. S BNAME=""
  1. F S BNAME=$O(^AUTTEDT("B",BNAME)) Q:BNAME="" D
  1. . S IEN=$O(^AUTTEDT("B",BNAME,""))
  1. . S NAME=$P($G(^AUTTEDT(IEN,0)),U,1)
  1. . I BNAME=NAME Q
  1. . D BMES^XPDUTL("Setting B index for Education Topic: "_NAME)
  1. . K ^AUTTEDT("B",BNAME)
  1. . S ^AUTTEDT("B",NAME,IEN)=""
  1. ;
  1. D BMES^XPDUTL("Checking Exams.")
  1. S BNAME=""
  1. F S BNAME=$O(^AUTTEXAM("B",BNAME)) Q:BNAME="" D
  1. . S IEN=$O(^AUTTEXAM("B",BNAME,""))
  1. . S NAME=$P($G(^AUTTEXAM(IEN,0)),U,1)
  1. . I BNAME=NAME Q
  1. . D BMES^XPDUTL("Setting B index for Exam: "_NAME)
  1. . K ^AUTTEXAM("B",BNAME)
  1. . S ^AUTTEXAM("B",NAME,IEN)=""
  1. ;
  1. D BMES^XPDUTL("Checking Health Factors.")
  1. S BNAME=""
  1. F S BNAME=$O(^AUTTHF("B",BNAME)) Q:BNAME="" D
  1. . S IEN=$O(^AUTTHF("B",BNAME,""))
  1. . S NAME=$P($G(^AUTTHF(IEN,0)),U,1)
  1. . I BNAME=NAME Q
  1. . D BMES^XPDUTL("Setting B index for Health Factor: "_NAME)
  1. . K ^AUTTHF("B",BNAME)
  1. . S ^AUTTHF("B",NAME,IEN)=""
  1. Q
  1. ;
  1. ;======================
  1. DSB ;Redo the PCE Data Source "B" index so it is the full length.
  1. D BMES^XPDUTL("Creating full length 'B' index PCE Data Source.")
  1. ;Kill the old "B" index.
  1. K ^PX(839.7,"B")
  1. N DIK
  1. S DIK="^PX(839.7,",DIK(1)=".01^B"
  1. D ENALL^DIK
  1. Q
  1. ;
  1. ;======================
  1. GENPNAME ;For any entry missing a print names generate one.
  1. N IEN,IENS,FDA,MSG,NAME,PNAME,REPA,TNAME
  1. D HFREPA(.REPA)
  1. D BMES^XPDUTL("Generating Print Names for entries that do not have one.")
  1. ;
  1. D BMES^XPDUTL("Checking Education Topics.")
  1. S NAME=""
  1. F S NAME=$O(^AUTTEDT("B",NAME)) Q:NAME="" D
  1. . S IEN=$O(^AUTTEDT("B",NAME,""))
  1. . S PNAME=$P($G(^AUTTEDT(IEN,0)),U,4)
  1. . I PNAME'="" Q
  1. . K FDA,MSG
  1. . S IENS=IEN_","
  1. . S TNAME=$S($E(NAME,1,2)="ZZ":$E(NAME,3,99),1:NAME)
  1. . S PNAME=$$HFPNAME(TNAME,.REPA)
  1. . S FDA(9999999.09,IENS,.04)=PNAME
  1. . D BMES^XPDUTL("Setting Print Name for Education Topic: "_NAME)
  1. . D MES^XPDUTL("Print Name: "_PNAME)
  1. . D FILE^DIE("ET","FDA","MSG")
  1. ;
  1. D BMES^XPDUTL("Checking Exams.")
  1. S NAME=""
  1. F S NAME=$O(^AUTTEXAM("B",NAME)) Q:NAME="" D
  1. . S IEN=$O(^AUTTEXAM("B",NAME,""))
  1. . S PNAME=$P($G(^AUTTEXAM(IEN,200)),U,1)
  1. . I PNAME'="" Q
  1. . K FDA,MSG
  1. . S IENS=IEN_","
  1. . S TNAME=$S($E(NAME,1,2)="ZZ":$E(NAME,3,99),1:NAME)
  1. . S PNAME=$$HFPNAME(TNAME,.REPA)
  1. . S FDA(9999999.15,IENS,200)=PNAME
  1. . D BMES^XPDUTL("Setting Print Name for Exam: "_NAME)
  1. . D MES^XPDUTL("Print Name: "_PNAME)
  1. . D FILE^DIE("ET","FDA","MSG")
  1. ;
  1. D BMES^XPDUTL("Checking Health Factors.")
  1. S NAME=""
  1. F S NAME=$O(^AUTTHF("B",NAME)) Q:(NAME="") D
  1. . S IEN=$O(^AUTTHF("B",NAME,""))
  1. . S PNAME=$P($G(^AUTTHF(IEN,200)),U,1)
  1. . I PNAME'="" Q
  1. . K FDA,MSG
  1. . S IENS=IEN_","
  1. . S TNAME=$S($E(NAME,1,2)="ZZ":$E(NAME,3,99),1:NAME)
  1. . S PNAME=$$HFPNAME(TNAME,.REPA)
  1. . S FDA(9999999.64,IENS,200)=PNAME
  1. . D BMES^XPDUTL("Setting Print Name for Health Factor: "_NAME)
  1. . D MES^XPDUTL("Print Name: "_PNAME)
  1. . D FILE^DIE("ET","FDA","MSG")
  1. Q
  1. ;
  1. ;======================
  1. HFCAT ;Append "[C]" to the .01 of all category factors.
  1. N CNAME,CNAMEIEN,IEN,LEN,L3C,NAME,NRPT,REPOINT
  1. D BMES^XPDUTL("Appending [C] to the .01 of all category health factors.")
  1. S IEN="",NRPT=0
  1. F S IEN=+$O(^AUTTHF("AD","C",IEN)) Q:IEN=0 D
  1. . S NAME=$P(^AUTTHF(IEN,0),U,1)
  1. . S LEN=$L(NAME),L3C=$E(NAME,(LEN-2),LEN)
  1. . I L3C="[C]" Q
  1. . S CNAME=NAME_" [C]"
  1. .;Does CNAME already exist?
  1. . S CNAMEIEN=+$$FIND1^DIC(9999999.64,"","BXU",CNAME)
  1. . I CNAMEIEN>0 D Q
  1. .. W !!,"CNAME AND NAME BOTH EXIST"
  1. .. W !,"NAME=",NAME," IEN=",IEN
  1. .. W !,"CNAME=",CNAME," CNAMEIEN=",CNAMEIEN
  1. ..;Keep the entry with the lowest IEN.
  1. .. S NRPT=NRPT+1
  1. .. I IEN<CNAMEIEN S REPOINT(NRPT)=CNAMEIEN_U_IEN
  1. .. E S REPOINT(NRPT)=IEN_U_CNAMEIEN
  1. . D RENAME^PXUTIL(9999999.64,NAME,CNAME)
  1. Q
  1. ;
  1. ;======================
  1. HFPNAME(NAME,REPA) ;Turn name into a print name for health factors.
  1. N CF,CHAR,CP,PNAME,ONC
  1. I $E(NAME,1,3)="VA-" S PNAME=$E(NAME,4,99)
  1. E S PNAME=NAME
  1. S ONC=0
  1. I $E(NAME,1,3)="ONC" S ONC=1
  1. I 'ONC S PNAME=$$TITLE^XLFSTR(PNAME)
  1. S PNAME=$$REPLACE^XLFSTR(PNAME,.REPA)
  1. ;Make sure characters following those below are uppercase.
  1. F CHAR="-","/","\" D
  1. . S CP=0
  1. . F S CP=$F(PNAME,CHAR,CP) Q:CP=0 D
  1. .. S CF=$E(PNAME,CP)
  1. .. S $E(PNAME,CP)=$$UP^XLFSTR(CF)
  1. Q PNAME
  1. ;
  1. ;======================
  1. HFREPA(REPA) ;Establish the replacements for health factor print names.
  1. ;AH health factors
  1. S REPA("Abn ")="ABN ",REPA("Abg")="ABG"
  1. S REPA("Ah-bpr")="Airborne Hazard Burn Pit Registry"
  1. S REPA(" Cbc")=" CBC",REPA(" Cc")=" CC"
  1. S REPA(" Ent ")=" ENT ",REPA("/onc")="/ONC"
  1. ;
  1. ;ARCH health factors
  1. S REPA("Arch")="ARCH"
  1. S REPA("-no")="-No",REPA("-service")="-Service"
  1. ;
  1. ;CGA health factors
  1. S REPA("Cg ")="CG ",REPA("Cga ")="Caregiver Annual Assessment "
  1. S REPA(" Pc")=" PC"
  1. S REPA("W/out")="W/OUT",REPA("Zbi ")="ZBI "
  1. ;
  1. ;CGF health factors
  1. S REPA("Cgf")="Caregiver 90 Day Monitoring Assessments"
  1. S REPA(" Cvt")=" CVT",REPA(" Mh")=" MH"
  1. ;
  1. ;CGI health factors
  1. S REPA("Cgi")="Caregiver Initial Assessment"
  1. ;
  1. ;CGINT health factors
  1. S REPA("Cgint")="Caregiver Interim Assessment"
  1. ;
  1. ;Ebola health factors
  1. S REPA("W/o")="W/O"
  1. ;
  1. ;ECOE health factors
  1. S REPA("Aed ")="AED ",REPA("Aeds")="AEDS"
  1. S REPA("Ecoe")="Epilepsy Center Of Excellence"
  1. S REPA("Eeg ")="EEG ",REPA("Mh ")="MH ",REPA("Mri ")="MRI "
  1. S REPA("Pet ")="PET ",REPA("Qolie")="QOLIE"
  1. S REPA("Tbi")="TBI",REPA("Vid ")="VID ",REPA("Vns")="VNS"
  1. S REPA("Wada")="WADA"
  1. ;
  1. ;Embedded Fragments
  1. S REPA("Ef-")="Embedded Fragments-",REPA("-ied")="-IED"
  1. S REPA("rpg")="RPG"
  1. ;
  1. ;GEC health factors
  1. S REPA("Adl")="ADL",REPA("bipap")="BIPAP",REPA("Cpap")="CPAP"
  1. S REPA("Dpoa ")="DPOA ",REPA("Iadl")="IADL",REPA("Iv ")="IV "
  1. S REPA("Fx")="FX",REPA("Gec")="Geriatric Extended Care"
  1. S REPA("Geri ")="GERI "
  1. S REPA("-medicaid")="-Medicaid",REPA("-medicare")="-Medicare"
  1. S REPA("Nhcu")="NHCU",REPA("Pt-")="PT-",REPA("/pt")="/PT"
  1. S REPA("Pt/ot")="PT/OT",REPA("t+/-30d")="T+/-30D",REPA("Tx-")="TX-"
  1. S REPA("-va")="-VA",REPA("Va ")="VA ",REPA("-yes")="-Yes"
  1. S REPA("Wc ")="WC "
  1. ;
  1. ;Hepatitis C Virus
  1. S REPA("-hcv")="-Hepatitis C Virus",REPA("Hcv")="Hepatitis C Virus"
  1. S REPA("Hiv")="HIV"
  1. ;
  1. ;Miscellaneous
  1. S REPA("Aaa")="AAA",REPA("AAa")="AAA",REPA("Abd ")="ABD "
  1. S REPA("Acwy")="ACWY"
  1. S REPA("Cm")="cm",REPA("Fobt")="FOBT",REPA("Hpv")="HPV"
  1. S REPA("Ihd")="IHD",REPA("-mh")="-MH",REPA("Md ")="MD "
  1. S REPA("Oef")="OEF",REPA("/oif")="/OIF",REPA("Oif")="OIF"
  1. S REPA("Na ")="NA ",REPA("Tb ")="TB ",REPA("Zzmh")="ZZMH"
  1. ;
  1. ;MH health factors
  1. S REPA("2Nd")="2nd",REPA("3Rd")="3rd"
  1. S REPA("Act ")="ACT ",REPA("Bft ")="BFT "
  1. S REPA("Cbt-i")="CBT-I",REPA("Cbt-d")="CBT-D",REPA("Cog ")="COG "
  1. S REPA("Cpt ")="CPT ",REPA("Cqs")="CQS"
  1. S REPA("Dbas ")="DBAS ",REPA("Ebp ")="EBP ",REPA("Ibct ")="IBCT "
  1. S REPA("Ipt ")="IPT ",REPA("Isi ")="ISI ",REPA("Mh ")="MH "
  1. S REPA("Mst")="MST",REPA("Pct ")="PCT "
  1. S REPA("Pei ")="PEI ",REPA("Phq9")="PHQ-9",REPA("Q&a")="Q&A"
  1. S REPA("Snq ")="SNQ ",REPA(" Ssn")=" SSN",REPA("Sst")="SST"
  1. S REPA("Waso")="WASO"
  1. ;
  1. ;ONC health factors
  1. S REPA("Ecog")="ECOG",REPA("ONC ")="Oncology ",REPA("(Onc) ")=""
  1. S REPA("Onc Pca")="ONC PCA"
  1. S REPA("Pca")="PCA",REPA("Sob")="SOB",REPA("Vsas")="VSAS"
  1. ;
  1. ;ONS health factors
  1. S REPA("Aa ")="AA ",REPA("amb ")="AMB ",REPA("Amb ")="AMB "
  1. S REPA("Cant")="Can't",REPA("Ca/tbi")="CA/TBI",REPA("Cv ")="CV "
  1. S REPA("Etoh")="ETOH",REPA("Fr ")="FR ",REPA(" Gi")=" GI"
  1. S REPA("Gi ")="GI "
  1. S REPA("Gu ")="GU ",REPA("hn ")="HN ",REPA("Hob ")="Head of Bed "
  1. S REPA("hob")="Head of Bed",REPA("Ic ")="IC ",REPA("Id-")="ID-"
  1. S REPA(" Ii")=" II",REPA(" Iii")=" III",REPA("Iv ")="IV "
  1. S REPA("Ldl")="LDL"
  1. S REPA("Mrsa")="MRSA",REPA("Ms ")="MS ",REPA("Ntf")="NTF"
  1. S REPA("Ons ")="ONS "
  1. S REPA(" Oob")=" OOB",REPA("Pf ")="PF "
  1. S REPA("Pu ")="Pressure Ulcer "
  1. S REPA("Q2h")="Q2H",REPA("Ra ")="RA "
  1. S REPA(" Rn")=" RN",REPA(" Tv")=" TV"
  1. ;
  1. ;PTSD health factors
  1. S REPA("Ptsd")="PTSD"
  1. ;
  1. ;TBI health factors
  1. S REPA(" Ii")=" II",REPA(" Iii")=" III",REPA(" Iv")=" IV"
  1. S REPA("-pt")="-Pt"
  1. ;
  1. ;TDI health factors
  1. S REPA("Tdi")="Telederm Imager",REPA("Tdr")="Telederm Reader"
  1. ;
  1. ;TDR health factors
  1. S REPA("Pcc")="PCC"
  1. ;
  1. ;VANOD health factors
  1. S REPA("Vanod")="VANOD"
  1. ;
  1. ;VC health factors
  1. S REPA("Vc ")="Veteran's Choice "
  1. ;
  1. ;WH health factors
  1. S REPA("F/u")="F/U",REPA(" Hf")=" HF",REPA("le<")="LE<"
  1. S REPA("N/a")="N/A",REPA("Wh ")="Women's Health ",REPA("Zzwh")="ZZWH"
  1. Q
  1. ;
  1. ;======================
  1. MVTREAT ;Move Treatment from sequence 13 to 15 on PXCE ADD/EDIT MENU.
  1. N IENM,IENT,IND
  1. S IENM=$$FIND1^DIC(101,"","BX","PXCE ADD/EDIT MENU")
  1. I IENM="" D Q
  1. . D BMES^XPDUTL("The PXCE ADD/EDIT MENU does not exist.")
  1. S IENT=$$FIND1^DIC(101,"","BX","PXCE TREATMENT ADD")
  1. I IENT="" D Q
  1. . D BMES^XPDUTL("PXCE TREATMENT ADD does not exist.")
  1. S IND=$O(^ORD(101,IENM,10,"B",IENT,""))
  1. I IND="" Q
  1. S $P(^ORD(101,IENM,10,IND,0),U,3)=15
  1. Q
  1. ;
  1. ;======================
  1. PRE ;Pre-init
  1. D BINDEX
  1. D RMOLDDDS
  1. D MVTREAT
  1. Q
  1. ;
  1. ;======================
  1. POST ;Post-init
  1. D ADDDS^PXP211I
  1. D SETCLASS^PXP211I
  1. D GENPNAME^PXP211I
  1. D UPCNAME^PXP211I
  1. D HFCAT^PXP211I
  1. D VSCITASK^PXP211I
  1. D DSB^PXP211I
  1. D PROVNARB^PXP211I
  1. D RBLDBI^PXP211I
  1. D RMNCTE^PXP211I
  1. ;HMP has been decomissioned so remove this protocol.
  1. N RESULT
  1. S RESULT=$$DELETE^XPDPROT("PXK VISIT DATA EVENT","HMP PCE EVENTS")
  1. D SDPCE^PXP211I
  1. D RMPNSCREEN
  1. D TASKBOTH^PXPNARR
  1. Q
  1. ;
  1. ;======================
  1. PROVNARB ;Redo the Provider Narrative "B" index so it is the full
  1. ;length.
  1. ;First determine if the new full-length "B" index is already in place.
  1. N LEN,MAXLEN,NAME
  1. S MAXLEN=0,NAME=""
  1. F S NAME=$O(^AUTNPOV("B",NAME)) Q:(MAXLEN>30)!(NAME="") D
  1. . S LEN=$L(NAME)
  1. . I LEN>MAXLEN S MAXLEN=LEN
  1. I MAXLEN>30 Q
  1. ;
  1. D BMES^XPDUTL("Creating new full length 'B' index for Provider Narrative.")
  1. ;Kill the old "B" index.
  1. K ^AUTNPOV("B")
  1. N DIK
  1. S DIK="^AUTNPOV(",DIK(1)=".01^B"
  1. D ENALL^DIK
  1. Q
  1. ;
  1. ;======================
  1. RBLDBI ;Make sure the is only one "B" index for PCE Data Source and
  1. ;Education Topics.
  1. N DIK
  1. K ^AUTTEDT("B")
  1. S DIK="^AUTTEDT(",DIK(1)=".01^B"
  1. D ENALL^DIK
  1. K ^PX(839.7,"B")
  1. S DIK="^PX(839.7,",DIK(1)=".01^B"
  1. D ENALL^DIK
  1. Q
  1. ;
  1. ;======================
  1. RMNCTE ;Remove the national class entries that were created for testing.
  1. D DELTLFE^PXUTIL(9999999.09,"VA-NATIONAL CLASS TEST")
  1. D DELTLFE^PXUTIL(9999999.15,"VA-NATIONAL CLASS TEST")
  1. D DELTLFE^PXUTIL(9999999.64,"VA-NATIONAL CLASS TEST")
  1. Q
  1. ;
  1. ;======================
  1. RMOLDDDS ;Remove old data dictionaries.
  1. N DIU,TEXT
  1. D BMES^XPDUTL("Removing old data dictionaries.")
  1. S DIU(0)=""
  1. F DIU=815,839.7,9000010,9000010.07,9000010.11,9000010.12,9000010.13,9000010.16,9000010.18,9000010.23,9000010.71,9999999.09,9999999.15,9999999.27,9999999.64 D
  1. . S TEXT=" Deleting data dictionary for file # "_DIU
  1. . D MES^XPDUTL(TEXT)
  1. . D EN^DIU2
  1. Q
  1. ;
  1. ;======================
  1. RMPNSCREEN ;Remove the incorrect Provider Narrative screens.
  1. ;ICR #6256
  1. ;V CPT
  1. K ^DD(9000010.18,.04,12)
  1. K ^DD(9000010.18,.04,12.1)
  1. ;V POV
  1. K ^DD(9000010.07,.04,12)
  1. K ^DD(9000010.07,.04,12.1)
  1. Q
  1. ;
  1. ;======================
  1. SDPCE ;Edit the Description and Entry Action of the protocol SDAM PCE EVENT.
  1. ;ICR #7110.
  1. N FDA,IEN,IENS,MSG,WPTMP
  1. S IEN=+$$FIND1^DIC(101,"","","SDAM PCE EVENT","","","MSG")
  1. I IEN=0 Q
  1. S WPTMP(1)="This protocol is the event handler attached to the PXK VISIT DATA EVENT protocol."
  1. S WPTMP(2)=""
  1. S WPTMP(3)="The protocol processes scheduled appointment check out data made available by this PCE event point. PCE currently obtains this check out data from MCCR data capture pilots and also a manual entry module within the PCE package."
  1. S WPTMP(4)=""
  1. S WPTMP(5)="To allow processing of the other items attached to PXK VISIT DATA EVENT as a TaskMan job, the call to EN^SDPCE was moved to EVENT^PXKMAIN in patch PX*1*211."
  1. S IENS=IEN_","
  1. S FDA(101,IENS,3.5)="WPTMP"
  1. S FDA(101,IENS,20)=";D EN^SDPCE"
  1. D FILE^DIE("","FDA","MSG")
  1. Q
  1. ;
  1. ;======================
  1. SETCLASS ;Until a decision on national entries has been made make everything
  1. ;local.
  1. N CLASS,FDA,IEN,IENS,IND,MSG,NAME
  1. D BMES^XPDUTL("Setting undefined Education Topic Class fields.")
  1. S NAME=""
  1. F S NAME=$O(^AUTTEDT("B",NAME)) Q:NAME="" D
  1. . I NAME="VA-NATIONAL CLASS TEST" Q
  1. . S IEN=$O(^AUTTEDT("B",NAME,""))
  1. . D MES^XPDUTL(" Setting the Class of Education Topic: "_NAME_" to LOCAL.")
  1. . K FDA,MSG
  1. . S IENS=IEN_","
  1. .;Remove "VA-" from any non-national entries.
  1. . ;I $E(NAME,1,3)="VA-" S FDA(9999999.09,IENS,.01)=$E(NAME,4,99)
  1. . S FDA(9999999.09,IENS,100)="L"
  1. . D FILE^DIE("ET","FDA","MSG")
  1. ;
  1. ;Make all Exam entries local and if the name starts with "VA-"
  1. ;remove it.
  1. D BMES^XPDUTL("Setting all Exam Class fields to LOCAL.")
  1. S NAME=""
  1. F S NAME=$O(^AUTTEXAM("B",NAME)) Q:NAME="" D
  1. . I NAME="VA-NATIONAL CLASS TEST" Q
  1. . S IEN=$O(^AUTTEXAM("B",NAME,""))
  1. . D MES^XPDUTL(" Setting the Class of EXAM: "_NAME_" to LOCAL.")
  1. . K FDA,MSG
  1. . S IENS=IEN_","
  1. .;Remove "VA-" from any non-national entries.
  1. . I $E(NAME,1,3)="VA-" S FDA(9999999.15,IENS,.01)=$E(NAME,4,99)
  1. . S FDA(9999999.15,IENS,100)="L"
  1. . D FILE^DIE("ET","FDA","MSG")
  1. ;
  1. D BMES^XPDUTL("Setting undefined Health Factor Class fields.")
  1. S NAME=""
  1. F S NAME=$O(^AUTTHF("B",NAME)) Q:NAME="" D
  1. . I NAME="VA-NATIONAL CLASS TEST" Q
  1. . S IEN=$O(^AUTTHF("B",NAME,""))
  1. . D MES^XPDUTL(" Setting the Class of HF: "_NAME_" to LOCAL.")
  1. . K FDA,MSG
  1. . S IENS=IEN_","
  1. . S FDA(9999999.64,IENS,100)="L"
  1. . D FILE^DIE("ET","FDA","MSG")
  1. Q
  1. ;
  1. ;======================
  1. UPCNAME ;Make sure all entries have upppercase .01s.
  1. N IEN,IENS,FDA,MSG,NAME,PXNAT,UPCNAME
  1. S PXNAT=1
  1. D BMES^XPDUTL("Making sure all .01s are uppercase.")
  1. ;
  1. D BMES^XPDUTL("Checking Education Topics.")
  1. S NAME=""
  1. F S NAME=$O(^AUTTEDT("B",NAME)) Q:NAME="" D
  1. . S UPCNAME=$$UP^XLFSTR(NAME)
  1. . I NAME=UPCNAME Q
  1. . S IEN=$O(^AUTTEDT("B",NAME,""))
  1. . K FDA,MSG
  1. . S IENS=IEN_","
  1. . S FDA(9999999.09,IENS,.01)=UPCNAME
  1. . D BMES^XPDUTL("Setting Education Topic: "_NAME)
  1. . D MES^XPDUTL("To: "_UPCNAME)
  1. . D FILE^DIE("ET","FDA","MSG")
  1. ;
  1. D BMES^XPDUTL("Checking Exams.")
  1. S NAME=""
  1. F S NAME=$O(^AUTTEXAM("B",NAME)) Q:NAME="" D
  1. . S UPCNAME=$$UP^XLFSTR(NAME)
  1. . I NAME=UPCNAME Q
  1. . S IEN=$O(^AUTTEXAM("B",NAME,""))
  1. . K FDA,MSG
  1. . S IENS=IEN_","
  1. . S FDA(9999999.15,IENS,.01)=UPCNAME
  1. . D BMES^XPDUTL("Setting Exam: "_NAME)
  1. . D MES^XPDUTL("To: "_UPCNAME)
  1. . D FILE^DIE("ET","FDA","MSG")
  1. ;
  1. D BMES^XPDUTL("Checking Health Factors.")
  1. S NAME=""
  1. F S NAME=$O(^AUTTHF("B",NAME)) Q:(NAME="") D
  1. . S UPCNAME=$$UP^XLFSTR(NAME)
  1. . I NAME=UPCNAME Q
  1. . S IEN=$O(^AUTTHF("B",NAME,""))
  1. . S IENS=IEN_","
  1. . K FDA,MSG
  1. . S FDA(9999999.64,IENS,.01)=UPCNAME
  1. . D BMES^XPDUTL("Setting Health Factor: "_NAME)
  1. . D MES^XPDUTL("To: "_UPCNAME)
  1. . D FILE^DIE("ET","FDA","MSG")
  1. Q
  1. ;
  1. ;======================
  1. VSCINDEX ;Initialize or rebuild the Clinical Reminders Index for V Standard Codes.
  1. I '$D(^PXRMINDX(9000010.71,"DATE BUILT")) D
  1. . D BMES^XPDUTL("Initializing Clinical Reminders Index for V Standard Codes.")
  1. . D VSC^PXPXRMI2
  1. ;Rebuild only necessary in test accounts that have entries.
  1. I $$PROD^XUPROD(1) Q
  1. I $P($G(^AUPNVSC(0)),U,4)=0 Q
  1. N DIK
  1. D BMES^XPDUTL("Rebuilding V Standard Codes indexes.")
  1. S DIK="^AUPNVSC("
  1. D IXALL2^DIK
  1. D IXALL^DIK
  1. D VSC^PXPXRMI2
  1. S ZTREQ="@"
  1. Q
  1. ;
  1. ;======================
  1. VSCITASK ;Start a TaskMan job the for rebuilding the V Standard Codes
  1. ;indexes.
  1. N TEXT
  1. S TEXT(1)="Starting a TaskMan job to initialize/rebuild V STANDARD CODES indexes."
  1. S ZTRTN="VSCINDEX^PXP211I"
  1. S ZTDESC="Build V STANDARD CODES indexes"
  1. S ZTDTH=$$NOW^XLFDT
  1. S ZTIO=""
  1. D ^%ZTLOAD
  1. S TEXT(2)="The task number is: "_ZTSK
  1. D BMES^XPDUTL(.TEXT)
  1. Q
  1. ;