ca.uhn.fhir.rest.annotation.OperationParam Java Examples
The following examples show how to use
ca.uhn.fhir.rest.annotation.OperationParam.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MeasureOperationsProvider.java From cqf-ruler with Apache License 2.0 | 5 votes |
@Operation(name = "$submit-data", idempotent = true, type = Measure.class) public Resource submitData(RequestDetails details, @IdParam IdType theId, @OperationParam(name = "measure-report", min = 1, max = 1, type = MeasureReport.class) MeasureReport report, @OperationParam(name = "resource") List<IAnyResource> resources) { Bundle transactionBundle = new Bundle().setType(Bundle.BundleType.TRANSACTION); /* * TODO - resource validation using $data-requirements operation (params are the * provided id and the measurement period from the MeasureReport) * * TODO - profile validation ... not sure how that would work ... (get * StructureDefinition from URL or must it be stored in Ruler?) */ transactionBundle.addEntry(createTransactionEntry(report)); for (IAnyResource resource : resources) { Resource res = (Resource) resource; if (res instanceof Bundle) { for (Bundle.BundleEntryComponent entry : createTransactionBundle((Bundle) res).getEntry()) { transactionBundle.addEntry(entry); } } else { // Build transaction bundle transactionBundle.addEntry(createTransactionEntry(res)); } } return (Resource) this.registry.getSystemDao().transaction(details, transactionBundle); }
Example #2
Source File: MeasureOperationsProvider.java From cqf-ruler with Apache License 2.0 | 5 votes |
@Operation(name = "$submit-data", idempotent = true, type = Measure.class) public Resource submitData(RequestDetails details, @IdParam IdType theId, @OperationParam(name = "measure-report", min = 1, max = 1, type = MeasureReport.class) MeasureReport report, @OperationParam(name = "resource") List<IAnyResource> resources) { Bundle transactionBundle = new Bundle().setType(Bundle.BundleType.TRANSACTION); /* * TODO - resource validation using $data-requirements operation (params are the * provided id and the measurement period from the MeasureReport) * * TODO - profile validation ... not sure how that would work ... (get * StructureDefinition from URL or must it be stored in Ruler?) */ transactionBundle.addEntry(createTransactionEntry(report)); for (IAnyResource resource : resources) { Resource res = (Resource) resource; if (res instanceof Bundle) { for (Bundle.BundleEntryComponent entry : createTransactionBundle((Bundle) res).getEntry()) { transactionBundle.addEntry(entry); } } else { // Build transaction bundle transactionBundle.addEntry(createTransactionEntry(res)); } } return (Resource) this.registry.getSystemDao().transaction(details, transactionBundle); }
Example #3
Source File: TerminologyClient.java From synthea with Apache License 2.0 | 4 votes |
@Operation(type = ValueSet.class, name = "$expand") ValueSet expand(@OperationParam(name = "url") UriType url, @OperationParam(name = "count") IntegerType count, @OperationParam(name = "offset") IntegerType offset);
Example #4
Source File: ApplyCqlOperationProvider.java From cqf-ruler with Apache License 2.0 | 4 votes |
@Operation(name = "$apply-cql", type = Bundle.class) public Bundle apply(@OperationParam(name = "resourceBundle", min = 1, max = 1, type = Bundle.class) Bundle bundle) throws FHIRException { return applyCql(bundle); }
Example #5
Source File: ApplyCqlOperationProvider.java From cqf-ruler with Apache License 2.0 | 4 votes |
@Operation(name = "$apply-cql", type = Bundle.class) public Bundle apply(@OperationParam(name = "resourceBundle", min = 1, max = 1, type = Bundle.class) Bundle bundle) throws FHIRException { return applyCql(bundle); }