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

VSITPUT1.m

Go to the documentation of this file.
  1. VSITPUT1 ;ISD/RJP - Continued...Verify/set fields and file visit record ;6/20/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**76**;Aug 12, 1996
  1. ; Patch PX*1*76 changes the 2nd line of all VSIT* routines to reflect
  1. ; the incorporation of the module into PCE. For historical reference,
  1. ; the old (VISIT TRACKING) 2nd line is included below to reference VSIT
  1. ; patches.
  1. ;
  1. ;;2.0;VISIT TRACKING;**3**;Aug 12, 1996;
  1. ;
  1. ;Routine called by ^VSITPUT
  1. K DD,DO,DA,DIC,DIK,X,Y,DLAYGO
  1. L +^XTMP("VSIT CREATE",+$G(VSIT("PAT")),+VSIT("VDT")):0 Q:'$T
  1. D:+$G(DINUM)
  1. . S DLAYGO=9000010
  1. . S DIC="^AUPNVSIT("
  1. . S DIC(0)=""
  1. . S X=+VSIT("VDT")
  1. . D FILE^DICN
  1. . L:+Y>0 +^AUPNVSIT(+Y)
  1. . K DLAYGO,DIC,DD,DO,X
  1. D:'+$G(DINUM)
  1. . N VSITI
  1. . S VSITI=$P(^AUPNVSIT(0),"^",3)
  1. . F S VSITI=VSITI+1 L +^AUPNVSIT(VSITI):1 Q:$T&'$D(^AUPNVSIT(VSITI)) L -^AUPNVSIT(VSITI)
  1. . S ^AUPNVSIT(VSITI,0)=VSIT("VDT")
  1. . S ^AUPNVSIT("B",VSIT("VDT"),VSITI)=""
  1. . L +^AUPNVSIT(0)
  1. . S ^AUPNVSIT(0)=$P(^AUPNVSIT(0),"^",1,2)_"^"_VSITI_"^"_($P(^(0),"^",4)+1)
  1. . L -^AUPNVSIT(0)
  1. . L:VSITI'>0 -^AUPNVSIT(VSITI)
  1. . S Y=VSITI_"^"_VSIT("VDT")_"^1"
  1. D:Y>0
  1. . S VSIT("IEN")=Y
  1. . S $P(^AUPNVSIT(+Y,0),"^",2,99)=$P(VSITREC(0),"^",2,99)
  1. . S:$G(VSITREC(21))]"" ^AUPNVSIT(+Y,21)=VSITREC(21)
  1. . S:$G(VSITREC(150))]"" ^AUPNVSIT(+Y,150)=VSITREC(150)
  1. . S:$G(VSITREC(800))]"" ^AUPNVSIT(+Y,800)=VSITREC(800)
  1. . S:$G(VSITREC(811))]"" ^AUPNVSIT(+Y,811)=VSITREC(811)
  1. . S:$G(VSITREC(812))]"" ^AUPNVSIT(+Y,812)=VSITREC(812)
  1. . S DA=+Y,DIK="^AUPNVSIT(" D IX1^DIK K DIK
  1. . ;
  1. . ;IHS/ITSC/LJF 6/19/2003 adding fields required by IHS
  1. . NEW DIE,DR S DIE="^AUPNVSIT(",DR="1104///^S X=$$UID^AUPNVSIT("_DA_")" D ^DIE
  1. . I $$GET1^DIQ(9999999.39,1,.16,"I")="V" D ;if MFI site, need 2 more fields
  1. . . K DR S DR=".15///A;.36///"_$$GET1^DIQ(9999999.39,1,.01,"I") D ^DIE
  1. . ;
  1. . L -^AUPNVSIT(DA)
  1. L -^XTMP("VSIT CREATE",+$G(VSIT("PAT")),+VSIT("VDT"))
  1. K DD,DO,DA,DIC,DIK,X,Y,DLAYGO
  1. Q