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

PXRRECSC.m

Go to the documentation of this file.
  1. PXRRECSC ;ISL/PKR - PCE reports encounter selection criteria routines. ;7/7/97
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**12,18,20**;Aug 12, 1996
  1. ;
  1. ;=======================================================================
  1. ECAT ;Get a list of attributes for screening encounters.
  1. N C2S,INDENT,VALID,X,Y
  1. K DIRUT,DTOUT,DUOUT
  1. S DIR(0)="YA"
  1. S DIR("A",1)="This report will include all VA clinic encounters for all patients"
  1. S DIR("A",2)="unless you modify the criteria. Do you want to modify the criteria?"
  1. S DIR("A")="Enter Y (YES) or N (NO) "
  1. S DIR("B")="N"
  1. W !
  1. D ^DIR K DIR
  1. I $D(DIROUT) S DTOUT=1
  1. I $D(DTOUT)!($D(DUOUT)) Q
  1. I 'Y S PXRRECAT="" Q
  1. ;
  1. S INDENT=2
  1. S C2S=INDENT+5
  1. K DIRUT,DUOUT
  1. ECATP W !!,"Encounters may be selected by any combination of the following attributes:"
  1. W !,?INDENT,"1",?C2S,"Service Category"
  1. ;W !,?INDENT,"2",?C2S,"Encounter Type"
  1. W !,?INDENT,"2",?C2S,"Location"
  1. W !,?INDENT,"3",?C2S,"Provider"
  1. W !,?INDENT,"4",?C2S,"Age of Patient"
  1. W !,?INDENT,"5",?C2S,"Race of Patient"
  1. W !,?INDENT,"6",?C2S,"Sex of Patient"
  1. S DIR(0)="LAO"_U_"1:6"
  1. S DIR("A")="Enter encounter selection attribute number(s) "
  1. S DIR("?",1)="This response may be a single number, a list, or a range, e.g. 2 or 1,3 or 2-5."
  1. S DIR("?")="The valid numbers are 1 through 6."
  1. S DIR("??")=U_"D ECATHELP^PXRRECSC"
  1. D ^DIR K DIR
  1. I $D(DIROUT) S DTOUT=1
  1. I $D(DTOUT) Q
  1. I $D(DUOUT) G ECAT
  1. S PXRRECAT=Y
  1. Q
  1. ;
  1. ECATHELP ;
  1. W !!,"Enter the number(s) corresponding to the desired selection attribute(s)."
  1. W !,"For example 1,2,4 would cause selection attributes for service category,"
  1. W !,"location, and patient sex to be established."
  1. Q
  1. ;
  1. ;
  1. ;=======================================================================
  1. ENTYPE ;Get the list of encounter types.
  1. N DIEA,ENTYPE,IC,JC,NENTY,PCEENTY,VALID,X,Y
  1. K DIRUT,DTOUT,DUOUT
  1. ;Build a list of allowed encounter types.
  1. D HELP^DIE(9000010,"",15003,"S","ENTYPE")
  1. S NENTY=ENTYPE("DIHELP")
  1. S DIR("?")=" "
  1. S DIR("?",1)="The possible encounter types for the report are:"
  1. S JC=0
  1. S PCEENTY=""
  1. F IC=2:1:NENTY D
  1. . S X=$P(ENTYPE("DIHELP",IC)," ",1)
  1. . S PCEENTY=PCEENTY_X
  1. . S JC=JC+1
  1. . S DIR("?",JC)=ENTYPE("DIHELP",IC)
  1. S NENTY=JC
  1. S DIR("??")=U_"D ENTYHELP^PXRRECSC"
  1. ENTTP ;
  1. S DIR(0)="FU"_U_"1:"_NENTY
  1. S DIR("A")="Select ENCOUNTER TYPES"
  1. S DIR("B")="P"
  1. W !
  1. D ^DIR K DIR
  1. I $D(DIROUT) S DTOUT=1
  1. I $D(DTOUT)!($D(DUOUT)) Q
  1. ;Make sure we have a valid list.
  1. S VALID=$$VLIST^PXRRGUT(PCEENTY,Y," is an invalid encounter type!")
  1. I 'VALID G ENTTP
  1. S PXRRENTY=$$UP^XLFSTR(Y)
  1. Q
  1. ;
  1. ENTYHELP ;?? help for encounter types.
  1. W !!,"Enter the letter(s) corresponding to the desired encounter type or types."
  1. W !,"For example POS would allow only encounters with encounter types of"
  1. W !,"primary, occasion of service, and stop code to be included."
  1. Q
  1. ;
  1. ;=======================================================================
  1. SCAT ;Get the list of service categories.
  1. N DIEA,IC,JC,NSC,PCESVC,SCA,VALID,X,Y
  1. K DIRUT,DTOUT,DUOUT
  1. ;Build a list of allowed service categories. PCE uses a subset of the
  1. ;categories in the file. These are stored in PCESVC.
  1. S PCESVC="AHITSEDX"
  1. D HELP^DIE(9000010,"",.07,"S","SCA")
  1. S NSC=SCA("DIHELP")
  1. S DIR("?")=" "
  1. S DIR("?",1)="The possible service categories for the report are:"
  1. S JC=0
  1. F IC=2:1:NSC D
  1. . S X=$P(SCA("DIHELP",IC)," ",1)
  1. . I PCESVC[X D
  1. .. S JC=JC+1
  1. .. S DIR("?",JC)=SCA("DIHELP",IC)
  1. S NSC=JC
  1. S DIR("??")=U_"D SCATHELP^PXRRECSC"
  1. SCATP ;
  1. S DIR(0)="FU"_U_"1:"_NSC
  1. S DIR("A")="Select SERVICE CATEGORIES"
  1. S DIR("B")="AI"
  1. W !
  1. D ^DIR K DIR
  1. I $D(DIROUT) S DTOUT=1
  1. I $D(DTOUT)!($D(DUOUT)) Q
  1. ;Make sure we have a valid list.
  1. S VALID=$$VLIST^PXRRGUT(PCESVC,Y," is an invalid service category!")
  1. I 'VALID G SCATP
  1. S PXRRSCAT=$$UP^XLFSTR(Y)
  1. Q
  1. ;
  1. SCATHELP ;?? help for service categories.
  1. W !!,"Enter the letter(s) corresponding to the desired service category or categories."
  1. W !,"For example AHTE would allow only encounters with service categories of"
  1. W !,"ambulatory, hospitalization, telecommunications, and event (historical) to be included."
  1. Q
  1. ;