Print Page as PDF
GMV LOCATION SELECT ICR (4461)

GMV LOCATION SELECT    ICR (4461)

Name Value
NUMBER 4461
IA # 4461
DATE CREATED 2006/01/03
CUSTODIAL PACKAGE GEN. MED. REC. - VITALS
USAGE Private
TYPE Remote Procedure
DBIC APPROVAL STATUS APPROVED
NAME GMV LOCATION SELECT
REMOTE PROCEDURE GMV LOCATION SELECT
GENERAL DESCRIPTION

NAME: GMV LOCATION SELECT
TAG: RPC
ROUTINE: GMVRPCHL
RETURN VALUE TYPE: GLOBAL ARRAY
AVAILABILITY: SUBSCRIPTION
INACTIVE: ACTIVE
WORD WRAP ON: TRUE
DESCRIPTION:   Select a hospital location by name, from a patient appointment
or from a patient admission.

INPUT PARAMETER: OPTION
PARAMETER TYPE: LITERAL
MAXIMUM DATA LENGTH: 10
REQUIRED: YES
SEQUENCE NUMBER: 1
DESCRIPTION:
Routine tag line in GMVRPCHL to call.
INPUT PARAMETER: DATA
PARAMETER TYPE: LITERAL
MAXIMUM DATA LENGTH: 100
REQUIRED: YES
SEQUENCE NUMBER: 2
DESCRIPTION:
Other data as required for the call.
RETURN PARAMETER DESCRIPTION:
This remote procedure call allows the user to select a hospital
location.

The entry point is RPC^GMVRPCHL. It has input parameters of RESULTS,
OPTION and DATA (ex. RPC^GMVRPCHL(.RESULTS,OPTION,DATA).

The RESULTS variable will contain the ^TMP("GMVHLOC",$J) global array
reference. The ^TMP("GMVHLOC",$J) global array contains the results.

The OPTION variable identifies a line label in the GMVRPCHL routine that
will be invoked to process the call.

The DATA variable contains any additional values needed by the OPTION
variable to process the call.

1) When the OPTION value is NAME, this RPC will do a file lookup.

The DATA value is a three part value separated by carets(^). The first
part is a file number. The second part is a value to look up. The third
part is the field or fields to do the look up on. If the third piece is
not defined, the lookup is done on the .01 field of the file.

The TMP global contains:
^TMP("GMVHLOC",$J,0)=piece1
^TMP("GMVHLOC",$J,n)=piece2^piece3

where piece1 = number of entries found
piece2 = file number, a semi-colon and record IEN
piece3 = field value

Example:
>S OPTION="NAME",DATA="44^OUTPATIENT^.01"
>D RPC^GMVRPCHL(.RESULT,OPTION,DATA) ZW RESULT
>RESULT="^TMP("GMVHLOC",539052767)"
>D ^%G
>Global ^TMP("GMVHLOC",$J
>^TMP("GMVHLOC",539052767,0)=3
1)=44;75^OUTPATIENT NUC MED
2)=44;74^OUTPATIENT RADIOLOGY
3)=44;80^OUTPATIENT ULTRASOUND


2) When the OPTION value is APPT, this RPC will return a list of clinic
appointments for the patient.

The DATA value is a four part value separated by carets(^). The first
piece is DFN. The second piece is the start date of the search. If
not defined, this value defaults to 365 days prior to today. The third
piece is the end date of the search. If not defined, the value defaults
to today. Both dates are in FileMan internal format. The fourth piece is
a string of numbers to indicate what types of appointments to return. If
not defined, the value defaults to "123456789" (i.e., all appointment
types) where:

1 - Active/Kept
2 - Inpatient appts. only
3 - No-shows
4 - No-shows, auto-rebook
5 - Cancelled by clinic
6 - Cancelled by clinic, auto rebook
7 - Cancelled by patient
8 - Cancelled by patient, auto rebook
9 - No action taken

The TMP global contains:
^TMP("GMVHLOC",$J,0)=piece1
^TMP("GMVHLOC",$J,n)=piece2^piece3^piece4^piece5^piece6^piece7
^piece8^piece9^

where piece1 = number of entries found
piece2 = date/time of appt (FM internal)
piece3 = date/time of appt (external)
piece4 = hospital location IEN (FILE 44)
piece5 = hospital location name (FILE 44, Field .01)
piece6 = appt status (internal)
piece7 = appt status (external)
piece8 = appt type (internal)
piece9 = appt type (external)

Example:
> S OPTION="APPT",DATA="78^3051201^3051206^"
> D RPC^GMVRPCHL(.RESULT,OPTION,DATA) ZW RESULT
> RESULT="^TMP("GMVHLOC",539052767)"
> D ^%G
> Global ^TMP("GMVHLOC",$J
> ^TMP("GMVHLOC",539052767,0)=1
1)=3051206.1^DEC 6,2005@10:00^88^WEIGHT
CLINIC^^^9^REGULAR

3) When the OPTION value is ADMIT, this RPC will return a list of
hospital admissions for the patient specified.

The DATA value is the patient's DFN.

The TMP global contains:
^TMP("GMVHLOC",$J,0)=piece1
^TMP("GMVHLOC",$J,n)=piece2^piece3^piece4^piece5^piece6

where piece1 = number of entries found
piece2 = date/time of admission (external)
piece3 = hospital location IEN (FILE 44)
piece4 = hospital location name (FILE 44, Field .01)
piece5 = type of movement (FILE 405.1, Field .01)
piece6 = movement IEN (FILE 405)

Example:
> S OPTION="ADMIT",DATA=134
> D RPC^GMVRPCHL(.RESULT,OPTION,DATA) ZW RESULT
> RESULT="^TMP("GMVHLOC",539052767)"
> D ^%G
> Global ^TMP("GMVHLOC",$J
> ^TMP("GMVHLOC",539052767,0)=1
1)=Apr 09, 2001 1:48:43 pm^67^
2-ASM^DIRECT^1712


If an error is encountered for NAME, ADMIT or APPT, a "-1" followed by a
caret and the error message text (i.e., -1^error message) is returned in
RESULT(0).
STATUS Active
DURATION Till Otherwise Agreed
SUBSCRIBING PACKAGE ORDER ENTRY/RESULTS REPORTING