Print Page as PDF
MCARUTL2 ICR (3279)

MCARUTL2    ICR (3279)

Name Value
NUMBER 3279
IA # 3279
DATE CREATED 2001/01/02
CUSTODIAL PACKAGE CLINICAL PROCEDURES
CUSTODIAL ISC Chicago
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE MCARUTL2
NAME MCARUTL2
GENERAL DESCRIPTION

These APIs allow the Imaging package access to the Medicine package
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.
STATUS Active
KEYWORDS
  • MEDICINE
  • API
  • IMAGING
DURATION Till Otherwise Agreed
ID MCARUTL2
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
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    <tab>K VAR
<tab>S DFN=33,SUB=75
<tab>S FROM=2990101,TO=3001231
<tab>D SUB^MCARUTL2(.VAR,DFN,SUB,FROM,TO)
or
Case 2    <tab>K VAR
<tab>S DFN=33,SUB="GENERIC SUBSPECIALTY"
<tab>D SUB^MCARUTL2(.VAR,DFN,SUB)

Example of Return Array:
Case 1 Where there was a FROM and TO date for the patient.
Case 2 Would pickup all data for the patient.  In both cases
the data would be 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 TYPE VARIABLES DESCRIPTION
.ARRAY Both

(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(0) = Piece1_^_Piece2
Piece1 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
and 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 that 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).
DFN Input

(Required)
The Internal Entry Number of
the Patient with in MEDICAL
PATIENT file (#690).
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).
FROM Input

(Optional) The start date for the
procedure in File Manager format.
TO Input

(Optional) The end date for the
procedure in File Manager format.
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:
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Output

Internal Entry Number on the
Medical Patient File (#690).
PATSUB

This API will return all of the sub-specialties for a
given patient with in the Medicine package.

Coding example of Query call:
<tab> KILL VAR
<tab> 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 TYPE VARIABLES DESCRIPTION
.ARRAY Both

(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(0) = Piece1_^_Piece2
Piece1 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.
DFN Input

(Required)
The Internal Entry Number of the
Patient with in MEDICAL PATIENT file
(#690).