This commit is contained in:
leif stawnyczy 2024-08-13 13:38:29 -04:00
parent 15041d72fd
commit 5eb6648639
2 changed files with 9 additions and 16 deletions

View File

@ -419,16 +419,6 @@ class ModelScanner {
throw new ConfigurationException(Msg.code(1721) + "Search param " + searchParam.name()
+ " has an invalid type: " + searchParam.type());
}
/*
* This is a HACK!
* tinder generator jpa_resource_provider.vm already has _lastUpdated
* manually added, so we're just going to manually skip this value
* so we don't corrupt the PatientResourceProvider.java.
*
*/
if (searchParam.name().equalsIgnoreCase("_lastUpdated")) {
continue;
}
Set<String> providesMembershipInCompartments;
providesMembershipInCompartments = new HashSet<>();

View File

@ -86,8 +86,9 @@ public class ${className}ResourceProvider extends
HasAndListParam theHas,
#foreach ( $param in $searchParams ) #{if}(true) #{end}
#if (${param.name} != "_lastUpdated")
@Description(shortDefinition="${param.description}")
@Description(shortDefinition="${param.description}")
#if (${param.type} == 'string' )
@OptionalParam(name="${param.name}")
StringAndListParam the${param.nameCapitalized},
@ -97,7 +98,7 @@ public class ${className}ResourceProvider extends
#elseif (${param.type} == 'special' )
@OptionalParam(name="${param.name}")
SpecialAndListParam the${param.nameCapitalized},
#elseif (${param.type} == 'date' )
#elseif (${param.type} == 'date' && ${param.name} != "_lastUpdated")
@OptionalParam(name="${param.name}")
DateRangeParam the${param.nameCapitalized},
#elseif (${param.type} == 'uri' )
@ -116,6 +117,7 @@ public class ${className}ResourceProvider extends
@OptionalParam(name="${param.name}", compositeTypes= { ${param.compositeTypes[0]}Param.class, ${param.compositeTypes[1]}Param.class })
CompositeAndListParam<${param.compositeTypes[0]}Param, ${param.compositeTypes[1]}Param> the${param.nameCapitalized},
#end
#end
#end
@RawParam
@ -161,14 +163,15 @@ public class ${className}ResourceProvider extends
paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_LANGUAGE, theResourceLanguage);
paramMap.add("_has", theHas);
#foreach ( $param in $searchParams )
paramMap.add("${param.name}", the${param.nameCapitalized});
#foreach ( $param in $searchParams )
#if (${param.name} != "_lastUpdated")
paramMap.add("${param.name}", the${param.nameCapitalized});
#end
#end
#if ( $version != 'dstu' )
paramMap.setRevIncludes(theRevIncludes);
paramMap.setLastUpdated(theLastUpdated);
// we will add this manually here because ModelScanner ignores it
paramMap.add(ca.uhn.fhir.rest.api.Constants.PARAM_LASTUPDATED, theLastUpdated);
paramMap.add("_lastUpdated", theLastUpdated);
#end
paramMap.setIncludes(theIncludes);
paramMap.setSort(theSort);