private void addMoneyQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "Money"); addQuestion(group, QuestionnaireItemType.DECIMAL, path, "value", "value:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "currency", "currency:", answerGroups); }
private void addPeriodQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "Period"); addQuestion(group, QuestionnaireItemType.DATETIME, path, "low", "start:", answerGroups); addQuestion(group, QuestionnaireItemType.DATETIME, path, "end", "end:", answerGroups); }
private void addRatioQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "Ratio"); addQuestion(group, QuestionnaireItemType.DECIMAL, path, "numerator", "numerator:", answerGroups); addQuestion(group, QuestionnaireItemType.DECIMAL, path, "denominator", "denominator:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "units", "units:", answerGroups); }
private void addIdentifierQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "Identifier"); addQuestion(group, QuestionnaireItemType.STRING, path, "label", "label:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "system", "system:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "value", "value:", answerGroups); }
private void addStringQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "string"); addQuestion(group, QuestionnaireItemType.STRING, path, "value", group.getText(), answerGroups); group.setText(null); for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) ag.setText(null); }
private void addDecimalQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "decimal"); addQuestion(group, QuestionnaireItemType.DECIMAL, path, "value", group.getText(), answerGroups); group.setText(null); for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) ag.setText(null); }
private void addSimpleQuantityQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "Quantity"); addQuestion(group, QuestionnaireItemType.DECIMAL, path, "value", "value:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "units", "units:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "code", "coded units:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "system", "units system:", answerGroups); }
private void addDateTimeQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "datetime"); addQuestion(group, QuestionnaireItemType.DATETIME, path, "value", group.getText(), answerGroups); group.setText(null); for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) ag.setText(null); }
private void addUriQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "uri"); addQuestion(group, QuestionnaireItemType.STRING, path, "value", group.getText(), answerGroups); group.setText(null); for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) ag.setText(null); }
private void addIntegerQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "integer"); addQuestion(group, QuestionnaireItemType.INTEGER, path, "value", group.getText(), answerGroups); group.setText(null); for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) ag.setText(null); }
private void addInstantQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "instant"); addQuestion(group, QuestionnaireItemType.DATETIME, path, "value", group.getText(), answerGroups); group.setText(null); for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) ag.setText(null); }
private void addContactPointQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "ContactPoint"); addQuestion(group, QuestionnaireItemType.CHOICE, path, "system", "type:", answerGroups, resolveValueSet("http://hl7.org/fhir/vs/contact-point-system")); addQuestion(group, QuestionnaireItemType.STRING, path, "value", "value:", answerGroups); addQuestion(group, QuestionnaireItemType.CHOICE, path, "use", "use:", answerGroups, resolveValueSet("http://hl7.org/fhir/vs/contact-point-use")); }
private void addAgeQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "Age"); addQuestion(group, QuestionnaireItemType.CHOICE, path, "comparator", "comp:", answerGroups, resolveValueSet("http://hl7.org/fhir/vs/quantity-comparator")); addQuestion(group, QuestionnaireItemType.DECIMAL, path, "value", "value:", answerGroups); addQuestion(group, QuestionnaireItemType.CHOICE, path, "units", "units:", answerGroups, resolveValueSet("http://hl7.org/fhir/vs/duration-units")); }
private void addHumanNameQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "Name"); addQuestion(group, QuestionnaireItemType.STRING, path, "text", "text:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "family", "family:", answerGroups).setRepeats(true); addQuestion(group, QuestionnaireItemType.STRING, path, "given", "given:", answerGroups).setRepeats(true); }
private void addQuantityQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "Quantity"); addQuestion(group, QuestionnaireItemType.CHOICE, path, "comparator", "comp:", answerGroups, resolveValueSet("http://hl7.org/fhir/vs/quantity-comparator")); addQuestion(group, QuestionnaireItemType.DECIMAL, path, "value", "value:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "units", "units:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "code", "coded units:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "system", "units system:", answerGroups); }
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"); }
private void addCodeableConceptQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "CodeableConcept"); addQuestion(group, answerTypeForBinding(element.hasBinding() ? element.getBinding() : null), path, "coding", "code:", answerGroups, resolveValueSet(null, element.hasBinding() ? element.getBinding() : null)); addQuestion(group, QuestionnaireItemType.STRING, path, "text", "text:", answerGroups); }
private void addCodeQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "code"); ValueSet vs = resolveValueSet(null, element.hasBinding() ? element.getBinding() : null); addQuestion(group, QuestionnaireItemType.CHOICE, path, "value", unCamelCase(tail(element.getPath())), answerGroups, vs); group.setText(null); for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) ag.setText(null); }
private void addAddressQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "Address"); addQuestion(group, QuestionnaireItemType.STRING, path, "text", "text:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "line", "line:", answerGroups).setRepeats(true); addQuestion(group, QuestionnaireItemType.STRING, path, "city", "city:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "state", "state:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "postalCode", "post code:", answerGroups); addQuestion(group, QuestionnaireItemType.STRING, path, "country", "country:", answerGroups); addQuestion(group, QuestionnaireItemType.CHOICE, path, "use", "use:", answerGroups, resolveValueSet("http://hl7.org/fhir/vs/address-use")); }
private void addCodingQuestions(QuestionnaireItemComponent group, ElementDefinition element, String path, List<QuestionnaireResponse.QuestionnaireResponseItemComponent> answerGroups) throws FHIRException { ToolingExtensions.addFhirType(group, "Coding"); addQuestion(group, answerTypeForBinding(element.hasBinding() ? element.getBinding() : null), path, "value", group.getText(), answerGroups, resolveValueSet(null, element.hasBinding() ? element.getBinding() : null)); group.setText(null); for (QuestionnaireResponse.QuestionnaireResponseItemComponent ag : answerGroups) ag.setText(null); }