Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Entry Points |  FileMan Files Accessed Via FileMan Db Call
Print Page as PDF
Routine: GMRCIUTL

Package: Consult Request Tracking

Routine: GMRCIUTL


Information

GMRCIUTL ;SLC/JFR - UTILITIES FOR INTER-FACILITY CONSULTS ; Jun 18, 2024@15:00:56

Source Information

Source file <GMRCIUTL.m>

Entry Points

Name Comments DBIA/ICR reference
DIV(LOC) ; get the division from a hospital location
; Input -- LOC HOSPITAL LOCATION file (#44) IEN
; Output -- INSTITUTION file (#4) IEN^INSTITUTION file (#4) NAME
HLNAME(GMRCWHO)
UNHLNAME(GMRCNM,GMRCNMC,STD,DEL) ;return regular name from HL7 name
TRIMWP(ARRAY,PIECE) ;trim OBX or NTE segments so that only comment remains
; Input:
; ARRAY = the array in which the segments are contained
; ex. ^TMP("GMRCIF",541083753,"OBX",3,3)=3|TX|^COMMENTS^|3|text "
; PIECE = the piece in the array where the text lives
;
; Output:
; trimmed array
; ex. ^TMP("GMRCIF",541083753,"OBX",3,3)="text"
VALMSG(GMRCPID,GMRCORC) ; determine if message is valid
URG(GMRCO) ;return urgency code to send in HL7 msg
; Input:
; GMRCO = consult ien from file 123
GETSERV(GMRCSRV) ;return local service from IFC service in HL7 msg
GETPROC(GMRCSID) ;return procedure and sercvice ordered by IFC
CODEOI(GMRCDA) ; look at ordered procedure or service and code it for IFC msg
RESP(GMRCAC,GMRCMID,GMRCOC,GMRCDA,GMRCERR) ;build and send appl ACK/NAK
; Input:
; GMRCAC = acknowledgement code (AA or AR)
; GMRCMID = message id from original msg
; GMRCOC = order control from original msg ORC
; GMRCDA = ien of consult being worked on
; GMRCERR = only defined if an error is found
LOGMSG(GMRCO,GMRCACT,GMRCMSG,GMRCER) ;create or update IFC MESSAGE LOG entry
EDIPI(DFN) ; p184
ADD2PID(PIDSGMNT,DFN,ACCTNO) ; P184
ADD2OBR(OBRSGMNT,CONSULT) ; P184
INCERNER(DFN) ;
NOSND() ;Do not respond to the sent comment.
ERR101 ;Unknown Consult/Procedure request
ERR201 ;Unknown Patient
ERR202 ;Local or unknown MPI identifiers
ERR203 ;Patient not in Cerner
ERR205 ;Waiting for treating facility list to be updated
ERR301 ;Service not matched to receiving facility
ERR401 ;Procedure not matched to receiving facility
ERR501 ;Error in procedure name
ERR601 ;Multiple services matched to procedure
ERR701 ;Error in Service name
ERR702 ;Service is Disabled
ERR703 ;Procedure is Inactive
ERR801 ;Inappropriate action for specified request
ERR802 ;Duplicate, activity not filed
ERR901 ;Unable to update record successfully
ERR902 ;Earlier pending transactions
ERR903 ;HL Logical Link not found
ERR904 ;VistA HL7 unable to send transaction

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^GMR(123 - [#123] GET1^DIQ
123.02 GETS^DIQ
^GMR(123.3 - [#123.3] FIND1^DIC
^GMR(123.5 - [#123.5] FIND1^DIC
^VA(200 - [#200] GET1^DIQ
^DIC(4 - [#4] GET1^DIQ
Info |  Source |  Entry Points |  FileMan Files Accessed Via FileMan Db Call