use of org.hl7.fhir.r4b.model.OperationDefinition in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeOperationDefinitionOperationDefinitionParameterBindingComponent.
protected void composeOperationDefinitionOperationDefinitionParameterBindingComponent(Complex parent, String parentType, String name, OperationDefinition.OperationDefinitionParameterBindingComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "binding", name, element, index);
if (element.hasStrengthElement())
composeEnum(t, "OperationDefinition", "strength", element.getStrengthElement(), -1);
if (element.hasValueSetElement())
composeCanonical(t, "OperationDefinition", "valueSet", element.getValueSetElement(), -1);
}
use of org.hl7.fhir.r4b.model.OperationDefinition in project org.hl7.fhir.core by hapifhir.
the class NarrativeGenerator method generate.
public boolean generate(ResourceContext rcontext, OperationDefinition opd) throws EOperationOutcome, FHIRException, IOException {
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
x.h2().addText(opd.getName());
x.para().addText(Utilities.capitalize(opd.getKind().toString()) + ": " + opd.getName());
x.para().tx("The official URL for this operation definition is: ");
x.pre().tx(opd.getUrl());
addMarkdown(x, opd.getDescription());
if (opd.getSystem())
x.para().tx("URL: [base]/$" + opd.getCode());
for (CodeType c : opd.getResource()) {
if (opd.getType())
x.para().tx("URL: [base]/" + c.getValue() + "/$" + opd.getCode());
if (opd.getInstance())
x.para().tx("URL: [base]/" + c.getValue() + "/[id]/$" + opd.getCode());
}
x.para().tx("Parameters");
XhtmlNode tbl = x.table("grid");
XhtmlNode tr = tbl.tr();
tr.td().b().tx("Use");
tr.td().b().tx("Name");
tr.td().b().tx("Cardinality");
tr.td().b().tx("Type");
tr.td().b().tx("Binding");
tr.td().b().tx("Documentation");
for (OperationDefinitionParameterComponent p : opd.getParameter()) {
genOpParam(rcontext, tbl, "", p);
}
addMarkdown(x, opd.getComment());
inject(opd, x, NarrativeStatus.GENERATED);
return true;
}
use of org.hl7.fhir.r4b.model.OperationDefinition in project org.hl7.fhir.core by hapifhir.
the class TurtleTests method test_operationdefinition_example.
@Test
public void test_operationdefinition_example() throws FileNotFoundException, IOException, Exception {
System.out.println("operationdefinition-example.ttl");
new Turtle().parse(TextFile.fileToString("C:\\work\\org.hl7.fhir\\build\\publish\\operationdefinition-example.ttl"));
}
use of org.hl7.fhir.r4b.model.OperationDefinition in project org.hl7.fhir.core by hapifhir.
the class NarrativeGenerator method generate.
public boolean generate(ResourceContext rcontext, OperationDefinition opd) throws EOperationOutcome, FHIRException, IOException {
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
x.h2().addText(opd.getName());
x.para().addText(Utilities.capitalize(opd.getKind().toString()) + ": " + opd.getName());
x.para().tx("The official URL for this operation definition is: ");
x.pre().tx(opd.getUrl());
addMarkdown(x, opd.getDescription());
if (opd.getSystem())
x.para().tx("URL: [base]/$" + opd.getCode());
for (CodeType c : opd.getResource()) {
if (opd.getType())
x.para().tx("URL: [base]/" + c.getValue() + "/$" + opd.getCode());
if (opd.getInstance())
x.para().tx("URL: [base]/" + c.getValue() + "/[id]/$" + opd.getCode());
}
x.para().tx("Parameters");
XhtmlNode tbl = x.table("grid");
XhtmlNode tr = tbl.tr();
tr.td().b().tx("Use");
tr.td().b().tx("Name");
tr.td().b().tx("Cardinality");
tr.td().b().tx("Type");
tr.td().b().tx("Binding");
tr.td().b().tx("Documentation");
for (OperationDefinitionParameterComponent p : opd.getParameter()) {
genOpParam(rcontext, tbl, "", p);
}
addMarkdown(x, opd.getComment());
inject(opd, x, NarrativeStatus.GENERATED);
return true;
}
use of org.hl7.fhir.r4b.model.OperationDefinition in project pathling by aehrc.
the class ExtractResponse method toParameters.
/**
* Converts this to a {@link Parameters} resource, based on the definition of the result of the
* "extract" operation within the OperationDefinition.
*
* @return a new {@link Parameters} object
*/
public Parameters toParameters() {
final Parameters parameters = new Parameters();
final ParametersParameterComponent urlParameter = new ParametersParameterComponent();
urlParameter.setName("url");
urlParameter.setValue(new UrlType(url));
parameters.getParameter().add(urlParameter);
return parameters;
}
Aggregations