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

PXKFVST.m

Go to the documentation of this file.
  1. PXKFVST ;ISL/JVS - Fields for VISIT file ;7/29/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**22,56,111**;Aug 12, 1996
  1. ;
  1. ; Adding or Editing of data in a particular field can be controlled
  1. ;by adding a ~ as a delimiter and the letters A and/or E to the
  1. ;end of the line of text which represents what could be added
  1. ;to the DR string in a DIE call.
  1. ; 1. If none or all three(~AE) of these characters are added then
  1. ; the data in this field can be either added or edited.
  1. ; 2. If only the ~ is added then the data in this field can be
  1. ; neither added or edited.
  1. ; 3. IF only the ~A is added then the data can only be added to
  1. ; the file for this field but not edited.
  1. ; 4. If only the ~E is added the the data can only be edited in
  1. ; this file for this field. (not a likely possibility)
  1. ;
  1. ; The word "OPTION" in front of the line of text below tells the
  1. ;software to determine,based on the data, the appropriateness
  1. ;of using either a "///" or "////" stuff in a DIE call.
  1. ;
  1. ; The information on line tag 0 $P(,," * ",1) are the piece numbers
  1. ;of the fields on the zero node that are required by the data
  1. ;dictionary and are checked for to determine if enough data is present
  1. ;to proceed without any errors. $P(,," * ",2) are the nodes and
  1. ;piece numbers of the fields used to determine duplicates in the
  1. ;file (node+piece (eg. 12+4)). $P(,," * ",3) is a flag use to
  1. ;determine if duplicates are allowed in this visit file.
  1. ;If it is set to 0 then no duplicate checks will occur. If it is
  1. ;set to 1 then the file will be checked for duplicates based on
  1. ;the information in $P 2.
  1. ;
  1. ; The following is the file's global name. Each global must have a
  1. ;unique name and can not have any subscripts as part of the global root.
  1. GLOBAL ;;^AUPNVSIT
  1. ;
  1. EN1 ;
  1. S PXKER=""
  1. S PXKER=$P($T(@PXKNOD+PXKPCE),";;",2) Q
  1. EN2 ;
  1. S PXKFD=""
  1. S PXKFD=$P($T(@PXKNOD+PXKPCE),";;",2) D
  1. .I PXKFD="" S PXKPCE=PXKPCE+1 D EN2
  1. Q
  1. ADD ;Add an entry to the file
  1. Q
  1. 0 ;;1,3,5,7,8,22 * * 0
  1. ;;.01///^S X=$G(~
  1. ;;.02///^S X=$G(~
  1. ;;
  1. ;;.03///^S X=$G(~
  1. ;;.05////^S X=$G(~
  1. ;;.06////^S X=$G(~
  1. ;;.07///^S X=$G(~
  1. ;;.08////^S X=$G(~
  1. ;;.09///^S X=$G(~
  1. ;;
  1. ;;.11///^S X=$G(~
  1. ;;.12////^S X=$G(~
  1. ;;.13///^S X=$G(~
  1. ;;
  1. ;;
  1. ;;
  1. ;;
  1. ;;.18///^S X=$G(~
  1. ;;
  1. ;;
  1. ;;.21////^S X=$G(~
  1. ;;.22////^S X=$G(~
  1. ;;.23////^S X=$G(~
  1. ;;.24////^S X=$G(~
  1. 21 ;;
  1. ;;2101///^S X=$G(~
  1. 800 ;;
  1. ;;80001///^S X=$G(~
  1. ;;80002///^S X=$G(~
  1. ;;80003///^S X=$G(~
  1. ;;80004///^S X=$G(~
  1. ;;80005///^S X=$G(~ ;added 6/17/98 for MST enhancement
  1. ;;80006///^S X=$G(~ ;PX*1*111 - added for HNC enhancement
  1. 812 ;;
  1. ;;81201///^S X=$G(
  1. ;;81202////^S X=$G(
  1. ;;81203////^S X=$G(
  1. ;
  1. UPD ;Up date visit file using visit tracking
  1. ;--new VSIT to make sure that non are left around after call
  1. N PXTMPVST
  1. S PXTMPVST=VSIT("IEN")
  1. N VSIT
  1. S VSIT("IEN")=PXTMPVST
  1. I $G(PXKAV(0,8))]"" D
  1. .I PXKAV(0,8)="@" S VSIT("DSS")="@"
  1. .E D
  1. ..K ^UTILITY("DIQ1",$J)
  1. ..S DIC=40.7,DA=+$G(PXKAV(0,8)),DIQ(0)="I",DR=1 D EN^DIQ1
  1. ..S VSIT("DSS")=$G(^UTILITY("DIQ1",$J,40.7,DA,1,"I"))
  1. K ^UTILITY("DIQ1",$J),DIQ,DR,DA,DIC
  1. I $G(PXKAV(0,6))]"" S VSIT("INS")=$G(PXKAV(0,6))
  1. I $G(PXKAV(0,18))]"" S VSIT("COD")=$G(PXKAV(0,18))
  1. ;--cannot edit "ELG"
  1. I $G(PXKAV(0,22))]"" S VSIT("LOC")=$G(PXKAV(0,22))
  1. ;
  1. N PXOLD800
  1. S PXOLD800=$G(^AUPNVSIT(VSIT("IEN"),800))
  1. I $G(PXKAV(800,1))=1 D
  1. .I $P(PXOLD800,"^",2)'="" S PXKAV(800,2)="@"
  1. .I $P(PXOLD800,"^",3)'="" S PXKAV(800,3)="@"
  1. .I $P(PXOLD800,"^",4)'="" S PXKAV(800,4)="@"
  1. .I $P(PXOLD800,"^",5)'="" S PXKAV(800,5)="@" ;added 6/17/98 for MST enhancement
  1. .;PX*1*111 - added for HNC enhancement
  1. .I $P(PXOLD800,"^",6)'="" S PXKAV(800,6)="@"
  1. ;
  1. I $G(PXKAV(800,1))]"" S VSIT("SC")=$G(PXKAV(800,1))
  1. I $G(PXKAV(800,2))]"" S VSIT("AO")=$G(PXKAV(800,2))
  1. I $G(PXKAV(800,3))]"" S VSIT("IR")=$G(PXKAV(800,3))
  1. I $G(PXKAV(800,4))]"" S VSIT("EC")=$G(PXKAV(800,4))
  1. I $G(PXKAV(800,5))]"" S VSIT("MST")=$G(PXKAV(800,5)) ;added 6/17/98 for MST enhancement
  1. ;PX*1*111 - added for HNC enhancement
  1. I $G(PXKAV(800,6))]"" S VSIT("HNC")=$G(PXKAV(800,6))
  1. D UPD^VSIT
  1. K VSIT("DSS"),VSIT("COD"),VSIT("SC"),VSIT("AO"),VSIT("IR"),VSIT("EC")
  1. K VSIT("LOC"),VSIT("INS"),VSIT("ELG"),VSIT("MDT")
  1. ;PX*1*111 - added for HNC enhancement
  1. K VSIT("MST"),VSIT("HNC")
  1. Q
  1. SPEC ;
  1. Q