/** * 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; }
public static void main(String[] args) throws JAXBException { final JAXBContext context = JAXBContext.newInstance(ID.class); final Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); final ID id = new ID(); id.setEntryMethod("method"); ObjectFactory o = new ObjectFactory(); id.getContent().add("sample text"); id.getContent().add(o.createIDID1("id1")); m.marshal(id, System.out); }
} 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 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); }
/** * 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); }
} else if (assigningAuthority.equals(HL7Constants.HL7_AUTHORITY_LOCAL)) { String idType = identifier.getIdentifierTypeCode().getValue(); try { if (idType.equals(HL7Constants.HL7_ID_PERSON)) {
/** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new ST(getMessage()); case 1: return new ID(getMessage(), new Integer( 398 )); default: return null; } }
String id = hl7Provider.getIDNumber().getValue(); String assignAuth = hl7Provider.getAssigningAuthority().getUniversalID().getValue(); String type = hl7Provider.getAssigningAuthority().getUniversalIDType().getValue(); String errorMessage; if (StringUtils.hasText(id)) {
/** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new ST(getMessage()); case 1: return new ID(getMessage(), new Integer( 398 )); default: return null; } }
String relCodingSystem = nk1.getRelationship().getNameOfCodingSystem().getValue(); if (!relCodingSystem.equals(HL7Constants.HL7_LOCAL_RELATIONSHIP)) { throw new HL7Exception(Context.getMessageSourceService().getMessage("ORUR01.error.relationshipCoding",