use of org.hl7.fhir.r4b.model.ConceptMap in project org.hl7.fhir.core by hapifhir.
the class NarrativeGenerator method addMapHeaders.
private void addMapHeaders(XhtmlNode tr, Map<ConceptMap, String> mymaps) {
for (ConceptMap m : mymaps.keySet()) {
XhtmlNode td = tr.addTag("td");
XhtmlNode b = td.addTag("b");
XhtmlNode a = b.addTag("a");
a.setAttribute("href", prefix + mymaps.get(m));
a.addText(m.hasDescription() ? m.getDescription() : m.getName());
}
}
use of org.hl7.fhir.r4b.model.ConceptMap in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeConceptMapOtherElementComponent.
protected void composeConceptMapOtherElementComponent(Complex parent, String parentType, String name, ConceptMap.OtherElementComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "dependsOn", name, element, index);
if (element.hasPropertyElement())
composeUri(t, "ConceptMap", "property", element.getPropertyElement(), -1);
if (element.hasSystemElement())
composeUri(t, "ConceptMap", "system", element.getSystemElement(), -1);
if (element.hasCodeElement())
composeString(t, "ConceptMap", "code", element.getCodeElement(), -1);
if (element.hasDisplayElement())
composeString(t, "ConceptMap", "display", element.getDisplayElement(), -1);
}
use of org.hl7.fhir.r4b.model.ConceptMap in project org.hl7.fhir.core by hapifhir.
the class ConceptMap14_40 method getGroup.
public static ConceptMapGroupComponent getGroup(ConceptMap map, String srcs, String tgts) {
for (ConceptMapGroupComponent grp : map.getGroup()) {
if (grp.getSource().equals(srcs) && grp.getTarget().equals(tgts))
return grp;
}
ConceptMapGroupComponent grp = map.addGroup();
grp.setSource(srcs);
grp.setTarget(tgts);
return grp;
}
use of org.hl7.fhir.r4b.model.ConceptMap in project org.hl7.fhir.core by hapifhir.
the class ConceptMap10_40 method getGroup.
public static ConceptMapGroupComponent getGroup(ConceptMap map, String srcs, String tgts) {
for (ConceptMapGroupComponent grp : map.getGroup()) {
if (grp.getSource().equals(srcs) && grp.getTarget().equals(tgts))
return grp;
}
ConceptMapGroupComponent grp = map.addGroup();
grp.setSource(srcs);
grp.setTarget(tgts);
return grp;
}
use of org.hl7.fhir.r4b.model.ConceptMap in project org.hl7.fhir.core by hapifhir.
the class FHIRToolingClient method updateClosure.
public ConceptMap updateClosure(String name, Coding coding) {
Parameters params = new Parameters();
params.addParameter().setName("name").setValue(new StringType(name));
params.addParameter().setName("concept").setValue(coding);
List<Header> headers = null;
ResourceRequest<Resource> result = utils.issuePostRequest(resourceAddress.resolveOperationUri(null, "closure", new HashMap<String, String>()), utils.getResourceAsByteArray(params, false, isJson(getPreferredResourceFormat())), getPreferredResourceFormat(), headers, TIMEOUT_OPERATION);
// gone
result.addErrorStatus(410);
// unknown
result.addErrorStatus(404);
result.addErrorStatus(405);
// Unprocessable Entity
result.addErrorStatus(422);
result.addSuccessStatus(200);
result.addSuccessStatus(201);
if (result.isUnsuccessfulRequest()) {
throw new EFhirClientException("Server returned error code " + result.getHttpStatus(), (OperationOutcome) result.getPayload());
}
return (ConceptMap) result.getPayload();
}
Aggregations