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

BDMEDMU1.m

Go to the documentation of this file.
  1. BDMEDMU1 ; IHS/CMI/LAB - EDITS FOR AUPNVSIT (VISIT:9000010) 24-MAY-1993 ;
  1. ;;2.0;DIABETES MANAGEMENT SYSTEM;**7,8**;JUN 14, 2007;Build 53
  1. ;
  1. K BDMEVSIT
  1. I $P(BDMEREC,U,11)="" Q
  1. S BDMEDMDT=$P(BDMEREC,U,11)
  1. S BDMEMTYP=$O(^AUTTEXAM("B","DIABETIC FOOT EXAM, COMPLETE",0))
  1. D EVSIT^BDMEDMUP ;get event visit
  1. I '$G(BDMEVSIT) S T="Could not Create PCC Visit when attempting to update foot exam." D ERR^BDMEDMUP(T) Q
  1. S (X,G)=0 F S X=$O(^AUPNVXAM("AD",BDMEVSIT,X)) Q:X'=+X!(G) I $P(^AUPNVXAM(X,0),U)=BDMEMTYP S G=1
  1. I G S T="Already have a foot exam on Visit Date "_$$FMTE^XLFDT($P(^AUPNVSIT(BDMEVSIT,0),U)) D ERR^BDMEDMUP(T) Q
  1. K APCDALVR
  1. S APCDALVR("APCDPAT")=BDMEDMPT
  1. S APCDALVR("APCDVSIT")=BDMEVSIT
  1. S APCDALVR("APCDATMP")="[APCDALVR 9000010.13 (ADD)]"
  1. S APCDALVR("APCDTEX")="`"_BDMEMTYP
  1. S APCDALVR("APCDTRES")=$P(BDMEREC,U,21)
  1. D ^APCDALVR
  1. I $D(APCDALVR("APCDAFLG")) S T="Error creating V Exam Entry for Foot Exam. PCC not updated." D ERR^BDMEDMUP(T)
  1. K APCDALVR
  1. Q
  1. EYE ;EP
  1. K BDMEVSIT
  1. I $P(BDMEREC,U,12)="" Q
  1. S BDMEDMDT=$P(BDMEREC,U,12)
  1. S BDMEMTYP=$O(^AUTTEXAM("B","DIABETIC EYE EXAM",0))
  1. D EVSIT^BDMEDMUP ;get event visit
  1. I '$G(BDMEVSIT) S T="Could not Create PCC Visit when attempting to update eye exam." D ERR^BDMEDMUP(T) Q
  1. S (X,G)=0 F S X=$O(^AUPNVXAM("AD",BDMEVSIT,X)) Q:X'=+X!(G) I $P(^AUPNVXAM(X,0),U)=BDMEMTYP S G=1
  1. I G S T="Already have a eye exam on Visit Date "_$$FMTE^XLFDT($P(^AUPNVSIT(BDMEVSIT,0),U)) D ERR^BDMEDMUP(T) Q
  1. K APCDALVR
  1. S APCDALVR("APCDPAT")=BDMEDMPT
  1. S APCDALVR("APCDVSIT")=BDMEVSIT
  1. S APCDALVR("APCDATMP")="[APCDALVR 9000010.13 (ADD)]"
  1. S APCDALVR("APCDTEX")="`"_BDMEMTYP
  1. S APCDALVR("APCDTRES")=$P(BDMEREC,U,22)
  1. D ^APCDALVR
  1. I $D(APCDALVR("APCDAFLG")) S T="Error creating V Exam Entry for Eye Exam. PCC not updated." D ERR^BDMEDMUP(T)
  1. K APCDALVR
  1. Q
  1. DEPR ;EP
  1. K BDMEVSIT
  1. I $P(BDMEREC,U,25)="" Q
  1. S BDMEDMDT=$P(BDMEREC,U,25)
  1. S BDMEMTYP=$O(^AUTTEXAM("C",36,0))
  1. D EVSIT^BDMEDMUP ;get event visit
  1. I '$G(BDMEVSIT) S T="Could not Create PCC Visit when attempting to update Depression screening exam." D ERR^BDMEDMUP(T) Q
  1. S (X,G)=0 F S X=$O(^AUPNVXAM("AD",BDMEVSIT,X)) Q:X'=+X!(G) I $P(^AUPNVXAM(X,0),U)=BDMEMTYP S G=1
  1. I G S T="Already have a depression screening exam on Visit Date "_$$FMTE^XLFDT($P(^AUPNVSIT(BDMEVSIT,0),U)) D ERR^BDMEDMUP(T) Q
  1. K APCDALVR
  1. S APCDALVR("APCDPAT")=BDMEDMPT
  1. S APCDALVR("APCDVSIT")=BDMEVSIT
  1. S APCDALVR("APCDATMP")="[APCDALVR 9000010.13 (ADD)]"
  1. S APCDALVR("APCDTEX")="`"_BDMEMTYP
  1. S APCDALVR("APCDTRES")=$P(BDMEREC,U,22)
  1. D ^APCDALVR
  1. I $D(APCDALVR("APCDAFLG")) S T="Error creating V Exam Entry for Depression Screening Exam. PCC not updated." D ERR^BDMEDMUP(T)
  1. K APCDALVR
  1. Q
  1. DENTAL ;EP
  1. K BDMEVSIT
  1. I $P(BDMEREC,U,13)="" Q
  1. S BDMEDMDT=$P(BDMEREC,U,13)
  1. S BDMEMTYP=$O(^AUTTEXAM("B","DENTAL EXAM",0))
  1. I 'BDMEMTYP S BDMEMTYP=$O(^AUTTEXAM("C",30,0))
  1. D EVSIT^BDMEDMUP ;get event visit
  1. I '$G(BDMEVSIT) S T="Could not Create PCC Visit when attempting to update dental exam." D ERR^BDMEDMUP(T) Q
  1. S (X,G)=0 F S X=$O(^AUPNVXAM("AD",BDMEVSIT,X)) Q:X'=+X!(G) I $P(^AUPNVXAM(X,0),U)=BDMEMTYP S G=1
  1. I G S T="Already have a dental exam on Visit Date "_$$FMTE^XLFDT($P(^AUPNVSIT(BDMEVSIT,0),U)) D ERR^BDMEDMUP(T) Q
  1. K APCDALVR
  1. S APCDALVR("APCDPAT")=BDMEDMPT
  1. S APCDALVR("APCDVSIT")=BDMEVSIT
  1. S APCDALVR("APCDATMP")="[APCDALVR 9000010.13 (ADD)]"
  1. S APCDALVR("APCDTEX")="`"_BDMEMTYP
  1. D ^APCDALVR
  1. I $D(APCDALVR("APCDAFLG")) S T="Error creating V Exam Entry for Dental Exam. PCC not updated." D ERR^BDMEDMUP(T)
  1. K APCDALVR
  1. Q
  1. PAP ;EP
  1. K BDMEVSIT
  1. I $P(BDMEREC,U,14)="" Q
  1. S BDMEDMDT=$P(BDMEREC,U,14)
  1. ;S BDMEMTYP=$P($$ICDOP^BDMUTL("91.46",,2,"E"),U,1)
  1. ;PER KAREN M USE 88174 CPT CODE
  1. S BDMEMTYP=+$$CODEN^ICPTCOD(88174)
  1. I BDMEMTYP=-1 S BDMEMTYP=""
  1. D EVSIT^BDMEDMUP ;get event visit
  1. I '$G(BDMEVSIT) S T="Could not Create PCC Visit when attempting to update pap procedure." D ERR^BDMEDMUP(T) Q
  1. S (X,G)=0 F S X=$O(^AUPNVCPT("AD",BDMEVSIT,X)) Q:X'=+X!(G) I $P(^AUPNVCPT(X,0),U)=BDMEMTYP S G=1
  1. I G S T="Already have a pap CPT 88174 on Visit Date "_$$FMTE^XLFDT($P(^AUPNVSIT(BDMEVSIT,0),U)) D ERR^BDMEDMUP(T) Q
  1. K APCDALVR
  1. S APCDALVR("APCDPAT")=BDMEDMPT
  1. S APCDALVR("APCDVSIT")=BDMEVSIT
  1. S APCDALVR("APCDATMP")="[APCDALVR 9000010.18 (ADD)]"
  1. S APCDALVR("APCDTCPT")="`"_BDMEMTYP
  1. S APCDALVR("APCDTUN")=1
  1. D ^APCDALVR
  1. I $D(APCDALVR("APCDAFLG")) S T="Error creating V CPT Entry for PAP Procedure. PCC not updated." D ERR^BDMEDMUP(T)
  1. K APCDALVR
  1. Q
  1. MAM ;EP
  1. K BDMEVSIT
  1. I $P(BDMEREC,U,15)="" Q
  1. I $P(BDMEREC,U,24)="" Q
  1. S BDMEDMDT=$P(BDMEREC,U,15)
  1. S BDMEMTYP=$P(BDMEREC,U,24)
  1. D EVSIT^BDMEDMUP ;get event visit
  1. I '$G(BDMEVSIT) S T="Could not Create PCC Visit when attempting to update mammogram procedure." D ERR^BDMEDMUP(T) Q
  1. S (X,G)=0 F S X=$O(^AUPNVRAD("AD",BDMEVSIT,X)) Q:X'=+X!(G) I $P(^AUPNVRAD(X,0),U)=BDMEMTYP S G=1
  1. I G S T="Already have a Mammogram on Visit Date "_$$FMTE^XLFDT($P(^AUPNVSIT(BDMEVSIT,0),U)) D ERR^BDMEDMUP(T) Q
  1. K APCDALVR
  1. S APCDALVR("APCDPAT")=BDMEDMPT
  1. S APCDALVR("APCDVSIT")=BDMEVSIT
  1. S APCDALVR("APCDATMP")="[APCDALVR 9000010.22 (ADD)]"
  1. S APCDALVR("APCDTRAD")="`"_BDMEMTYP
  1. D ^APCDALVR
  1. I $D(APCDALVR("APCDAFLG")) S T="Error creating V Radiology Entry for MAMMOGRAM. PCC not updated." D ERR^BDMEDMUP(T)
  1. K APCDALVR
  1. Q
  1. FLU ;EP
  1. K BDMEVSIT
  1. I $P(BDMEREC,U,16)=""!($P(BDMEREC1,U,11)="") Q
  1. S BDMEDMDT=$P(BDMEREC,U,16)
  1. S BDMEMTYP=$P(BDMEREC1,U,11)
  1. D EVSIT^BDMEDMUP ;get event visit
  1. I '$G(BDMEVSIT) S T="Could not Create PCC Visit when attempting to update Flu Immunization." D ERR^BDMEDMUP(T) Q
  1. S (X,G)=0 F S X=$O(^AUPNVIMM("AD",BDMEVSIT,X)) Q:X'=+X!(G) I $P(^AUPNVIMM(X,0),U)=BDMEMTYP S G=1
  1. I G S T="Already have a flu immunization on Visit Date "_$$FMTE^XLFDT($P(^AUPNVSIT(BDMEVSIT,0),U)) D ERR^BDMEDMUP(T) Q
  1. K APCDALVR
  1. S APCDALVR("APCDPAT")=BDMEDMPT
  1. S APCDALVR("APCDVSIT")=BDMEVSIT
  1. S APCDALVR("APCDATMP")="[APCDALVR 9000010.11 (ADD)]"
  1. S APCDALVR("APCDTIMM")="`"_BDMEMTYP
  1. D ^APCDALVR
  1. I $D(APCDALVR("APCDAFLG")) S T="Error creating V Immunization Entry for Flu Immunization. PCC not updated." D ERR^BDMEDMUP(T)
  1. K APCDALVR
  1. Q
  1. HEPB ;EP
  1. K BDMEVSIT
  1. I $P(BDMEREC1,U,20)=""!($P(BDMEREC1,U,21)="") Q
  1. S BDMEDMDT=$P(BDMEREC1,U,20)
  1. S BDMEMTYP=$P(BDMEREC1,U,21)
  1. D EVSIT^BDMEDMUP ;get event visit
  1. I '$G(BDMEVSIT) S T="Could not Create PCC Visit when attempting to update HEP B Immunization." D ERR^BDMEDMUP(T) Q
  1. S (X,G)=0 F S X=$O(^AUPNVIMM("AD",BDMEVSIT,X)) Q:X'=+X!(G) I $P(^AUPNVIMM(X,0),U)=BDMEMTYP S G=1
  1. I G S T="Already have a HEP B immunization on Visit Date "_$$FMTE^XLFDT($P(^AUPNVSIT(BDMEVSIT,0),U)) D ERR^BDMEDMUP(T) Q
  1. K APCDALVR
  1. S APCDALVR("APCDPAT")=BDMEDMPT
  1. S APCDALVR("APCDVSIT")=BDMEVSIT
  1. S APCDALVR("APCDATMP")="[APCDALVR 9000010.11 (ADD)]"
  1. S APCDALVR("APCDTIMM")="`"_BDMEMTYP
  1. D ^APCDALVR
  1. I $D(APCDALVR("APCDAFLG")) S T="Error creating V Immunization Entry for HEP B Immunization. PCC not updated." D ERR^BDMEDMUP(T)
  1. K APCDALVR
  1. Q
  1. PNEU ;EP
  1. K BDMEVSIT
  1. I $P(BDMEREC,U,17)=""!($P(BDMEREC1,U,12)="") Q
  1. S BDMEDMDT=$P(BDMEREC,U,17)
  1. S BDMEMTYP=$P(BDMEREC1,U,12)
  1. D EVSIT^BDMEDMUP ;get event visit
  1. I '$G(BDMEVSIT) S T="Could not Create PCC Visit when attempting to update Pneumovac Immunization." D ERR^BDMEDMUP(T) Q
  1. S (X,G)=0 F S X=$O(^AUPNVIMM("AD",BDMEVSIT,X)) Q:X'=+X!(G) I $P(^AUPNVIMM(X,0),U)=BDMEMTYP S G=1
  1. I G S T="Already have a pneumovac immunization on Visit Date "_$$FMTE^XLFDT($P(^AUPNVSIT(BDMEVSIT,0),U)) D ERR^BDMEDMUP(T) Q
  1. K APCDALVR
  1. S APCDALVR("APCDPAT")=BDMEDMPT
  1. S APCDALVR("APCDVSIT")=BDMEVSIT
  1. S APCDALVR("APCDATMP")="[APCDALVR 9000010.11 (ADD)]"
  1. S APCDALVR("APCDTIMM")="`"_BDMEMTYP
  1. D ^APCDALVR
  1. I $D(APCDALVR("APCDAFLG")) S T="Error creating V Immunization Entry for Pneumovac Immunization. PCC not updated." D ERR^BDMEDMUP(T)
  1. K APCDALVR
  1. Q
  1. TD ;EP
  1. K BDMEVSIT
  1. I $P(BDMEREC,U,18)=""!($P(BDMEREC1,U,13)="") Q
  1. S BDMEDMDT=$P(BDMEREC,U,18)
  1. S BDMEMTYP=$P(BDMEREC1,U,13)
  1. D EVSIT^BDMEDMUP ;get event visit
  1. I '$G(BDMEVSIT) S T="Could not Create PCC Visit when attempting to update Pneumovac Immunization." D ERR^BDMEDMUP(T) Q
  1. S (X,G)=0 F S X=$O(^AUPNVIMM("AD",BDMEVSIT,X)) Q:X'=+X!(G) I $P(^AUPNVIMM(X,0),U)=BDMEMTYP S G=1
  1. I G S T="Already have a TD immunization on Visit Date "_$$FMTE^XLFDT($P(^AUPNVSIT(BDMEVSIT,0),U)) D ERR^BDMEDMUP(T) Q
  1. K APCDALVR
  1. S APCDALVR("APCDPAT")=BDMEDMPT
  1. S APCDALVR("APCDVSIT")=BDMEVSIT
  1. S APCDALVR("APCDATMP")="[APCDALVR 9000010.11 (ADD)]"
  1. S APCDALVR("APCDTIMM")="`"_BDMEMTYP
  1. D ^APCDALVR
  1. I $D(APCDALVR("APCDAFLG")) S T="Error creating V Immunization Entry for TD Immunization. PCC not updated." D ERR^BDMEDMUP(T)
  1. K APCDALVR
  1. Q
  1. ID ;
  1. S:$E(BDMEDMDT,6,7)="00" BDMEDMDT=$E(BDMEDMDT,1,5)_"01" S:$E(BDMEDMDT,4,5)="00" BDMEDMDT=$E(BDMEDMDT,1,3)_"01"_$E(BDMEDMDT,6,7)
  1. Q
  1. BI() ;EP- check to see if using new imm package or not 1/5/1999 IHS/CMI/LAB
  1. Q $S($O(^AUTTIMM(0))<100:0,1:1)
  1. ;