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

RMPR29CB.m

Go to the documentation of this file.
  1. RMPR29CB ;OI-HINES/HNC/SPS -WORK ORDER SUSPENSE RPC CONT.;06/06/2006
  1. ;;3.0;PROSTHETICS;**75**;Feb 09, 1996;Build 25
  1. CANOTE ;(#12) CANCELLATION NOTE
  1. ;set file 668
  1. ;^RMPR(668,D0,4,0)=^668.012^^
  1. ;if status is cancelled, RMSUSTAT= 3 or 4
  1. ;RMPRTXT ;load into field #12
  1. ;^RMPR(668,D0,4,D1,0)
  1. ;
  1. S RMWONE=$P(^RMPR(664.1,RMPR6641,0),U,13)
  1. I RMSUSTAT=4 D EN2^RMPROWL(RMIE68,RMWONE)
  1. I $P(^RMPR(668,RMIE68,0),U,10)="C" S RESULTS(0)="0^This Suspense has already been Closed!"
  1. ;Update file 664.1 664.2 Delete 660 on Cancel out
  1. S DIE="^RMPR(664.1,",DA=RMPR6641
  1. S DR="16////^S X=""CA"";7////^S X=DUZ;8///^S X=DT" D ^DIE
  1. K DR,DA,DIE
  1. S RMIE=0,DIK="^RMPR(660,"
  1. F S RMIE=$O(^RMPR(664.1,RMPR6641,2,RMIE)) Q:RMIE'>0 D
  1. .S DA=$P(^RMPR(664.1,RMPR6641,2,RMIE,0),U,5) D ^DIK
  1. .S $P(^RMPR(664.1,RMPR6641,2,RMIE,0),U,5)=""
  1. .S RMPRIE2=$P($G(^RMPR(664.1,RMPR6641,2,RMIE,0)),U,6)
  1. .I +RMPRIE2>0 S $P(^RMPR(664.2,RMPRIE2,0),U,2)=""
  1. .K ^RMPR(664.2,"C",DA)
  1. K DIK
  1. S DA=RMIE68
  1. D NOW^%DTC S RMPREODT=%,GMRCAD=%
  1. S DIE="^RMPR(668,"
  1. S DR="18////^S X=RMPREODT;17////^S X=DUZ;14///^S X=""X""" D ^DIE
  1. N RMPRC
  1. S L="",LN=0
  1. F S L=$O(RMPRTXT(L)) Q:L="" D
  1. . I 'LN D Q:RMPRC="" ;strip leading space from 1st line, ignore blank line
  1. .. S RMPRC=$E($TR(RMPRTXT(L)," ","")) ;1st non space char
  1. .. S:RMPRC'="" RMPRTXT(L)=$E(RMPRTXT(L),$F(RMPRTXT(L),RMPRC)-1,$L(RMPRTXT(L))) ;extract from 1st non space char to end of line
  1. .. Q
  1. . S LN=LN+1,^RMPR(668,RMIE68,4,LN,0)=RMPRTXT(L)
  1. . Q
  1. S $P(^RMPR(668,RMIE68,4,0),"^",3)=LN
  1. K L,LN
  1. ;S DA=RMIE68,DIK="^RMPR(668," D IX1^DIK
  1. I '$P(^RMPR(668,DA,0),U,9) D
  1. .S DIE="^RMPR(668,"
  1. .S DR="7///^S X=""See Completion Note for Initial Action Taken."""
  1. .D ^DIE
  1. .S DR="10////^S X=RMPREODT;16////^S X=DUZ" D ^DIE
  1. K RMPREODT
  1. S GMRCO=$P(^RMPR(668,RMIE68,0),U,15)
  1. I GMRCO="" S RESULTS(0)="0^Completed Manual Suspense Action. Suspense status has been updated to CANCELLED." Q
  1. S RMPRCOM=0
  1. F S RMPRCOM=$O(^RMPR(668,RMIE68,4,RMPRCOM)) Q:RMPRCOM="" D
  1. .S GMRCOM(RMPRCOM)=^RMPR(668,RMIE68,4,RMPRCOM,0)
  1. I $G(GMRCOM)="" S GMRCOM="Not Noted"
  1. S GMRCSF="U"
  1. S GMRCA=19
  1. S GMRCALF="N"
  1. S GMRCATO=""
  1. S (GMRCORNP,GMRCDUZ)=DUZ
  1. S BDC=$$SFILE^GMRCGUIB(.GMRCO,.GMRCA,.GMRCSF,.GMRCORNP,.GMRCDUZ,.GMRCOM,.GMRCALF,.GMRCATO,.GMRCAD)
  1. I +BDC=1 S RESULTS(0)=1_"^"_$P(BDC,U,2)
  1. K GMRCO,GMRCA,GMRCSF,GMRCORNP,GMRCDUZ,GMRCOM,GMRCALF,GMRCATO,GMRCAD
  1. I RESULTS(0)="" S RESULTS(0)="0^Completed Suspense Action, and Posted note to CPRS Consult. Suspense status has been updated to CANCELLED."
  1. Q
  1. EXIT K RMTYRE,RMTRES,RMSUSTAT,RMSTAT,RMSERV,RMEQU,RMPRTST,RMPRDUZ,RMPRDI,RMPRCO,RMPR6641,RMIE68
  1. K RMIE60,RMIE,RMICD9,RMDWRT,RMDAT,RMCODT,RMAMIS,RMAA,RM688,RMPRTXT
  1. K BDC,BAD,%,RMINDT,RMPREQU,RMPRCOM,RMWONE,RMPRIE2