/** * Returns Identifier (component 1). This is a convenience method that saves you from * casting and handling an exception. */ public ST getIdentifier() { return getTyped(0, ST.class); }
/** * Creates a new CWE type */ public CWE(Message message) { super(message); init(); }
log.debug(" CWE observation"); CWE value = (CWE) obx5; String valueIdentifier = value.getIdentifier().getValue(); log.debug(" value id = " + valueIdentifier); String valueName = value.getText().getValue(); log.debug(" value name = " + valueName); if (isConceptProposal(valueIdentifier)) { 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())); obs.setValueDrug(valueDrug); } else {
/** * Derive a concept name from the CWE component of an hl7 message. * * @param cwe * @return * @throws HL7Exception */ private ConceptName getConceptName(CWE cwe) throws HL7Exception { ST altIdentifier = cwe.getAlternateIdentifier(); ID altCodingSystem = cwe.getNameOfAlternateCodingSystem(); return getConceptName(altIdentifier, altCodingSystem); }
/** * 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); }
private void init() { data = new Type[9]; data[0] = new ST(getMessage()); data[1] = new ST(getMessage()); data[2] = new ID(getMessage(), 396); data[3] = new ST(getMessage()); data[4] = new ST(getMessage()); data[5] = new ID(getMessage(), 396); data[6] = new ST(getMessage()); data[7] = new ST(getMessage()); data[8] = new ST(getMessage()); }
private void init() { data = new Type[9]; data[0] = new ST(getMessage()); data[1] = new ST(getMessage()); data[2] = new ID(getMessage(), 396); data[3] = new ST(getMessage()); data[4] = new ST(getMessage()); data[5] = new ID(getMessage(), 396); data[6] = new ST(getMessage()); data[7] = new ST(getMessage()); data[8] = new ST(getMessage()); }
private void init() { data = new Type[2]; data[0] = new CWE(getMessage()); data[1] = new ST(getMessage()); }
/** * Returns Alternate Coding System Version ID (component 8). This is a convenience method that saves you from * casting and handling an exception. */ public ST getCwe8_AlternateCodingSystemVersionID() { return getTyped(7, ST.class); }
/** * Creates a new CWE type */ public CWE(Message message) { super(message); init(); }
private void init() { data = new Type[2]; data[0] = new CWE(getMessage()); data[1] = new ST(getMessage()); }
/** * Returns Name of Alternate Coding System (component 6). This is a convenience method that saves you from * casting and handling an exception. */ public ID getNameOfAlternateCodingSystem() { return getTyped(5, ID.class); }
/** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new CE(getMessage()); case 1: return new CWE(getMessage()); case 2: return new CE(getMessage()); case 3: return new CWE(getMessage()); case 4: return new CE(getMessage()); case 5: return new CWE(getMessage()); default: return null; } }
/** * Returns Name of Alternate Coding System (component 6). This is a convenience method that saves you from * casting and handling an exception. */ public ID getCwe6_NameOfAlternateCodingSystem() { return getTyped(5, ID.class); }
/** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new CE(getMessage()); case 1: return new CWE(getMessage()); case 2: return new CE(getMessage()); case 3: return new CWE(getMessage()); case 4: return new CE(getMessage()); case 5: return new CWE(getMessage()); default: return null; } }
/** * Returns Original Text (component 9). This is a convenience method that saves you from * casting and handling an exception. */ public ST getOriginalText() { return getTyped(8, ST.class); }
/** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { case 0: return new CWE(getMessage()); case 1: return new CWE(getMessage()); case 2: return new TX(getMessage()); case 3: return new XCN(getMessage()); case 4: return new XCN(getMessage()); default: return null; } }
/** * Returns Alternate Coding System Version ID (component 8). This is a convenience method that saves you from * casting and handling an exception. */ public ST getAlternateCodingSystemVersionID() { return getTyped(7, ST.class); }