use of org.hl7.fhir.r4.model.RelatedPerson in project org.hl7.fhir.core by hapifhir.
the class QuestionnaireBuilder method addTimingQuestions.
private void addTimingQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException {
ToolingExtensions.addFhirType(group, "Schedule");
addQuestion(group, QuestionnaireItemType.STRING, path, "text", "text:", answerGroups);
addQuestion(group, QuestionnaireItemType.DATETIME, path, "date", "date:", answerGroups);
QuestionnaireItemComponent q = addQuestion(group, QuestionnaireItemType.REFERENCE, path, "author", "author:", answerGroups);
ToolingExtensions.addAllowedResource(q, "Patient");
ToolingExtensions.addAllowedResource(q, "Practitioner");
ToolingExtensions.addAllowedResource(q, "RelatedPerson");
}
use of org.hl7.fhir.r4.model.RelatedPerson in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeRelatedPerson.
protected void composeRelatedPerson(Complex parent, String parentType, String name, RelatedPerson element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "RelatedPerson", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "RelatedPerson", "identifier", element.getIdentifier().get(i), i);
if (element.hasActiveElement())
composeBoolean(t, "RelatedPerson", "active", element.getActiveElement(), -1);
if (element.hasPatient())
composeReference(t, "RelatedPerson", "patient", element.getPatient(), -1);
for (int i = 0; i < element.getRelationship().size(); i++) composeCodeableConcept(t, "RelatedPerson", "relationship", element.getRelationship().get(i), i);
for (int i = 0; i < element.getName().size(); i++) composeHumanName(t, "RelatedPerson", "name", element.getName().get(i), i);
for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "RelatedPerson", "telecom", element.getTelecom().get(i), i);
if (element.hasGenderElement())
composeEnum(t, "RelatedPerson", "gender", element.getGenderElement(), -1);
if (element.hasBirthDateElement())
composeDate(t, "RelatedPerson", "birthDate", element.getBirthDateElement(), -1);
for (int i = 0; i < element.getAddress().size(); i++) composeAddress(t, "RelatedPerson", "address", element.getAddress().get(i), i);
for (int i = 0; i < element.getPhoto().size(); i++) composeAttachment(t, "RelatedPerson", "photo", element.getPhoto().get(i), i);
if (element.hasPeriod())
composePeriod(t, "RelatedPerson", "period", element.getPeriod(), -1);
for (int i = 0; i < element.getCommunication().size(); i++) composeRelatedPersonRelatedPersonCommunicationComponent(t, "RelatedPerson", "communication", element.getCommunication().get(i), i);
}
use of org.hl7.fhir.r4.model.RelatedPerson in project org.hl7.fhir.core by hapifhir.
the class QuestionnaireBuilder method addTimingQuestions.
private void addTimingQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException {
ToolingExtensions.addFhirType(group, "Schedule");
addQuestion(group, QuestionnaireItemType.STRING, path, "text", "text:", answerGroups);
addQuestion(group, QuestionnaireItemType.DATETIME, path, "date", "date:", answerGroups);
QuestionnaireItemComponent q = addQuestion(group, QuestionnaireItemType.REFERENCE, path, "author", "author:", answerGroups);
ToolingExtensions.addAllowedResource(q, "Patient");
ToolingExtensions.addAllowedResource(q, "Practitioner");
ToolingExtensions.addAllowedResource(q, "RelatedPerson");
}
use of org.hl7.fhir.r4.model.RelatedPerson in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeRelatedPersonRelatedPersonCommunicationComponent.
protected void composeRelatedPersonRelatedPersonCommunicationComponent(Complex parent, String parentType, String name, RelatedPerson.RelatedPersonCommunicationComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "communication", name, element, index);
if (element.hasLanguage())
composeCodeableConcept(t, "RelatedPerson", "language", element.getLanguage(), -1);
if (element.hasPreferredElement())
composeBoolean(t, "RelatedPerson", "preferred", element.getPreferredElement(), -1);
}
use of org.hl7.fhir.r4.model.RelatedPerson in project org.hl7.fhir.core by hapifhir.
the class QuestionnaireBuilder method addTimingQuestions.
private void addTimingQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException {
ToolingExtensions.addFhirType(group, "Schedule");
addQuestion(group, QuestionnaireItemType.STRING, null, path, "text", "text:", answerGroups);
addQuestion(group, QuestionnaireItemType.DATETIME, null, path, "date", "date:", answerGroups);
QuestionnaireItemComponent q = addQuestion(group, QuestionnaireItemType.REFERENCE, null, path, "author", "author:", answerGroups);
ToolingExtensions.addAllowedResource(q, "Patient");
ToolingExtensions.addAllowedResource(q, "Practitioner");
ToolingExtensions.addAllowedResource(q, "RelatedPerson");
}
Aggregations