VistA-WorldVistAEHR/r/OCCURRENCE_SCREEN-QAO/QAOSXTRN.m

31 lines
1.1 KiB
Mathematica

QAOSXTRN ;HISC/DDA-SUPPORTED EXTERNAL ENTRY POINTS ;2/4/93 09:33
;;3.0;Occurrence Screen;;09/14/1993
Q
PAD0 ;ENTRY TO PRINT ADVERSE FINDINGS REPORT THAT PRINTS NO NAMES OR CODES
S QAOSCHOS="X" ; FLAG TO SUPPRESS NAMES AND CODES
D ^QAQDATE G:QAQQUIT EXIT^QAOSPAD0
K %ZIS S %ZIS="QM" D ^%ZIS G:POP EXIT^QAOSPAD0
I $D(IO("Q")) D G EXIT^QAOSPAD0
. S ZTDESC="Adverse findings report",ZTRTN="ENTSK^QAOSPAD0"
. S ZTSAVE("QAOS*")="",ZTSAVE("QAQ*")="" D ^%ZTLOAD
. Q
D ENTSK^QAOSPAD0
Q
PSM0 ;ENTRY TO PRINT SUMMARY OF OCCURRENCE SCREENING
D ^QAOSPSM
Q
PSS0(QAQNBEG,QAQNEND) ;
;ENTRY TO EXTRACT DATA FROM THE SERVICE STATISTICS REPORT
;
; RETURNS: Y = # 10 DAY READMISSIONS WITH D/C FROM MEDICINE SERVICE
; ^ # 10 DAY READMISSIONS WITH D/C FROM SURGERY SERVICE
; ^ # 48 HRS READMISSIONS WITH D/C FROM EXTENDED CARE
;
S QAOSSORT="C" ; SORT BY CRITERIA
S QAOSLIST(0)="1,2," ; INCLUDE ONLY NATIONAL SCREENS
D ^QAOSPSS0
S Y=$G(^UTILITY($J,"QAOSPSS","N",1)),Y=+$P(Y,"^",5)_"^"_+$P(Y,"^",12)
S X=$G(^UTILITY($J,"QAOSPSS","L",1)),Z=0 F QA=2:1:13 S Z=Z+$P(X,"^",QA)
S Y=Y_"^"_Z
Q