@Override public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) { CodeSystem cs = fetchCodeSystem(theContext, theCodeSystem); if (cs != null) { boolean caseSensitive = true; if (cs.hasCaseSensitive()) { caseSensitive = cs.getCaseSensitive(); } CodeValidationResult retVal = testIfConceptIsInList(theCode, cs.getConcept(), caseSensitive); if (retVal != null) { return retVal; } } return new CodeValidationResult(IssueSeverity.WARNING, "Unknown code: " + theCodeSystem + " / " + theCode); }
public org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent convertCodeSystem(org.hl7.fhir.dstu3.model.CodeSystem src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent(); copyElement(src, tgt); tgt.setSystem(src.getUrl()); tgt.setVersion(src.getVersion()); tgt.setCaseSensitive(src.getCaseSensitive()); for (ConceptDefinitionComponent cc : src.getConcept()) tgt.addConcept(convertCodeSystemConcept(src, cc)); return tgt; }
@Override public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) { CodeSystem cs = fetchCodeSystem(theContext, theCodeSystem); if (cs != null) { boolean caseSensitive = true; if (cs.hasCaseSensitive()) { caseSensitive = cs.getCaseSensitive(); } CodeValidationResult retVal = testIfConceptIsInList(theCode, cs.getConcept(), caseSensitive); if (retVal != null) { return retVal; } } return new CodeValidationResult(IssueSeverity.WARNING, "Unknown code: " + theCodeSystem + " / " + theCode); }
if (!def.getCaseSensitive()) { return codeInDefine(def.getConcept(), code, def.getCaseSensitive());
tgt.getCodeSystem().setSystem(srcCS.getUrl()); tgt.getCodeSystem().setVersion(srcCS.getVersion()); tgt.getCodeSystem().setCaseSensitive(srcCS.getCaseSensitive()); for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent cs : srcCS.getConcept()) processConcept(tgt.getCodeSystem().getConcept(), cs, srcCS);
tgt.setCopyright(src.getCopyright()); if (src.hasCaseSensitive()) tgt.setCaseSensitive(src.getCaseSensitive()); if (src.hasValueSet()) tgt.setValueSet(src.getValueSet());
public org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent convertCodeSystem(org.hl7.fhir.dstu3.model.CodeSystem src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent tgt = new org.hl7.fhir.instance.model.ValueSet.ValueSetCodeSystemComponent(); copyElement(src, tgt); tgt.setSystem(src.getUrl()); tgt.setVersion(src.getVersion()); tgt.setCaseSensitive(src.getCaseSensitive()); for (ConceptDefinitionComponent cc : src.getConcept()) tgt.addConcept(convertCodeSystemConcept(src, cc)); return tgt; }
caseSensitive = system.getCaseSensitive();
tgt.getCodeSystem().setSystem(srcCS.getUrl()); tgt.getCodeSystem().setVersion(srcCS.getVersion()); tgt.getCodeSystem().setCaseSensitive(srcCS.getCaseSensitive()); for (org.hl7.fhir.dstu3.model.CodeSystem.ConceptDefinitionComponent cs : srcCS.getConcept()) processConcept(tgt.getCodeSystem().getConcept(), cs, srcCS);
tgt.setCopyright(src.getCopyright()); if (src.hasCaseSensitive()) tgt.setCaseSensitive(src.getCaseSensitive()); if (src.hasValueSet()) tgt.setValueSet(src.getValueSet());