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

PXCECSTP.m

Go to the documentation of this file.
  1. PXCECSTP ;ISL/dee - Used to add a new visit from a secondary credit stop for a main visit in the Update Encounter display ;7/30/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**22**;Aug 12, 1996
  1. Q
  1. ;
  1. ;Line with the line label "FORMAT"
  1. ;;Long name~File Number~Node Subscripts~Allow Duplicate entries (not used on visit)~File global name
  1. ; 1 2 3 4 5
  1. ;
  1. ;Following lines:
  1. ;;Node~Piece~,Field Number~Edit Label~Display Label~Display Routine~Edit Routine~Help Text for DIR("?")~Set of PXCEKEYS that can Edit~D if Detail Display Only~
  1. ; 1 ~ 2 ~ 3 ~ 4 ~ 5 ~ 6 ~ 7 ~ 8 ~ 9 ~ 10
  1. ;The Display & Edit routines are for special cases.
  1. ;
  1. FORMAT ;;Stop Code~9000010~0,21,150,800,811,812~~^AUPNVSIT
  1. ;;0~1~.01~Encounter Date and Time: ~Encounter Date and Time: ~~EVISITDT^PXCEVSIT(1)~~~
  1. ;;0~8~.08~Stop Code: ~Stop Code: ~$$DISPLY08^PXCECSTP~EWORKLOD^PXCECSTP~~~B
  1. ;;
  1. ;
  1. ;********************************
  1. ;Special cases for display of visit are in PXCEVSIT.
  1. ;
  1. ;********************************
  1. ;Special cases for edit of visit are in PXCEVSIT.
  1. ;
  1. EWORKLOD ;
  1. I $P(PXCEAFTR(0),"^",7)="E" D Q
  1. . W !,"Historical Encounters cannot have Stop Codes."
  1. . D WAIT^PXCEHELP
  1. . S (PXCEEND,PXCEQUIT,PXCELOOP)=1
  1. N DIC,DA,PXCANODE
  1. I $P(PXCEAFTR(150),"^",3)="P"!(PXCEFIEN'>0) D
  1. . S PXCEAFTR(0)=$P(PXCEAFTR(0),"^",1)_"^^^^"_$P(PXCEAFTR(0),"^",5,6)_"^^^^^^"_PXCEVIEN_"^^^^^^^^^"_$P(PXCEAFTR(0),"^",21,22)
  1. . S PXCEAFTR(150)="^"_$P(PXCEAFTR(150),"^",2)_"^S"
  1. . S PXCEAFTR(800)=""
  1. . S PXCEAFTR(811)=""
  1. . S PXCEAFTR(812)="^"_PXCEPKG_"^"_PXCESOR
  1. . F PXCENODE=0,21,150,800,811,812 S ^TMP("PXK",$J,"VST",1,PXCENODE,"BEFORE")=""
  1. . S ^TMP("PXK",$J,"VST",1,"IEN")=""
  1. S $P(PXCEAFTR(0),"^",1)=+^AUPNVSIT(PXCEVIEN,0)
  1. EWORKLD2 ;
  1. K DTOUT,DUOUT,DIC
  1. I $P(PXCEAFTR(0),"^",8)]"" D
  1. . N DIERR,PXCEDILF,PXCEINT,PXCEEXT
  1. . S PXCEINT=$P(PXCEAFTR(0),"^",8)
  1. . S Y=+PXCEINT
  1. . S PXCEEXT=$$EXTERNAL^DILFD(PXCEFILE,$P(PXCETEXT,"~",3),"",PXCEINT,"PXCEDILF")
  1. . S DIC("B")=$S('$D(DIERR):PXCEEXT,1:PXCEINT)
  1. S DIC="^DIC(40.7,"
  1. S DIC(0)="AEMQ"
  1. S DIC("S")="I ($P(^(0),U,3)=""""!($P(^(0),U,3)'<$P(PXCEAFTR(0),U)))&($P(^(0),U,2)'=900)"
  1. S DIC("A")=$P(PXCETEXT,"~",4)
  1. D ^DIC
  1. K DIR,DA
  1. I +Y'>0!$D(DTOUT)!$D(DUOUT) S (PXCEEND,PXCEQUIT,PXCELOOP,PXCENOER)=1 Q
  1. S $P(PXCEAFTR(0),"^",8)=+Y
  1. Q
  1. ;
  1. ;********************************
  1. ;Display text for the .01 field which is a Date and Time.
  1. ;(Must have is called by ASK^PXCEVFI2 and DEL^PXCEVFI2.)
  1. DISPLY01(PXCEVSIT) ;
  1. S PXCESC=$P(PXCEVSIT,"^",8)
  1. Q:PXCESC<1 ""
  1. G DISPLAY
  1. ;
  1. DISPLY08(PXCESC) ;
  1. DISPLAY N DIC,DR,DA,DIQ,PXCEDIQ1
  1. S DIC=40.7
  1. S DR=".01;1"
  1. S DA=PXCESC
  1. S DIQ="PXCEDIQ1"
  1. S DIQ(0)="E"
  1. D EN^DIQ1
  1. Q $J($G(PXCEDIQ1(40.7,DA,1,"E")),3)_" "_$G(PXCEDIQ1(40.7,DA,.01,"E"))
  1. ;