use of org.hl7.fhir.r4.model.Task in project Gravity-SDOH-Exchange-RI by FHIR.
the class PatientTaskUpdateBundleFactory method createUpdateBundle.
public Bundle createUpdateBundle() {
Assert.notNull(task, "Task can't be null.");
Bundle updateBundle = new Bundle();
updateBundle.setType(Bundle.BundleType.TRANSACTION);
updateTask(updateBundle);
updateBundle.addEntry(FhirUtil.createPutEntry(task));
return updateBundle;
}
use of org.hl7.fhir.r4.model.Task in project Gravity-SDOH-Exchange-RI by FHIR.
the class TaskUpdateBundleFactory method createUpdateBundle.
public Bundle createUpdateBundle() {
Assert.notNull(task, "Task can't be null.");
Bundle updateBundle = new Bundle();
updateBundle.setType(Bundle.BundleType.TRANSACTION);
updateTask(updateBundle);
updateBundle.addEntry(FhirUtil.createPutEntry(task));
return updateBundle;
}
use of org.hl7.fhir.r4.model.Task in project Gravity-SDOH-Exchange-RI by FHIR.
the class PatientMakeContactTaskBundleFactory method createTask.
protected Task createTask() {
Task task = super.createTask();
task.getCode().addCoding(PatientTaskCode.MAKE_CONTACT.toCoding());
task.addPartOf(new Reference(referralTask.getIdElement().toUnqualifiedVersionless()));
Task.ParameterComponent input = task.addInput();
input.getType().addCoding(new Coding(SDOHTemporaryCode.SYSTEM, SDOHTemporaryCode.CONTACT_CODE.getCode(), SDOHTemporaryCode.CONTACT_CODE.getDisplay()));
input.setValue(new Reference(contactInfo.getIdElement().toUnqualifiedVersionless()));
return task;
}
use of org.hl7.fhir.r4.model.Task in project Gravity-SDOH-Exchange-RI by FHIR.
the class PatientTaskBundleFactory method createTask.
protected Task createTask() {
Task task = new Task();
task.getMeta().addProfile(SDOHProfiles.PATIENT_TASK);
task.setStatus(Task.TaskStatus.READY);
task.setIntent(Task.TaskIntent.ORDER);
task.setPriority(priority.getTaskPriority());
task.setAuthoredOnElement(DateTimeType.now());
task.setLastModifiedElement(DateTimeType.now());
task.setDescription(name);
task.setFor(getPatientReference());
task.setOwner(getPatientReference());
if (occurrence.isPeriod()) {
task.setExecutionPeriod(new Period().setStartElement(occurrence.getStart()).setEndElement(occurrence.getEnd()));
} else {
task.setExecutionPeriod(new Period().setEndElement(occurrence.getEnd()));
}
task.setRequester(requester);
if (!Strings.isNullOrEmpty(comment)) {
task.addNote().setText(comment).setTimeElement(DateTimeType.now()).setAuthor(new Reference(new IdType(user.getUserType(), user.getId())).setDisplay(user.getName()));
}
return task;
}
use of org.hl7.fhir.r4.model.Task in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeTaskTaskOutputComponent.
protected void composeTaskTaskOutputComponent(Complex parent, String parentType, String name, Task.TaskOutputComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "output", name, element, index);
if (element.hasNameElement())
composeString(t, "Task", "name", element.getNameElement(), -1);
if (element.hasValue())
composeType(t, "Task", "value", element.getValue(), -1);
}
Aggregations