Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

OPKG^XUHUI(): Monitor New Style Cross-referenced Fields

Reference Type: Supported, Category: Field Monitoring, Integration Agreement: 3589

Description

This API allows other packages to task an Option or Protocol from a New Style cross-reference. This API can be used to monitor any field or fields in any file using a New Style cross-reference.

Format

     OPKG^XUHUI([xuhuiop,]xuhuinm[,xuhuia],xuhuixr)

Input Parameters

xuhuiop: (optional) This parameter is a set of Numeric codes that tells the Unwinder to use the PROTOCOL file (#101) or the OPTION file (#19). If this parameter is null, the default value will be used (i.e., "101"):
  • 101 (default)—PROTOCOL file (#101) will be used.

  • 19—The OPTION file (#19) will be used.
xuhuinm: (required) This parameter is the NAME (#.01) value of the Protocol or Option that is to be launched.
xuhuia: (optional) This parameter is a Set of Codes. If this input parameter is null, the default value will be used (i.e., "S"):
  • S (default)—The data being passed is from the SETting of the cross-reference.

  • K—The data being passed is from the KILLing of the cross-reference.
xuhuixr: (required) This parameter is the name of the cross-reference.

Output

See Example Monitored Fields with a New Style cross-reference.

Example

The Hui Project needs to monitor the following fields at the top level of the NEW PERSON file (#200) for changes in value, in the order listed:

Create New Style Cross-references

Create a MUMPS New Style cross-reference for the fields that are to be monitored for value changes, as shown below:

Index Name: AXUHUI (#n)

Short Description: Hui Project Top File Cross-reference

      Description: This MUMPS New Style cross-reference is on non-multiple
                   fields in the NEW PERSON file (#200) that the Hui Project
                   needs to monitor for changes in value.  The following fields
                   are being monitored in the order listed: 

                          .01 (NAME) 
                           9.2 (TERMINATION DATE) 
                           5 (DOB) 
                           9 (SSN) 
                   For details on how this cross-reference processes changes,
                   please refer to the patch description for Kernel Patch XU*8*236.
                   For more detailed information about the MUMPS New Style 
                   cross-reference, please refer to the "VA FileMan V. 22.0 Key  
                   and Index Tutorial" at the following web address: 

            http://vista.med.va.gov/fileman/fileMan_training/online_pres/FMtut_frm.htm
            (see Lessons #5 and #6)

               Type: MUMPS

          EXECUTION: RECORD

                Use: ACTION

      Set Logic:  D OPKG^XUHUI("","XUHUI FIELD CHANGE EVENT","","AXUHUI") Q 
     Kill Logic:  Q 
     Whole Kill:  Q 
           X(1):  NAME  (200,.01)  (forwards) 
           X(2):  TERMINATION DATE  (200,9.2)  (forwards) 
           X(3):  DOB  (200,5)  (forwards) 
           X(4):  SSN  (200,9)  (forwards)

 

Sample Scenario

Change a monitored (cross-referenced) field(s) value in the NEW PERSON file (#200), as shown below:

INPUT TO WHAT FILE: NEW PERSON// <Enter> 
 EDIT WHICH FIELD: ALL// DOB  
 THEN EDIT FIELD: SSN 
 THEN EDIT FIELD: <Enter>
   
 Select NEW PERSON NAME: KRNUSER <Enter>   KRNUSER,ONE     OK 
 DOB: JUL 4,1950// 12.24.49 <Enter> (DEC 24, 1949) 
 SSN: 000220000// 000558888

Here we have changed ONE KRNUSER's Date of Birth (DOB) from 07/04/50 to 12/24/49 and changed his Social Security Number (SSN) from 000-22-0000 to 000-55-8888. Since these fields are being monitored (i.e., MUMPS New Style cross-reference, see the "Create Cross-references" topic), we should see this data passed to the "XUHUI FIELD CHANGE EVENT" protocol (see the " Internal Results for Developers"topic).

 

Internal Results for Developer

The following data is passed to the "XUHUI FIELD CHANGE EVENT" Protocol via the Kernel OPKG^XUHUI API that is called in the AXUHUI cross-reference (see the "Create Cross-references" topic). (Comments about the data are displayed in boldface type and in italics.)

 -------------------------------------------------------------------------
 If executing the Kill logic, then the 'X' array will  be equal to the 'X1'
 array.  If executing the Set logic, then the 'X' array will be equal to
 the 'X2' array.  
 -------------------------------------------------------------------------
 X=KRNUSER,ONE 
 X(1)=KRNUSER,ONE 
 X(2)= 
 X(3)=2491224 
 X(4)=000558888 
 -------------------------------------------------------------------------
 X1=KRNUSER,ONE  <-- Old values are in this array. 
 X1(1)=KRNUSER,ONE 
 X1(2)= 
 X1(3)=2500704 
 X1(4)=999220000 
 -------------------------------------------------------------------------
 X2=KRNUSER,ONE  <-- New values are in this array. 
 X2(1)=KRNUSER,ONE 
 X2(2)= 
 X2(3)=2491224 
 X2(4)=000558888 
 -------------------------------------------------------------------------
 XUHUIA=S  <-- "S" = Set Logic is being executed, "K" = Kill logic being executed. 
 XUHUIDA=70  <-- "DA" array.
 XUHUIFIL=200  <-- File number.
 XUHUIFLD=  <-- Field number(s) if available. 
 XUHUINM=XUHUI FIELD CHANGE EVENT  <-- Name of Extended Action entry in 
                                        File #101 or in File #19.
 XUHUIOP=101 <-- File number of where to find the Extended Action.
 XUHUIX=KRNUSER,ONE  <-- The "X" array. 
 XUHUIX(1)=KRNUSER,ONE 
 XUHUIX(2)= 
 XUHUIX(3)=2491224 
 XUHUIX(4)=000558888 
 XUHUIX1=KRNUSER,ONE  <-- The "X1" array. 
 XUHUIX1(1)=KRNUSER,ONE 
 XUHUIX1(2)= 
 XUHUIX1(3)=2500704 
 XUHUIX1(4)=999220000 
 XUHUIX2=KRNUSER,ONE  <-- The "X2" array. 
 XUHUIX2(1)=KRNUSER,ONE 
 XUHUIX2(2)= 
 XUHUIX2(3)=2491224 
 XUHUIX2(4)=000558888 
 XUHUIXR=AXUHUI  <-- Name of cross-reference being executed by DIK.

 


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.