2.0P171172PXRMINPL2982435994
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 GENERIC50.6WARFARIN8652690312802NOORDERABLE ITEMS101.43WARFARIN 1MG TAB 35634075055734NOORDERABLE ITEMS101.43WARFARIN 3MG TAB 35622965466379NOORDERABLE ITEMS101.43WARFARIN 5MG TAB 35361991140492NOORDERABLE ITEMS101.43WARFARIN 10MG TAB 35353895741717NOORDERABLE ITEMS101.43WARFARIN 2MG TAB 35342087415189NOORDERABLE ITEMS101.43WARFARIN INJ 27733562899184NOORDERABLE ITEMS101.43WARFARIN TAB 22093047933063NOHEALTH FACTORS9999999.64MU STK500491292931282NOHEALTH FACTORS9999999.64WARFARIN FOLLOW-UP MONITORING ADDRESSED50201644373442NOHEALTH FACTORS9999999.64WARFARIN ADVERSE REACTIONS ADDRESSED502003691692119NOHEALTH FACTORS9999999.64WARFARIN DIETARY ADVICE GIVEN501992792967222NOHEALTH FACTORS9999999.64WARFARIN COMPLIANCE ADDRESSED501982192273470NOHEALTH FACTORS9999999.64WARFARIN EDU MATERIAL GIVEN AT DISCH50197184824224NOHEALTH FACTORS9999999.64VTE TEST ORDER50195808123084NOHEALTH FACTORS9999999.64VTE DX CONFIRMED DURING HOSPTIALIZATION501931875261175NOHEALTH FACTORS9999999.64WARFARIN PRESCRIBED AT DISCHARGE501963674032829NOHEALTH FACTORS9999999.64ENROLLED IN CLINICAL TRIALS500714182986683NOREMINDER COMPUTED FINDINGS811.4VA-DISCHARGES FOR A DATE RANGE941608937132NOREMINDER COMPUTED FINDINGS811.4VA-ADMISSIONS FOR A DATE RANGE901960922291NOREMINDER TAXONOMY811.2MU TABLE 7.04 TX1903678313254NOREMINDER TAXONOMY811.2MU TABLE 7.03 TX1892377246465NOREMINDER TERM811.5MU VTE-5 WARFARIN INSTRUCTION TRM6793294970800NOREMINDER TERM811.5MU VTE-5 DENOM TEST ORDER TRM6783278676975NOREMINDER TERM811.5MU VTE-5 DENOM CONFIRMED DX TRM677865367625NOREMINDER TERM811.5MU VTE-5 DENOM INCL 7.03 OR 7.04 TX TRM6762774899428NOREMINDER TERM811.5MU DISCHARGED HOME-HOSPIC CARE6751839453929NOREMINDER TERM811.5MU DISCHARGED COURT/LAW 6741301941291NOREMINDER TERM811.5MU DISCHARGED HOME6732743717861NOREMINDER TERM811.5MU VTE-5 WARFARIN TRM672327824237NOREMINDER TERM811.5MU VTE-5 DENOM EXCLU TRM6711175648455NOREMINDER DEFINITION811.9MU VTE-5 NUMER CR2244223723788YESREMINDER DEFINITION811.9MU VTE-5 DENOM CR2231077067850YES34191052411811810913113112214414413515715714817017016118318317419619618720920920022322221324023622725725324427427026129128727830830429532532131234233832935935534637637236342438938042942948044243348548556349848958356864159658765664667866966068868370670169271271173072571673673575574974076276078377576678978881080279381681583782982084384287685684789788191591090192192010179349251045102211401058104911681145