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

ACHSDFC.m

Go to the documentation of this file.
  1. ACHSDFC ; IHS/ITSC/PMF - DEFERRED SERVICE CANCEL ; [ 12/06/2002 10:36 AM ]
  1. ;;3.1;CONTRACT HEALTH MGMT SYSTEM;**18**;JUN 11, 2001
  1. ;ACHS*3.1*4 patient lookup changes
  1. ;IHS/SET/GTH ACHS*3.1*5 12/06/2002 - Prevent <UNDEF>.
  1. ;ACHS*3.1*18 4/1/2010;IHS/OIT/ABK;Change every occurrance of Deferred to Unmet Need
  1. ;
  1. D VIDEO^ACHS
  1. LOOK ; --- Lookup a Deferred service, ask Cancel
  1. N ACHSDA,DA,DIC,DIE,DR
  1. W !!
  1. ;
  1. ;ACHS*3.1*4 4/19/02 pmf change patient look up
  1. ;S DIC="^ACHSDEF("_DUZ(2)_",""D""," ; ACHS*3.1*4
  1. ;S DIC(0)="QAEMZ" ; ACHS*3.1*4
  1. ;S DA(1)=DUZ(2) ; ACHS*3.1*4
  1. ;S DIC("A")="Enter the DEFERRED SERVICE NUMBER or PATIENT NAME: " ; ACHS*3.1*4
  1. ;S DIC("S")="I $E($P($G(^(0)),U))'=""#"",$P($G(^(0)),U,14)'=""Y""" ; ACHS*3.1*4
  1. ;S DIC("W")="W "" ""_$S($P($G(^(0)),U,5)=""Y"":$P($G(^DPT($P($G(^(0)),U,6),0)),U),$P($G(^(0)),U,5)=""N"":$P($G(^(0)),U,7),1:""UNDEFINED"")" ; ACHS*3.1*4
  1. ;D ^DIC ; ACHS*3.1*4
  1. ;I +Y<1 D END Q ; ACHS*3.1*4
  1. ;I $D(DTOUT)!$D(DUOUT) D END Q ; ACHS*3.1*4
  1. ;S ACHSDA=+Y ; ACHS*3.1*4
  1. ;
  1. ;{ABK, 3/31/10}K DFN S ACHDOCT="deferral" ; ACHS*3.1*4
  1. K DFN S ACHDOCT="unmet need" ; ACHS*3.1*4
  1. D ^ACHSDFLK ; ACHS*3.1*4
  1. I $D(ACHDLKER) D RTRN^ACHS Q ; ACHS*3.1*4
  1. S ACHSDA=ACHSA ; ACHS*3.1*4
  1. ;
  1. ;{ABK, 3/31/10}W !!,*7,*7,IORVON,"Are You Sure You Want To Cancel This Deferred Services Document? ",IORVOFF,!!,IORVON,"Once Cancelled It Can Never Be Retrieved Again.",IORVOFF,!!
  1. ;{ABK, 3/31/10}S %=$$DIR^ACHS("Y","Do you want to CANCEL this Deferred Services Document","NO","Once Cancelled It Can Never Be Retrieved Again.","",2)
  1. W !!,*7,*7,IORVON,"Are You Sure You Want To Cancel This Unmet Needs Document? ",IORVOFF,!!,IORVON,"Once Cancelled It Can Never Be Retrieved Again.",IORVOFF,!!
  1. S %=$$DIR^ACHS("Y","Do you want to CANCEL this Unmet Needs Document","NO","Once Cancelled It Can Never Be Retrieved Again.","",2)
  1. ;
  1. I $D(DUOUT)!$D(DTOUT) D END Q
  1. G NOT:'%
  1. ;
  1. SET ; --- Cancelling Deferred Service
  1. I '$$LOCK^ACHS("^ACHSDEF(DUZ(2),""D"",ACHSDA)","+") D END Q
  1. ;{ABK, 3/31/10}W !!,*7,*7,"Now Cancelling Deferred Service Number ",$$DF^ACHS(0,1),IORVOFF
  1. W !!,*7,*7,"Now Cancelling Unmet Need Number ",$$DF^ACHS(0,1),IORVOFF
  1. S DA=ACHSDA
  1. ;
  1. ;S DIE=DIC;ACHS*3.1*5 12/06/2002
  1. S DIE="^ACHSDEF("_DUZ(2)_",""D""," ;ACHS*3.1*5 12/06/2002
  1. ;
  1. S DR="14///Y"
  1. D ^DIE
  1. ;{ABK, 3/31/10}W !!,*7,*7,"DEFERRED SERVICES DOCUMENT CANCELLED",!!
  1. W !!,*7,*7,"UNMET NEEDS DOCUMENT CANCELLED",!!
  1. I '$$LOCK^ACHS("^ACHSDEF(DUZ(2),""D"",ACHSDA)","-")
  1. D END
  1. Q
  1. ;
  1. NOT ;
  1. ;{ABK, 3/31/10}W !!,*7,*7,"DEFERRED SERVICE DOCUMENT NOT CANCELLED, LEFT UNCHANGED",!!
  1. W !!,*7,*7,"UNMET NEED DOCUMENT NOT CANCELLED, LEFT UNCHANGED",!!
  1. END ;
  1. D RTRN^ACHS
  1. Q
  1. ;