$TXT Created by ACKERMAN,WILLIAM A at DEV.DEV.ISC-CHICAGO.VA.GOV (KIDS) on MONDAY, 02/26/01 at 14:53 ============================================================================= Run Date: MAR 05, 2001 Designation: MC*2.3*30 Package : MC - MEDICINE Priority: Mandatory Version : 2.3 SEQ #29 Status: Released ============================================================================= Subject: MEDICINE INTERFACE (MCARUTL2, MCARUTL3) Category: - Enhancement (Mandatory) - Routine Description: ============ Test Sites: ========== Mountain Home VAMC Boston VAMC Iron Mountain VAMC Jackson VAMC San Francisco VAMC Little Rock VAMC Portland VAMC Associated DBIAs: ================ 3279 MCARUTL2 3280 MCARUTL3 ROUTINE: MCARUTL2 Description: These APIs allow packages access to the Medicine package Imaging data. The APIs will do lookups on the MEDICAL PATIENT File (#690) and the PROCEDURE/SUBSPECIALTY file (#697.2) and return data from the associated Medicine files. COMPONENT: SUB For a Patient in the MEDICAL PATIENT file (#690) and Procedure in the PROCEDURE/SUBSPECIALTY file (#697.2), this component will return all of the requested procedures performed on that patient. Coding example of Query call: Case 1 K VAR S DFN=33,SUB=75 S FROM=2990101,TO=3001231 D SUB^MCARUTL2(.VAR,DFN,SUB,FROM,TO) or Case 2 K VAR S DFN=33,SUB="GENERIC SUBSPECIALTY" D SUB^MCARUTL2(.VAR,DFN,SUB) Example of Return Array: Case 1 In this case the programmer has chosen to pass a date range for the program to use as a filter. The date range filter is activated by passing a FROM and a TO date range for the API to filter against. Case 2 In this case the program chose not to filter out any procedures. The return ARRAY is returned in the following format. VAR=3 VAR(0)=1^3 GENERIC SUBSPECIALTY Procedures found for Patient ROBERTSON,JOHN VAR(1)=Nov 24, 2000@13:09^GENERIC SUBSPECIALTY^ROBERTSON,JOHN^MCAR(699.5^30^1^ VAR(1,2005,1)=16 VAR(2)=Nov 24, 2000@15:13^GENERIC SUBSPECIALTY^ROBERTSON,JOHN^ MCAR(699.5^32^0^ VAR(3)=Nov 24, 2000@15:23^GENERIC SUBSPECIALTY^ROBERTSON,JOHN^MCAR(699.5^ 33^0^ VARIABLES: .ARRAY (Input/output) (Required) .ARRAY = The return array where the data will be placed. Recommend the array should be namespaced. Return Array: ARRAY can be any variable array that the developer chooses. Recommend the array be namespaced. The API returns all of the procedures found for the patient in the variable array specified. When the API returns the data it will be placed into the variable array specified. ARRAY = The total number of procedures found for this Patient. ARRAY(0) = Piece1_^_Piece2 Piece1 Returns either 1 or 0. 1 Indicates that the component returned data. 0 Indicates that the component failed. Piece2 is an informational message either indicating how many entries were found for the patient or an error message stating why the component failed. X = Is a sequential number from 1 to the total number of procedures found as indicated by ARRAY. ARRAY(X) = Piece1_^_Piece2_^_Piece3_^_Piece4_^_Piece5 _^_Piece6_^ Piece1 is the date and time of the procedure in an External format. Piece2 is procedure name within PROCEDURE /SUBSPECIALTY file (#697.2). Piece3 is Patient name. Piece4 is MCAR concatenated with "(" and the file number where the procedure can be found within the Medicine package. Piece5 is the Internal Entry Number of the procedure within the file as indicated in Piece 4 Piece6 indicates whether or not the system found associated images. 1 indicates that there are images for this procedure. 0 indicates no images where found. Y = Is a sequential number from 1 to the last IMAGE that is associated with this procedure. ARRAY(X,2005,Y) = Is the IEN of the image within the IMAGE file (#2005). VARIABLES: DFN (Input) (Required) The Internal Entry Number of the Patient within MEDICAL PATIENT file (#690). VARIABLES: SUB (Input) (Required) Either the Internal Entry Number within the PROCEDURE/SUBSPECIALTY file (#697.2) or the Free Text Name of the entry in PROCEDURE/ SUBSPECIALTY file (#697.2). VARIABLES: FROM (Input) (Optional) The start date for the procedure in File Manager format. VARIABLES: TO (Input) (Optional) The end date for the procedure in File Manager format. COMPONENT: PATLK This API is for selecting valid Medicine patients. The calling code would make an extrinsic function call to this entry point and the user would be prompted for a patient. After a patient has been selected the API will pass back the Medical Patient File (#690) internal entry number for that patient. It will return a -1 if a patient is not selected. Coding example of Query call: S X=$$PATLK^MCARUTL2 User interface: Select MEDICAL PATIENT NAME: LANDO,JOSEPH LANDO,JOSEPH 1-5-57 3456711 66 YES ACTIVE DUTY Enrollment Priority: GROUP 1 Category: IN PROCESS End Date: > W X 24 NOTE: No input variables are required. VARIABLES: IEN (Output) Internal Entry Number on the Medical Patient File (#690) or -1 for no patient is selected. COMPONENT: PATSUB This API will return all of the sub-specialties for a given patient within the Medicine package. Coding example of Query call: KILL VAR D PATSUB^MCARUTL2(.VAR,DFN) Example of Return Array: VAR=8 VAR(0)=1^There were 8 procedures found for patient ROBERTSON,JOHN VAR(1)=ECG^2^2 VAR(2)=EP^4^1 VAR(3)=COL^8^1 VAR(4)=BMA^12^1 VAR(5)=BMB^13^1 VAR(6)=CONSULT^15^2 VAR(7)=PFT^23^10 VAR(8)=HEM^58^1 VARIABLES: .ARRAY (Input/Output) (Required) The total number of procedures found for this patient. .ARRAY = Recommend the return array should be namespaced. Return Values: ARRAY can be any variable array that the developer chooses. When the API returns the data it will be placed into the variable array specified. ARRAY = The total number of procedures found for this Patient. ARRAY(0) = Piece1_^_Piece2 Piece1 Returns either 1 or 0. 1 Indicates that the component returned data. 0 Indicates that the component failed. Piece2 is an informational message either indicating how many entries were found for the patient or an error message stating why the component failed. X = Is a sequential number from 1 to the total number of procedures found as indicated by ARRAY. ARRAY(X) = Piece1_^_Piece2_^_Piece3 Piece1 is procedure name within PROCEDURE/ SUBSPECIALTY file (#697.2). Piece2 is Internal Entry Number within PROCEDURE/ SUBSPECIALTY file (#697.2). Piece3 Total number of entries for that patient for that subspecialty. VARIABLES: DFN (Input) (Required) The Internal Entry Number of the Patient within MEDICAL PATIENT file (#690). ROUTINE: MCARUTL3 Description: This API is to allow a package to pass in a Medicine procedure file number and the Internal Entry Number of the procedure and return detailed information about the procedure. The Medicine Procedure file range is 691 through 701 excluding 697.2. COMPONENT: MEDLKUP This component will return all information on the indicated procedure and last associated image if any. The indicated procedure file is validated against the PROCEDURE/SUBSPECIALITY File (#697.2). Only those procedures listed on the PROCEDURE/SUBSPECIALITY File (#697.2) will be used. In this example the programmer is getting information on entry 33 in the GENERALIZED PROCEDURE/CONSULT 699.5 file. Coding example of Query call: K IMAGE S FN=699.5,IEN=33 D MEDLKUP^MCARUTL3(.IMAGE,FN,IEN) Example of Return Array: IMAGE=1^699.5^30^33^ROBERTSON,JOHN^3001124.1309^ Nov 24, 2000@13:09^75^GENERIC SUBSPECIALTY^1^10 VARIABLES: .ARRAY (Input/Output) (Required) .ARRAY = The return array where the data will be placed. Recommend the array should be namespaced. Return Values: ARRAY can be any variable array that the developer chooses. When the API returns the data it will be placed into the variable array specified. ARRAY = Piece1_^_Piece2_^_Piece3_^_ Piece4_^_Piece5_^_ Piece6_^_ Piece7_^_Piece8_^_Piece9_^_ Piece10_^_Piece11 Piece1 Returns either 1 or 0. 1 Indicates that the component returned data. 0 Indicates that the component failed. If the component fails Piece 2 will contain text indicating why the component failed. Piece2 The file number within the Medicine package. Piece3 The Internal Entry Number of the entry within the file indicated by Piece2. Piece4 The Internal Entry Number of the patient within the Medical Patient File (690). Piece5 The External format of the patient name. Piece6 The Procedure date and time in File Manager format. Piece7 The Procedure date and time in External format. Piece8 Pointer to the PROCEDURE/SUBSPECIALTY file (697.2) Piece9 The Name of the Procedure indicated in Piece8. Piece10 The internal entry number of the last image entry within the 2005 multiple in the indicated procedure. For example, ^MCAR(FN,IEN,2005,X,0) where X is the last entry. X is what is returned as Piece 10. Piece11 The internal entry number of the entry within the IMAGE file (#2005) indicated by Piece 10. VARIABLES: FN (Input) (Required) The File number within the Medicine package. VARIABLES: IEN (Input) (Required) The Internal Entry Number of the entry within the indicated file as specified by FN. Routine Summary: =============== Below is a list of the routines included in this patch. The second line of each of these routines now looks like: ;;2.3;Medicine;**Patch List**;09/13/1996 CHECK^XTSUMBLD results Routine Name Before Patch After Patch Patch List ------------ ------------ ----------- ------------- MCARUTL2 NA 9171929 30 MCARUTL3 NA 3682316 30 Installation Instructions: ========================== 1) This patch can be installed with users on the system. Installation should take less than five minutes. These routines are not recommended for mapping. 2) Use the INSTALL/CHECK MESSAGE Option on the PackMan Menu to Load the KIDS Transport Distribution Global. 3) From the Kernel Installation and Distribution System (KIDS) menu, Select the Installation menu. 4) From the Installation menu you may elect to use the following options (When prompted for INSTALL NAME, enter MC*2.3*30): a. Compare Transport Global to Current System b. Verify Checksums in Transport Global c. Backup a Transport Global d. Print Transport Global 5) Use the Install Package(s) option and select the Package 'MC*2.3*30'. 6) When prompted 'Want KIDS to INHIBIT LOGONS during the install? YES//' answer NO. 7) When prompted 'Want to DISABLE Scheduled Options, Menu Options, and Protocols? YES//' answer NO. Routine Information: ==================== Routine Name: - MCARUTL2 Routine Checksum: Routine Name: - MCARUTL3 Routine Checksum: ============================================================================= User Information: Entered By : ACKERMAN,WILLIAM Date Entered : DEC 19, 2000 Completed By: REZNIK,CHARMAINE Date Completed: MAR 01, 2001 Released By : EICHELBERGER,NANCY Date Released : MAR 05, 2001 ============================================================================= Packman Mail Message: ===================== $END TXT