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

VPRIDX.m

Go to the documentation of this file.
  1. VPRIDX ;SLC/MKB/BLJ -- Create AVPR index ;10/25/18 15:29
  1. ;;1.0;VIRTUAL PATIENT RECORD;**8,28**;Sep 01, 2011;Build 6
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. Q
  1. ;
  1. EN ; -- create index
  1. D GMRV
  1. ;
  1. Q
  1. ;
  1. GMRV ; -- create AVPR index on GMRV Measurement file #120.5
  1. N VPRX,VPRY
  1. S VPRX("FILE")=120.5
  1. S VPRX("NAME")="AVPR"
  1. S VPRX("TYPE")="MU"
  1. S VPRX("USE")="A"
  1. S VPRX("EXECUTION")="R"
  1. S VPRX("ACTIVITY")=""
  1. S VPRX("SHORT DESCR")="Trigger updates to VPR"
  1. S VPRX("DESCR",1)="This is an action index that updates the Virtual Patient Record (VPR)"
  1. S VPRX("DESCR",2)="when any of the fields in this index are changed. No actual cross-"
  1. S VPRX("DESCR",3)="reference nodes are set or killed."
  1. S VPRX("SET")="D GMRV^VPREVNT(X(1),DA,$G(X(3)))"
  1. S VPRX("KILL")="Q"
  1. S VPRX("WHOLE KILL")="Q"
  1. S VPRX("VAL",1)=.02 ;Patient
  1. S VPRX("VAL",2)=1.2 ;Rate
  1. S VPRX("VAL",3)=2 ;Entered in Error
  1. D CREIXN^DDMOD(.VPRX,"kW",.VPRY) ;VPRY=ien^name of index
  1. Q
  1. ;;
  1. PCMM ; -- create ADP index on POSITION ASSIGNMENT HISTORY file #404.52
  1. Q:$D(^SCTM(404.52,"ADP")) ;exists [ICR #7174]
  1. N VPRX,VPRY,I
  1. S VPRX("FILE")=404.52
  1. S VPRX("NAME")="ADP"
  1. S VPRX("TYPE")="R"
  1. S VPRX("USE")="S"
  1. S VPRX("EXECUTION")="R"
  1. S VPRX("SHORT DESCR")="Sort Assignments by Date & Position"
  1. S VPRX("DESCR",1)="This regular index sorts assignment changes by Effective Date and Position."
  1. ;
  1. S VPRX("SET")="S ^SCTM(404.52,""ADP"",X(1),X(2),DA)="""""
  1. S VPRX("KILL")="K ^SCTM(404.52,""ADP"",X(1),X(2),DA)"
  1. S VPRX("WHOLE KILL")="K ^SCTM(404.52,""ADP"")"
  1. S VPRX("VAL",1)=.02 ;Effective Date
  1. S VPRX("VAL",2)=.01 ;Team Position
  1. F I=1,2 S VPRX("VAL",I,"SUBSCRIPT")=I,VPRX("VAL",I,"COLLATION")="F"
  1. D CREIXN^DDMOD(.VPRX,"kW",.VPRY) ;VPRY=ien^name of index
  1. ;
  1. ; queue job to create index in background overnight
  1. I $G(VPRY) D
  1. . N ZTRTN,ZTDTH,ZTDESC,ZTIO,ZTSAVE,ZTUCI,ZTCPU,ZTPRI,ZTKIL,ZTSYNC,ZTSK
  1. . S ZTRTN="SCTM^VPRIDX",ZTDESC="Create SCTM ADP index",ZTIO=""
  1. . S ZTDTH=DT_".2355"
  1. . D ^%ZTLOAD
  1. . I $G(ZTSK) D BMES^XPDUTL("Task #"_ZTSK_" created to build index nodes.") Q
  1. . D BMES^XPDUTL("UNABLE TO QUEUE JOB TO CREATE ADP INDEX NODES!")
  1. . D MES^XPDUTL("Use the VA FileMan Utility option to create the ADP index.")
  1. Q
  1. ;
  1. SCTM ; -- create index nodes
  1. N DIK S DIK="^SCTM(404.52,"
  1. S DIK(1)=".01^ADP"
  1. D ENALL^DIK
  1. Q