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

GMPLISRV.m

Go to the documentation of this file.
  1. GMPLISRV ; SLC/MKB -- Problem List Service file utility ;8/26/93 16:30
  1. ;;2.0;Problem List;;Aug 25, 1994
  1. EN ; Main entry point
  1. ;W !!!?5,"*** Please update your Service File (#49) at this time ***"
  1. N X D HELP,NOTE
  1. EN1 I $D(^DIC(49,"F")) S DIR(0)="E" D ^DIR G:'Y ENQ W @IOF D CURRENT
  1. F D Q:$D(GMPDONE)!($D(GMPQUIT))
  1. . R !,"Select CLINICAL SERVICE: ",X:DTIME
  1. . I '$T!(X["^") S GMPQUIT=1 Q
  1. . I X="" S GMPDONE=1 Q
  1. . I X="?" D HELP,CURRENT Q
  1. . I X["??" D HELP H 3 D LISTALL Q
  1. . I X?1"-".E D REMOVE Q
  1. . D ADD
  1. ENQ K GMPSERV,GMPDONE,GMPQUIT,GMPRMOVE
  1. Q
  1. ;
  1. HELP ; Write [introductory] help text
  1. W !!?10,"Please designate those services that are clinical, that are"
  1. W !?10,"directly involved in patient care, by entering them below."
  1. W !?10,"If you select a 'parent' service, you will have the option"
  1. W !?10,"to automatically mark all of its sub-services as well."
  1. W !?10,"To de-select a service as clinical, enter the name of the"
  1. W !?10,"service preceded by a minus sign (-)."
  1. Q
  1. ;
  1. NOTE ; Display additional note
  1. W !!,?10,"NOTE:"
  1. W !?10,"Problems will be assigned a category based upon the service"
  1. W !?10,"of the clinician responsible for entering and/or treating"
  1. W !?10,"them; ONLY clinical services will be allowed. The problem"
  1. W !?10,"list may then be searched or displayed according to the"
  1. W !?10,"desired discipline.",!!
  1. Q
  1. ;
  1. CURRENT ; Display currently designated clinical services, in GMPSERV()
  1. N DIC,D,DZ W !!,"CURRENTLY SELECTED CLINICAL SERVICES"
  1. S DIC="^DIC(49,",DIC(0)="E",DIC("S")="I $P(^(0),U,9)=""C"""
  1. S D="B",DZ="??" D DQ^DICQ
  1. Q
  1. ;
  1. LISTALL ; Display all entries in the Service file
  1. N DIC,D,DZ W !!,"ALL "_$P($G(^DIC(4,+$G(DUZ(2)),0)),U)_" SERVICES"
  1. S DIC="^DIC(49,",DIC(0)="E",D="B",DZ="??"
  1. D DQ^DICQ
  1. Q
  1. ;
  1. CKPG ; Check paging
  1. N DIR,X,Y
  1. I $Y>(IOSL-4) S DIR(0)="E" D ^DIR S:'Y GMPQUIT=1
  1. Q
  1. ;
  1. REMOVE ; Delete clinical flag
  1. N DIC,DR,DA,DIE
  1. S X=$E(X,2,999),DIC="^DIC(49,",DIC(0)="EQM" D ^DIC Q:Y<0
  1. S DA=+Y,DIE=DIC,DR="1.7////@" D ^DIE
  1. W ?50,"... Clinical flag removed",!
  1. Q
  1. ;
  1. ADD ; Add clinical flag to service
  1. N DIC,DR,DA,DIE,GMPIFN
  1. S DIC="^DIC(49,",DIC(0)="EQM" D ^DIC Q:Y<0
  1. S DA=+Y,DIE=DIC,DR="1.7////C" D ^DIE
  1. W " ... Clinical flag added",!
  1. Q:'$D(^DIC(49,"ACHLD",DA)) ; not a parent service
  1. W !,$P(^DIC(49,DA,0),U)_" has the following sub-services: " S GMPIFN=DA
  1. F I=0:0 S I=$O(^DIC(49,"ACHLD",GMPIFN,I)) Q:I'>0 W !?3,$P(^DIC(49,I,0),U)
  1. Q:'$$INCLCHLD^GMPLPRF1(GMPIFN) ; don't include sub-services
  1. F I=0:0 S I=$O(^DIC(49,"ACHLD",GMPIFN,I)) Q:I'>0 D
  1. . S DA=I,DR="1.7////C" D ^DIE
  1. . W !?3,$P(^DIC(49,I,0),U)_" ... Clinical flag added"
  1. W !
  1. Q