@Search() public List<DiagnosticReport> getDiagnosticReport( @RequiredParam(name=DiagnosticReport.SP_IDENTIFIER) TokenParam theIdentifier, @IncludeParam(allow= {"DiagnosticReport:subject"}) String theInclude ) { List<DiagnosticReport> retVal = new ArrayList<DiagnosticReport>(); // Assume this method exists and loads the report from the DB DiagnosticReport report = loadSomeDiagnosticReportFromDatabase(theIdentifier); // If the client has asked for the subject to be included: if ("DiagnosticReport:subject".equals(theInclude)) { // The resource reference should contain the ID of the patient IIdType subjectId = report.getSubject().getReferenceElement(); // So load the patient ID and return it Patient subject = loadSomePatientFromDatabase(subjectId); report.getSubject().setResource(subject); } retVal.add(report); return retVal; } //END SNIPPET: pathSpecSimple
public IncludeParameter(IncludeParam theAnnotation, Class<? extends Collection<Include>> theInstantiableCollectionType, Class<?> theSpecType) { myInstantiableCollectionType = theInstantiableCollectionType; myReverse = theAnnotation.reverse(); if (theAnnotation.allow().length > 0) { myAllow = new HashSet<String>(); for (String next : theAnnotation.allow()) { if (next != null) { myAllow.add(next); } } } else { myAllow = Collections.emptySet(); } mySpecType = theSpecType; if (mySpecType != Include.class && mySpecType != String.class) { throw new ConfigurationException("Invalid @" + IncludeParam.class.getSimpleName() + " parameter type: " + mySpecType); } }
@Search() public List<DiagnosticReport> getDiagnosticReport( @RequiredParam(name=DiagnosticReport.SP_IDENTIFIER) TokenParam theIdentifier, @IncludeParam(allow= {"DiagnosticReport:subject"}) Set<Include> theIncludes ) { List<DiagnosticReport> retVal = new ArrayList<DiagnosticReport>(); // Assume this method exists and loads the report from the DB DiagnosticReport report = loadSomeDiagnosticReportFromDatabase(theIdentifier); // If the client has asked for the subject to be included: if (theIncludes.contains(new Include("DiagnosticReport:subject"))) { // The resource reference should contain the ID of the patient IIdType subjectId = report.getSubject().getReferenceElement(); // So load the patient ID and return it Patient subject = loadSomePatientFromDatabase(subjectId); report.getSubject().setResource(subject); } retVal.add(report); return retVal; } //END SNIPPET: pathSpec
public IncludeParameter(IncludeParam theAnnotation, Class<? extends Collection<Include>> theInstantiableCollectionType, Class<?> theSpecType) { myInstantiableCollectionType = theInstantiableCollectionType; myReverse = theAnnotation.reverse(); if (theAnnotation.allow().length > 0) { myAllow = new HashSet<String>(); for (String next : theAnnotation.allow()) { if (next != null) { myAllow.add(next); } } } else { myAllow = Collections.emptySet(); } mySpecType = theSpecType; if (mySpecType != Include.class && mySpecType != String.class) { throw new ConfigurationException("Invalid @" + IncludeParam.class.getSimpleName() + " parameter type: " + mySpecType); } }
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
public IncludeParameter(IncludeParam theAnnotation, Class<? extends Collection<Include>> theInstantiableCollectionType, Class<?> theSpecType) { myInstantiableCollectionType = theInstantiableCollectionType; myReverse = theAnnotation.reverse(); if (theAnnotation.allow().length > 0) { myAllow = new HashSet<String>(); for (String next : theAnnotation.allow()) { if (next != null) { myAllow.add(next); } } } else { myAllow = Collections.emptySet(); } mySpecType = theSpecType; if (mySpecType != Include.class && mySpecType != String.class) { throw new ConfigurationException("Invalid @" + IncludeParam.class.getSimpleName() + " parameter type: " + mySpecType); } }
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
public IncludeParameter(IncludeParam theAnnotation, Class<? extends Collection<Include>> theInstantiableCollectionType, Class<?> theSpecType) { myInstantiableCollectionType = theInstantiableCollectionType; myReverse = theAnnotation.reverse(); if (theAnnotation.allow().length > 0) { myAllow = new HashSet<String>(); for (String next : theAnnotation.allow()) { if (next != null) { myAllow.add(next); } } } else { myAllow = Collections.emptySet(); } mySpecType = theSpecType; if (mySpecType != Include.class && mySpecType != String.class) { throw new ConfigurationException("Invalid @" + IncludeParam.class.getSimpleName() + " parameter type: " + mySpecType); } }
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })
Map<String, List<String>> theAdditionalRawParams, @IncludeParam(reverse=true) Set<Include> theRevIncludes, @Description(shortDefinition="Only return resources which were last updated as specified by the given range") DateRangeParam theLastUpdated, @IncludeParam(allow= { "*" })