Beispiel #1
0
func generateRecordSetParameters(fhirURL, recordSetName string) *models.Parameters {
	parameters := models.Parameters{}

	resourceParam := fhirURL + "/Patient"
	urlPcc := models.ParametersParameterComponent{Name: "resourceUrl", ValueString: resourceParam}
	tagParam := tagValue(recordSetName)
	tagPcc := models.ParametersParameterComponent{Name: "_tag", ValueString: tagParam}
	parameters.Parameter = []models.ParametersParameterComponent{urlPcc, tagPcc}
	return &parameters
}
Beispiel #2
0
func buildParams(setType string, recSet *ptm_models.RecordSet) *fhir_models.Parameters {
	params := fhir_models.Parameters{}
	params.Id = uuid.NewV4().String()

	params.Parameter = make([]fhir_models.ParametersParameterComponent, 3)

	params.Parameter[0].Name = "type"
	params.Parameter[0].ValueString = setType

	params.Parameter[1].Name = "resourceType"
	params.Parameter[1].ValueString = recSet.ResourceType

	params.Parameter[2].Name = "searchExpression"
	params.Parameter[2].Resource = recSet.Parameters

	return &params
}