use of org.hl7.fhir.r5.model.TerminologyCapabilities in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent.
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent(Complex parent, String parentType, String name, TerminologyCapabilities.TerminologyCapabilitiesExpansionComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "expansion", name, element, index);
if (element.hasHierarchicalElement())
composeBoolean(t, "TerminologyCapabilities", "hierarchical", element.getHierarchicalElement(), -1);
if (element.hasPagingElement())
composeBoolean(t, "TerminologyCapabilities", "paging", element.getPagingElement(), -1);
if (element.hasIncompleteElement())
composeBoolean(t, "TerminologyCapabilities", "incomplete", element.getIncompleteElement(), -1);
for (int i = 0; i < element.getParameter().size(); i++) composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionParameterComponent(t, "TerminologyCapabilities", "parameter", element.getParameter().get(i), i);
if (element.hasTextFilterElement())
composeMarkdown(t, "TerminologyCapabilities", "textFilter", element.getTextFilterElement(), -1);
}
use of org.hl7.fhir.r5.model.TerminologyCapabilities in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent.
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent(Complex parent, String parentType, String name, TerminologyCapabilities.TerminologyCapabilitiesClosureComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "closure", name, element, index);
if (element.hasTranslationElement())
composeBoolean(t, "TerminologyCapabilities", "translation", element.getTranslationElement(), -1);
}
use of org.hl7.fhir.r5.model.TerminologyCapabilities in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeTerminologyCapabilities.
protected void composeTerminologyCapabilities(Complex parent, String parentType, String name, TerminologyCapabilities element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "TerminologyCapabilities", name, element, index);
if (element.hasUrlElement())
composeUri(t, "TerminologyCapabilities", "url", element.getUrlElement(), -1);
if (element.hasVersionElement())
composeString(t, "TerminologyCapabilities", "version", element.getVersionElement(), -1);
if (element.hasNameElement())
composeString(t, "TerminologyCapabilities", "name", element.getNameElement(), -1);
if (element.hasTitleElement())
composeString(t, "TerminologyCapabilities", "title", element.getTitleElement(), -1);
if (element.hasStatusElement())
composeEnum(t, "TerminologyCapabilities", "status", element.getStatusElement(), -1);
if (element.hasExperimentalElement())
composeBoolean(t, "TerminologyCapabilities", "experimental", element.getExperimentalElement(), -1);
if (element.hasDateElement())
composeDateTime(t, "TerminologyCapabilities", "date", element.getDateElement(), -1);
if (element.hasPublisherElement())
composeString(t, "TerminologyCapabilities", "publisher", element.getPublisherElement(), -1);
for (int i = 0; i < element.getContact().size(); i++) composeContactDetail(t, "TerminologyCapabilities", "contact", element.getContact().get(i), i);
if (element.hasDescriptionElement())
composeMarkdown(t, "TerminologyCapabilities", "description", element.getDescriptionElement(), -1);
for (int i = 0; i < element.getUseContext().size(); i++) composeUsageContext(t, "TerminologyCapabilities", "useContext", element.getUseContext().get(i), i);
for (int i = 0; i < element.getJurisdiction().size(); i++) composeCodeableConcept(t, "TerminologyCapabilities", "jurisdiction", element.getJurisdiction().get(i), i);
if (element.hasPurposeElement())
composeMarkdown(t, "TerminologyCapabilities", "purpose", element.getPurposeElement(), -1);
if (element.hasCopyrightElement())
composeMarkdown(t, "TerminologyCapabilities", "copyright", element.getCopyrightElement(), -1);
if (element.hasKindElement())
composeEnum(t, "TerminologyCapabilities", "kind", element.getKindElement(), -1);
if (element.hasSoftware())
composeTerminologyCapabilitiesTerminologyCapabilitiesSoftwareComponent(t, "TerminologyCapabilities", "software", element.getSoftware(), -1);
if (element.hasImplementation())
composeTerminologyCapabilitiesTerminologyCapabilitiesImplementationComponent(t, "TerminologyCapabilities", "implementation", element.getImplementation(), -1);
if (element.hasLockedDateElement())
composeBoolean(t, "TerminologyCapabilities", "lockedDate", element.getLockedDateElement(), -1);
for (int i = 0; i < element.getCodeSystem().size(); i++) composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemComponent(t, "TerminologyCapabilities", "codeSystem", element.getCodeSystem().get(i), i);
if (element.hasExpansion())
composeTerminologyCapabilitiesTerminologyCapabilitiesExpansionComponent(t, "TerminologyCapabilities", "expansion", element.getExpansion(), -1);
if (element.hasCodeSearchElement())
composeEnum(t, "TerminologyCapabilities", "codeSearch", element.getCodeSearchElement(), -1);
if (element.hasValidateCode())
composeTerminologyCapabilitiesTerminologyCapabilitiesValidateCodeComponent(t, "TerminologyCapabilities", "validateCode", element.getValidateCode(), -1);
if (element.hasTranslation())
composeTerminologyCapabilitiesTerminologyCapabilitiesTranslationComponent(t, "TerminologyCapabilities", "translation", element.getTranslation(), -1);
if (element.hasClosure())
composeTerminologyCapabilitiesTerminologyCapabilitiesClosureComponent(t, "TerminologyCapabilities", "closure", element.getClosure(), -1);
}
use of org.hl7.fhir.r5.model.TerminologyCapabilities in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponent.
protected void composeTerminologyCapabilitiesTerminologyCapabilitiesCodeSystemVersionFilterComponent(Complex parent, String parentType, String name, TerminologyCapabilities.TerminologyCapabilitiesCodeSystemVersionFilterComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "filter", name, element, index);
if (element.hasCodeElement())
composeCode(t, "TerminologyCapabilities", "code", element.getCodeElement(), -1);
for (int i = 0; i < element.getOp().size(); i++) composeCode(t, "TerminologyCapabilities", "op", element.getOp().get(i), i);
}
use of org.hl7.fhir.r5.model.TerminologyCapabilities in project org.hl7.fhir.core by hapifhir.
the class SimpleWorkerContext method connectToTSServer.
public String connectToTSServer(TerminologyClient client, String log) {
try {
txLog("Connect to " + client.getAddress());
txClient = client;
if (log != null && log.endsWith(".txt")) {
txLog = new TextClientLogger(log);
} else {
txLog = new HTMLClientLogger(log);
}
txClient.setLogger(txLog);
txClient.setUserAgent(userAgent);
final CapabilityStatement capabilitiesStatementQuick = txCache.hasCapabilityStatement() ? txCache.getCapabilityStatement() : txClient.getCapabilitiesStatementQuick();
txCache.cacheCapabilityStatement(capabilitiesStatementQuick);
final TerminologyCapabilities capabilityStatement = txCache.hasTerminologyCapabilities() ? txCache.getTerminologyCapabilities() : txClient.getTerminologyCapabilities();
txCache.cacheTerminologyCapabilities(capabilityStatement);
setTxCaps(capabilityStatement);
return capabilitiesStatementQuick.getSoftware().getVersion();
} catch (Exception e) {
throw new FHIRException(formatMessage(canNoTS ? I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER_USE_PARAMETER_TX_NA_TUN_RUN_WITHOUT_USING_TERMINOLOGY_SERVICES_TO_VALIDATE_LOINC_SNOMED_ICDX_ETC_ERROR__ : I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER, e.getMessage()), e);
}
}
Aggregations