Details
Description
Launch context type has required binding to http://build.fhir.org/ig/HL7/sdc/ValueSet-launchContext.html So, there are only 4 options for launchContext type.
For the past two years, I realized that more flexibility for the launch context type is required. Launch context item may be any of https://www.hl7.org/fhir/datatypes.html or any of FHIR resources.
There was a decision to make the binding "Extensible" but this change was not applied. https://jira.hl7.org/browse/FHIR-29664 It may cause some issues with understanding the meaning of the name.
The next issue is how to pass launchContext to $populate operation.
There is no explicit description of how it should work. If SMART on FHIR is used launchContext usually uses SMART context to get Questionnaire launchContext.
There is no straightforward way to pass launch context to $populate operation if SMART on FHIR doesn't use. https://build.fhir.org/ig/HL7/sdc/OperationDefinition-Questionnaire-populate.html
My proposal is:
1. The name is a text that defines a variable name. The meaning of launch context is defined by the type. It may be any of https://www.hl7.org/fhir/datatypes.html or any of FHIR resources.
2. Change the valueset https://build.fhir.org/ig/HL7/sdc/ValueSet-launchContext.html for launchContext.type It should consist of all FHIR resource names and FHIR data types https://www.hl7.org/fhir/datatypes.html .
3. Add launchContext of type https://www.hl7.org/fhir/parameters.html to $populate operation parameters.
Here https://github.com/beda-software/aidbox-sdc/blob/master/tests/sdc/test_populate.py#L297 you can see how this approach works.