/** * Derive a concept name from the CWE component of an hl7 message. * * @param altIdentifier * @param altCodingSystem * @return */ private ConceptName getConceptName(ST altIdentifier, ID altCodingSystem) throws HL7Exception { if (altIdentifier != null && HL7Constants.HL7_LOCAL_CONCEPT_NAME.equals(altCodingSystem.getValue())) { String hl7ConceptNameId = altIdentifier.getValue(); return getConceptName(hl7ConceptNameId); } return null; }
} else if ( structure instanceof ca.uhn.hl7v2.model.v25.segment.MSH ) { messageType = ( (ca.uhn.hl7v2.model.v25.segment.MSH) structure ).getMessageType().getMessageStructure().getValue(); } else if ( structure instanceof ca.uhn.hl7v2.model.v251.segment.MSH ) { messageType =
/** * Get an openmrs Concept object out of the given hl7 coded element * * @param codedElement ce to pull from * @param uid unique string for this message for any error reporting purposes * @return new Concept object * @throws HL7Exception if parsing errors occur */ private Concept getConcept(CE codedElement, String uid) throws HL7Exception { String hl7ConceptId = codedElement.getIdentifier().getValue(); String codingSystem = codedElement.getNameOfCodingSystem().getValue(); return getConcept(hl7ConceptId, codingSystem, uid); }
/** * Get an openmrs Concept object out of the given hl7 coded with exceptions element * * @param codedElement cwe to pull from * @param uid unique string for this message for any error reporting purposes * @return new Concept object * @throws HL7Exception if parsing errors occur */ private Concept getConcept(CWE codedElement, String uid) throws HL7Exception { String hl7ConceptId = codedElement.getIdentifier().getValue(); String codingSystem = codedElement.getNameOfCodingSystem().getValue(); return getConcept(hl7ConceptId, codingSystem, uid); }
} else if (assigningAuthority.equals(HL7Constants.HL7_AUTHORITY_LOCAL)) { String idType = identifier.getIdentifierTypeCode().getValue(); try { if (idType.equals(HL7Constants.HL7_ID_PERSON)) {
String id = hl7Provider.getIDNumber().getValue(); String assignAuth = hl7Provider.getAssigningAuthority().getUniversalID().getValue(); String type = hl7Provider.getAssigningAuthority().getUniversalIDType().getValue(); String errorMessage; if (StringUtils.hasText(id)) {
String relCodingSystem = nk1.getRelationship().getNameOfCodingSystem().getValue(); if (!relCodingSystem.equals(HL7Constants.HL7_LOCAL_RELATIONSHIP)) { throw new HL7Exception(Context.getMessageSourceService().getMessage("ORUR01.error.relationshipCoding",
Concept valueConcept = getConcept(value, uid); obs.setValueCoded(valueConcept); if (HL7Constants.HL7_LOCAL_DRUG.equals(value.getNameOfAlternateCodingSystem().getValue())) { Drug valueDrug = new Drug(); valueDrug.setDrugId(Integer.valueOf(value.getAlternateIdentifier().getValue()));