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

ABMDRST1.m

Go to the documentation of this file.
  1. ABMDRST1 ; IHS/ASDST/DMJ - Statistical Report - Part 3 ;
  1. ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
  1. ;Original;TMD;
  1. ;
  1. ; IHS/ASDS/LSL - 03/19/2001 - V2.4 Patch 9 - NOIS XXX-0301-200059
  1. ; Modified code to accomodate deleted visit type 141.
  1. ; "DELETED 141" will appear in this instance.
  1. ;
  1. ; *********************************************************************
  1. ;
  1. PRINT ;EP for writing data
  1. S ABM("PG")=0
  1. D HDB S ABM("L")="" F ABM("NL")=1:1 S ABM("L")=$O(ABM(ABM("L"))) Q:'ABM("L") D G XIT:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
  1. .I $Y>(IOSL-7) D HD Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
  1. .W !!,$P(^DIC(4,ABM("L"),0),U)
  1. .S (ABM("N"),ABM("B"),ABM("P"))=0
  1. .S ABM("V")="" F S ABM("V")=$O(ABM(ABM("L"),ABM("V"))) Q:'ABM("V") D G XIT:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
  1. ..I $Y>(IOSL-6) D HD Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT) W !,$P(^DIC(4,ABM("L"),0),U)," (cont)"
  1. ..;Nest line prints visit type
  1. ..W !?3
  1. ..I ABMY("SORT")="V" D
  1. ...I $P($G(^ABMDVTYP(ABM("V"),0)),U)]"" W $E($P(^ABMDVTYP(ABM("V"),0),U),1,15) Q
  1. ...W "DELETED ",ABM("V")
  1. ..E W $E($P(^DIC(40.7,ABM("V"),0),U),1,15)
  1. ..W ?22,$J($FN($P(ABM(ABM("L"),ABM("V")),U),",",0),5),?30,$J($FN($P(ABM(ABM("L"),ABM("V")),U,2),",",0),5)
  1. ..;Next line writes $ with comma and cents
  1. ..W ?37,$J($FN($P(ABM(ABM("L"),ABM("V")),U,3),",",2),13)
  1. ..W ?50,$J($FN($P(ABM(ABM("L"),ABM("V")),U,4),",",2),13)
  1. ..W ?66,$J($FN(($P(ABM(ABM("L"),ABM("V")),U,3)-$P(ABM(ABM("L"),ABM("V")),U,4)),",",2),13)
  1. ..S ABM("N")=$P(ABM(ABM("L"),ABM("V")),U,1)+ABM("N"),ABM("NLN")=ABM("NLN")+$P(ABM(ABM("L"),ABM("V")),U,1)
  1. ..S ABM("B")=$P(ABM(ABM("L"),ABM("V")),U,3)+ABM("B"),ABM("NLB")=ABM("NLB")+$P(ABM(ABM("L"),ABM("V")),U,3)
  1. ..S ABM("P")=$P(ABM(ABM("L"),ABM("V")),U,4)+ABM("P"),ABM("NLP")=ABM("NLP")+$P(ABM(ABM("L"),ABM("V")),U,4)
  1. .W !,?22,"------",?30,"------",?40,"----------",?53,"----------",?69,"----------"
  1. .W !?22,$J($FN(ABM("N"),",",0),5)
  1. .W ?30,$J($FN(ABM("LC",ABM("L")),",",0),5)
  1. .W ?37,$J($FN(ABM("B"),",",2),13)
  1. .W ?50,$J($FN(ABM("P"),",",2),13)
  1. .W ?66,$J($FN(ABM("B")-ABM("P"),",",2),13)
  1. .;PRINT INPATIENT DAYS - WILL PRINT 0 DAYS ALSO
  1. .W !!
  1. .W "TOTAL COVERED INPATIENT DAYS ",+$GET(ABM(ABM("L"),"COVD"))
  1. .W !
  1. I ABM("NL")<3 G XIT
  1. W !,?22,"======",?30,"======",?40,"==========",?53,"==========",?69,"=========="
  1. ;TOOK OUT TOTAL UNDUP CNT 2/98 SL
  1. W !?10,"Total:",?22,$J($FN(ABM("NLN"),",",0),5)
  1. W ?37,$J($FN(ABM("NLB"),",",2),13)
  1. W ?50,$J($FN(ABM("NLP"),",",2),13)
  1. W ?66,$J($FN(ABM("NLB")-ABM("NLP"),",",2),13)
  1. G XIT
  1. ;
  1. HD D PAZ^ABMDRUTL Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
  1. HDB S ABM("PG")=ABM("PG")+1,ABM("I")="" D WHD^ABMDRHD
  1. W !!?3,$S(ABMY("SORT")="V":"VISIT",1:""),?22,"NUMBER",?32,"UNDUP",?44,"BILLED",?58,"PAID",?72,"UNPAID"
  1. W !?3,$S(ABMY("SORT")="V":"TYPE",1:"CLINIC"),?22,"VISITS",?32,"PATIENTS",?44,"AMOUNT",?57,"AMOUNT",?72,"AMOUNT"
  1. W !,"-------------------------------------------------------------------------------"
  1. Q
  1. ;
  1. XIT K ^TMP($J,"ABM-ST")
  1. Q