2.0P171031PXRMINPL2982435994
EDT)!(DATE="") D
. S IEN=""
. F S IEN=$O(^DGPM(SUB,DATE,IEN)) Q:IEN="" D
.. S DATA=^DGPM(IEN,0)
.. S DFN=$P(DATA,U,3)
.. I SUB="ATT1" D
...;WARD is a required field but it may not exist for older entries.
... S WARDP=+$P(DATA,U,6)
... S WARD=WARDP_";"_$S(WARDP>0:$P($G(^DIC(42,WARDP,0)),U,1),1:0)
.. I SUB="ATT3" D
... S WARD=$$GET1^DIQ(405,IEN,200)
... S WARDP=$S(WARD'="":$O(^DIC(42,"B",WARD,"")),1:0)
... S WARD=WARDP_";"_WARD
..;If a location list has been passed in make sure the hospital
..;location for the ward is on the list.
.. S HLOC=$S(WARDP>0:^DIC(42,WARDP,44),1:0)
.. I LOCLIST>0 S OK=$S($D(^PXRMD(810.9,LOCLIST,44,"B",HLOC)):1,1:0)
.. I 'OK Q
.. S (CNT,^TMP($J,"CNT",DFN))=+$G(^TMP($J,"CNT",DFN))+1
.. S ^TMP($J,PLIST,DFN,CNT)=U_DATE_U_405_U_DFN_U_WARD
.. S INST=$S(HLOC>0:+$P(^SC(HLOC,0),U,4),1:0)
.. S INSTNM=INST_";"_$S(INST>0:$P(^DIC(4,INST,0),U,1),1:0)
.. S INSTNM=INSTNM_";"_$S(INST>0:$P($G(^DIC(4,INST,99)),U,1),1:0)
.. S ^TMP($J,PLIST,DFN,CNT,"VALUE")=WARD
.. S ^TMP($J,PLIST,DFN,CNT,"INSTITUTION")=INSTNM
.. S ^TMP($J,PLIST,DFN,CNT,"TYPE_OF_MVMT")=$$GET1^DIQ(405.1,$P(DATA,U,4),.01)
K ^TMP($J,"CNT")
Q
;
;=====================================
CURR(NGET,BDT,EDT,PLIST,PARAM) ;Current inpatients.
; DBIAs #10035, #10039, #10040, #10061, #10090
N CNT,DFN,HLOC,INST,INSTNM,LOCLIST,OK,WARD,WARDP,WARDSUB,VAIN,VAERR
K ^TMP($J,PLIST),^TMP($J,"CNT")
S OK=1
S LOCLIST=$S(PARAM'="":+$O(^PXRMD(810.9,"B",PARAM,0)),1:0)
S WARD=""
F S WARD=$O(^DPT("CN",WARD)) Q:WARD="" D
. S DFN=0
. F S DFN=$O(^DPT("CN",WARD,DFN)) Q:'+DFN D
..;If a location list has been passed in make sure the hospital
..;location for the ward is on the list.
.. S WARDP=+$O(^DIC(42,"B",WARD,""))
.. S HLOC=+$G(^DIC(42,WARDP,44))
.. I LOCLIST>0 S OK=$S($D(^PXRMD(810.9,LOCLIST,44,"B",HLOC)):1,1:0)
.. I 'OK Q
.. K VAIN,VAERR D INP^VADPT
.. S WARDSUB=+VAIN(4)_";"_WARD
.. S (CNT,^TMP($J,"CNT",DFN))=+$G(^TMP($J,"CNT",DFN))+1
.. S ^TMP($J,PLIST,DFN,CNT)=U_+VAIN(7)_U_2_U_DFN_U_WARDSUB
.. S INST=$S(HLOC>0:+$P(^SC(HLOC,0),U,4),1:0)
.. S INSTNM=INST_";"_$S(INST>0:$P(^DIC(4,INST,0),U,1),1:0)
.. S INSTNM=INSTNM_";"_$S(INST>0:$P($G(^DIC(4,INST,99)),U,1),1:0)
.. S ^TMP($J,PLIST,DFN,CNT,"VALUE")=WARDSUB
.. S ^TMP($J,PLIST,DFN,CNT,"INSTITUTION")=INSTNM
.. S ^TMP($J,PLIST,DFN,CNT,"ADMIT DATE")=VAIN(7)
K ^TMP($J,"CNT")
Q
;
;=====================================
DISCH(NGET,BDT,EDT,PLIST,PARAM) ;Discharges during a date range.
;NOTE: ASIH is not accounted for in this version.
D ADMDISCH(BDT,EDT,PLIST,PARAM,"ATT3")
Q
;
]]>
VA DRUG CLASS50.605BL1172553034555924NOVA DRUG CLASS50.605BL11046716911543NOORDERABLE ITEMS101.43WARFARIN TAB 22093047933063NOHEALTH FACTORS9999999.64MU STK500491292931282NOHEALTH FACTORS9999999.64ELECTIVE CAROTID INTERVENTION5003062385829161NOHEALTH FACTORS9999999.64COMFORT MEASURES PROTOCOL FOLLOWED500305779307093NOHEALTH FACTORS9999999.64ENROLLED IN CLINICAL TRIALS500714182986683NOHEALTH FACTORS9999999.64ANTICOAGULATION THERAPY CAN'T BE GIVEN500562672973820NOHEALTH FACTORS9999999.64ANTICOAGULATION THERAPY PRESCRIBED500584157731543NOREMINDER COMPUTED FINDINGS811.4VA-DISCHARGES FOR A DATE RANGE941608937132NOREMINDER COMPUTED FINDINGS811.4VA-ADMISSIONS FOR A DATE RANGE901960922291NOREMINDER TAXONOMY811.2MU STK-3 DENOM INCLU AT FIB/FL TX21321988516NOREMINDER TAXONOMY811.2MU STK-3 DENOM INCLU TX1442852347166NOREMINDER TAXONOMY811.2MU STK DENOM EXCLU ELECTIVE SURGERY TX1223882324901NOREMINDER TERM811.5MU DISCHARGE TO ANOTHER HOSP7293422916630NOREMINDER TERM811.5MU DISCHARGED PT LEFT AGAINST MED ADVICE6881255054350NOREMINDER TERM811.5MU DISCHARGE DEATH685536067863NOREMINDER TERM811.5MU DISCHARGED TO HEALTH CARE FACILITY FOR HOSPIC CARE6841819822144NOREMINDER TERM811.5MU DISCHARGED HOME-HOSPIC CARE6751839453929NOREMINDER TERM811.5MU ADMISSION MVMT TRIAL TRM6601258096799NOREMINDER TERM811.5MU STK-3 DENOM EXCLU TRM6214208060120NOREMINDER TERM811.5MU STK-3 NUMER INCLU TRM6162759738747NOREMINDER DEFINITION811.9MU STK-3 NUMER CR2003951192449YES
18y
LOS <=120 DAYS
NO COMFORT MEASURES DOCUMENTD
PT NOT ON CLNICAL TRIALS
EX PT ADMITTED FO RELECTIVE CAROTID INTERENTION
EX PT DISCHARGED TO ANOTHER HOSP
EX PT WHO LEFT AGAINST MEDICAL ADVICE
EX PT WHO EXPIRED
EX PT DISCHAGED TO HOME FO RHOSPICE CARE
EX PT DISCHARGED TO HEALTH CARE FACILITY FOR HOSPIC CARE
EX PT WITH A DOCUMENTED REASON FOR NOT PRESCRIBING ANITCIAGULATION THERAPY
Discharges with an ICD-9-CM Principal Diagnosis Code for ischemic stroke
PTS WITH DOCUMENTED ATRIAL FIBRILLATION/FLUTTER
811.9;+200,;30~(AGE)&(FI(1)&FF(1))&'FI(8)&'FI(9)&'FI(10)&'FI(11)&'FI(12)&'FI(13)&'FI(3)&'FI(2)&(FI(6)&FF(2))&(FI(7)&FF(1))&(FI(1)&FI(7))
811.9;+200,;31~(AGE)&(FI(1)&FF(1))&'FI(8)&'FI(9)&'FI(10)&'FI(11)&'FI(12)&'FI(13)&'FI(3)&'FI(2)&(FI(6)&FF(2))&(FI(7)&FF(1))&(FI(1)&FI(7))
811.9;+200,;32~17
811.9;+200,;33~AGE;1;FF1;8;9;10;11;12;13;3;2;6;FF2;7;FF1;1;7
811.9;+200,;36~0
811.9;+200,;40~0
811.9;+200,;42~2
811.9;+200,;43~4;5
811.9;+200,;62~0
811.9;+200,;63~0
811.9;+200,;67~0
811.9;+200,;68~0
811.9;+200,;71~WP-start~1
811.9;+200,;72~0
811.9;+200,;73~1
811.9;+200,;77~0
811.9;+200,;78~0
811.9;+200,;100~LOCAL
811.9;+200,;103~L
811.9001;+201,+200,;.01~07/22/2011@03:09:37
811.9001;+201,+200,;2~WP-start~1
Exchange Stub
811.902;+202,+200,;.01~TX.MU STK-3 DENOM INCLU TX
811.902;+202,+200,;24~0
811.902;+202,+200,;25~0
811.902;+203,+200,;.01~RT.MU DISCHARGE TO ANOTHER HOSP
811.902;+203,+200,;24~0
811.902;+203,+200,;25~0
811.902;+204,+200,;.01~RT.MU DISCHARGED HOME-HOSPIC CARE
811.902;+204,+200,;24~0
811.902;+204,+200,;25~0
811.902;+205,+200,;.01~RT.MU DISCHARGED PT LEFT AGAINST MED ADVICE
811.902;+205,+200,;24~0
811.902;+205,+200,;25~0
811.902;+206,+200,;.01~RT.MU DISCHARGED TO HEALTH CARE FACILITY FOR HOSPIC CARE
811.902;+206,+200,;24~0
811.902;+206,+200,;25~0
811.902;+207,+200,;.01~TX.MU STK DENOM EXCLU ELECTIVE SURGERY TX
811.902;+207,+200,;24~0
811.902;+207,+200,;25~0
811.902;+208,+200,;.01~RT.MU STK-3 DENOM EXCLU TRM
811.902;+208,+200,;24~0
811.902;+208,+200,;25~0
811.902;+209,+200,;.01~CF.VA-ADMISSIONS FOR A DATE RANGE
811.902;+209,+200,;24~0
811.902;+209,+200,;25~0
811.902;+210,+200,;.01~CF.VA-DISCHARGES FOR A DATE RANGE
811.902;+210,+200,;24~0
811.902;+210,+200,;25~0
811.902;+211,+200,;.01~RT.MU STK-3 NUMER INCLU TRM
811.902;+211,+200,;24~0
811.902;+211,+200,;25~0
811.902;+212,+200,;.01~TX.MU STK-3 DENOM INCLU AT FIB/FL TX
811.902;+212,+200,;24~0
811.902;+212,+200,;25~0
811.902;+213,+200,;.01~RT.MU ADMISSION MVMT TRIAL TRM
811.902;+213,+200,;24~0
811.902;+213,+200,;25~0
811.902;+214,+200,;.01~RT.MU DISCHARGE DEATH
811.902;+214,+200,;24~0
811.902;+214,+200,;25~0
811.925;+215,+200,;.01~1
811.925;+215,+200,;3~DIFF_DATE(5,4)<121
811.925;+215,+200,;10~FN(1)<121
811.925;+215,+200,;41~0
811.925;+215,+200,;42~0
811.925;+216,+200,;.01~2
811.925;+216,+200,;3~DIFF_DATE(6,5)=0
811.925;+216,+200,;10~FN(1)=0
811.925;+216,+200,;41~0
811.925;+216,+200,;42~0
811.9255;+217,+215,+200,;.01~1
811.9255;+217,+215,+200,;.02~DIFF_DATE
811.9255;+218,+216,+200,;.01~1
811.9255;+218,+216,+200,;.02~DIFF_DATE
811.9256;+219,+217,+215,+200,;.01~5
811.9256;+220,+218,+216,+200,;.01~6
811.9256;+221,+217,+215,+200,;.01~4
811.9256;+222,+218,+216,+200,;.01~5
811.97;+223,+200,;.01~99Y
811.97;+223,+200,;1~18
811.97;+223,+200,;2~99
811.97;+223,+200,;5~0
811.97;+223,+200,;6~0
]]>
REMINDER DEFINITION811.9MU STK-3 DENOM CR2011512051686YES
18y
LOS <=120 DAYS
NO COMFORT MEASURES DOCUMENTD
PT NOT ON CLNICAL TRIALS
EX PT ADMITTED FO RELECTIVE CAROTID INTERENTION
EX PT DISCHARGED TO ANOTHER HOSP
EX PT WHO LEFT AGAINST MEDICAL ADVICE
EX PT WHO EXPIRED
EX PT DISCHAGED TO HOME FO RHOSPICE CARE
EX PT DISCHARGED TO HEALTH CARE FACILITY FOR HOSPIC CARE
EX PT WITH A DOCUMENTED REASON FOR NOT PRESCRIBING ANITCIAGULATION THERAPY
Discharges with an ICD-9-CM Principal Diagnosis Code for ischemic stroke
PTS WITH DOCUMENTED ATRIAL FIBRILLATION/FLUTTER
811.9;+201,;30~(AGE)&(FI(1)&FF(1))&'FI(6)&'FI(7)&'FI(10)&'FI(8)&'FI(9)&'FI(11)&'FI(3)&'FI(2)&(FI(12)&FF(1))
811.9;+201,;31~(AGE)&(FI(1)&FF(1))&'FI(6)&'FI(7)&'FI(10)&'FI(8)&'FI(9)&'FI(11)&'FI(3)&'FI(2)&(FI(12)&FF(1))
811.9;+201,;32~13
811.9;+201,;33~AGE;1;FF1;6;7;10;8;9;11;3;2;12;FF1
811.9;+201,;36~0
811.9;+201,;40~0
811.9;+201,;42~2
811.9;+201,;43~4;5
811.9;+201,;62~0
811.9;+201,;63~0
811.9;+201,;67~0
811.9;+201,;68~0
811.9;+201,;71~WP-start~1
811.9;+201,;72~0
811.9;+201,;73~1
811.9;+201,;77~0
811.9;+201,;78~0
811.9;+201,;100~LOCAL
811.9;+201,;103~L
811.9001;+202,+201,;.01~07/22/2011@03:09:38
811.9001;+202,+201,;2~WP-start~1
Exchange Stub
811.902;+203,+201,;.01~TX.MU STK-3 DENOM INCLU TX
811.902;+203,+201,;24~0
811.902;+203,+201,;25~0
811.902;+204,+201,;.01~RT.MU DISCHARGE TO ANOTHER HOSP
811.902;+204,+201,;24~0
811.902;+204,+201,;25~0
811.902;+205,+201,;.01~RT.MU DISCHARGED TO HEALTH CARE FACILITY FOR HOSPIC CARE
811.902;+205,+201,;24~0
811.902;+205,+201,;25~0
811.902;+206,+201,;.01~TX.MU STK-3 DENOM INCLU AT FIB/FL TX
811.902;+206,+201,;24~0
811.902;+206,+201,;25~0
811.902;+207,+201,;.01~TX.MU STK DENOM EXCLU ELECTIVE SURGERY TX
811.902;+207,+201,;24~0
811.902;+207,+201,;25~0
811.902;+208,+201,;.01~RT.MU STK-3 DENOM EXCLU TRM
811.902;+208,+201,;24~0
811.902;+208,+201,;25~0
811.902;+209,+201,;.01~CF.VA-ADMISSIONS FOR A DATE RANGE
811.902;+209,+201,;24~0
811.902;+209,+201,;25~0
811.902;+210,+201,;.01~CF.VA-DISCHARGES FOR A DATE RANGE
811.902;+210,+201,;24~0
811.902;+210,+201,;25~0
811.902;+211,+201,;.01~RT.MU ADMISSION MVMT TRIAL TRM
811.902;+211,+201,;24~0
811.902;+211,+201,;25~0
811.902;+212,+201,;.01~RT.MU DISCHARGE DEATH
811.902;+212,+201,;24~0
811.902;+212,+201,;25~0
811.902;+213,+201,;.01~RT.MU DISCHARGED HOME-HOSPIC CARE
811.902;+213,+201,;24~0
811.902;+213,+201,;25~0
811.902;+214,+201,;.01~RT.MU DISCHARGED PT LEFT AGAINST MED ADVICE
811.902;+214,+201,;24~0
811.902;+214,+201,;25~0
811.925;+215,+201,;.01~1
811.925;+215,+201,;3~DIFF_DATE(5,4)<121
811.925;+215,+201,;10~FN(1)<121
811.925;+215,+201,;41~0
811.925;+215,+201,;42~0
811.9255;+216,+215,+201,;.01~1
811.9255;+216,+215,+201,;.02~DIFF_DATE
811.9256;+217,+216,+215,+201,;.01~5
811.9256;+218,+216,+215,+201,;.01~4
811.97;+219,+201,;.01~99Y
811.97;+219,+201,;1~18
811.97;+219,+201,;2~99
811.97;+219,+201,;5~0
811.97;+219,+201,;6~0
]]>
251910524118118109131131122144144135158157148175171162192188179209205196226222213243239230291256247296296347309300352352374365356380379467393384498472528511502536533557549540563562584576567590589611603594617616638630621644643665657648671670692684675698697721711702730726753743734764758877777768904882100591790810271010