Added correction to generated resource providers (#5743)
* Added correction to generated resource providers * add changelog and fix issue that was adding languange SP to version that does not have language as a SP * actually fix the test * fix changelog wrong issue number --------- Co-authored-by: Jens Kristian Villadsen <jenskristianvilladsen@gmail.com> Co-authored-by: Long Ma <long@smilecdr.com>
This commit is contained in:
parent
28b8662637
commit
f5cc015ff3
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
type: fix
|
||||
issue: 5742
|
||||
title: Fixed behaviour of the _language query parameter. Now it is picked up as search parameter in the resource provider and filters accordingly. Thanks to Jens Villadsen (@jkiddo) for the contribution!
|
|
@ -73,6 +73,12 @@ public class ${className}ResourceProvider extends
|
|||
@OptionalParam(name=ca.uhn.fhir.rest.api.Constants.PARAM_LIST)
|
||||
StringAndListParam theList,
|
||||
|
||||
#if ( $version == 'R5' )
|
||||
@Description(shortDefinition="The language of the resource")
|
||||
@OptionalParam(name=ca.uhn.fhir.rest.api.Constants.PARAM_LANGUAGE)
|
||||
TokenAndListParam theResourceLanguage,
|
||||
#end
|
||||
|
||||
@Description(shortDefinition="Search for resources which have the given source value (Resource.meta.source)")
|
||||
@OptionalParam(name=ca.uhn.fhir.rest.api.Constants.PARAM_SOURCE)
|
||||
UriAndListParam theSearchForSource,
|
||||
|
@ -154,6 +160,9 @@ public class ${className}ResourceProvider extends
|
|||
paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_PROFILE, theSearchForProfile);
|
||||
paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_SOURCE, theSearchForSource);
|
||||
paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_LIST, theList);
|
||||
#if ( $version == 'R5' )
|
||||
paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_LANGUAGE, theResourceLanguage);
|
||||
#end
|
||||
paramMap.add("_has", theHas);
|
||||
#foreach ( $param in $searchParams )
|
||||
paramMap.add("${param.name}", the${param.nameCapitalized});
|
||||
|
|
Loading…
Reference in New Issue