public class ORUR01Handler extends Object implements ca.uhn.hl7v2.app.Application
HL7InQueueProcessor
Constructor and Description |
---|
ORUR01Handler() |
Modifier and Type | Method and Description |
---|---|
boolean |
canProcess(ca.uhn.hl7v2.model.Message message)
Always returns true, assuming that the router calling this handler will only call this
handler with ORU_R01 messages.
|
protected Concept |
getConcept(String hl7ConceptId,
String codingSystem,
String uid)
Get a concept object representing this conceptId and coding system.
|
Form |
getForm(ca.uhn.hl7v2.model.v25.segment.MSH msh)
needs to find a Form based on information in MSH-21. example: 16^AMRS.ELD.FORMID
|
List<ca.uhn.hl7v2.model.v25.segment.NK1> |
getNK1List(ca.uhn.hl7v2.model.v25.message.ORU_R01 oru)
finds NK1 segments in an ORU_R01 message. all HAPI-rendered Messages have at least one NK1
segment but if the original message truly does not contain an NK1, the setID will be null on
the generated NK1
|
ca.uhn.hl7v2.model.Message |
processMessage(ca.uhn.hl7v2.model.Message message)
Processes an ORU R01 event message
Should create encounter and obs from hl7 message
Should create basic concept proposal
Should create concept proposal and with obs alongside
Should not create problem list observation with concept proposals
Should append to an existing encounter
Should create obs group for OBRs
Should create obs valueCodedName
Should fail on empty concept proposals
Should fail on empty concept answers
Should set value_Coded matching a boolean concept for obs if the answer is 0 or 1 and
Question datatype is coded
Should set value as boolean for obs if the answer is 0 or 1 and Question datatype is Boolean
Should set value_Numeric for obs if Question datatype is Numeric and the answer is either 0
or 1
Should set value_Numeric for obs if Question datatype is Numeric
Should fail if question datatype is coded and a boolean is not a valid answer
Should fail if question datatype is neither Boolean nor numeric nor coded
Should create an encounter and find the provider by identifier
Should create an encounter and find the provider by personId
Should create an encounter and find the provider by uuid
Should create an encounter and find the provider by providerId
Should fail if the provider name type code is not specified and is not a personId
Should understand form uuid if present
Should prefer form uuid over id if both are present
Should prefer form id if uuid is not found
Should set complex data for obs with complex concepts
|
protected void |
processNK1(Patient patient,
ca.uhn.hl7v2.model.v25.segment.NK1 nk1)
process an NK1 segment and add relationships if needed
|
public boolean canProcess(ca.uhn.hl7v2.model.Message message)
canProcess
in interface ca.uhn.hl7v2.app.Application
public ca.uhn.hl7v2.model.Message processMessage(ca.uhn.hl7v2.model.Message message) throws ca.uhn.hl7v2.app.ApplicationException
processMessage
in interface ca.uhn.hl7v2.app.Application
ca.uhn.hl7v2.app.ApplicationException
protected void processNK1(Patient patient, ca.uhn.hl7v2.model.v25.segment.NK1 nk1) throws ca.uhn.hl7v2.HL7Exception
patient
- nk1
- ca.uhn.hl7v2.HL7Exception
- Should create a relationship from a NK1 segment
Should not create a relationship if one exists
Should create a person if the relative is not found
Should fail if the coding system is not 99REL
Should fail if the relationship identifier is formatted improperly
Should fail if the relationship type is not foundpublic List<ca.uhn.hl7v2.model.v25.segment.NK1> getNK1List(ca.uhn.hl7v2.model.v25.message.ORU_R01 oru) throws ca.uhn.hl7v2.HL7Exception
oru
- ORU_R01 message to be parsed for NK1 segmentsca.uhn.hl7v2.HL7Exception
protected Concept getConcept(String hl7ConceptId, String codingSystem, String uid) throws ca.uhn.hl7v2.HL7Exception
hl7ConceptId
- the given hl7 conceptIdcodingSystem
- the coding system for this conceptid (e.g. 99DCT)uid
- unique string for this message for any error reporting purposesca.uhn.hl7v2.HL7Exception
public Form getForm(ca.uhn.hl7v2.model.v25.segment.MSH msh) throws ca.uhn.hl7v2.HL7Exception
msh
- ca.uhn.hl7v2.HL7Exception
Copyright © 2024 OpenMRS Inc.. All rights reserved.