hapi-fhir
hapi-fhir copied to clipboard
$collect-data returns data invalid for $submit-data
Data returned using $collect-data associates ids in the name entry for each resource: "name" : "measureReport-e8029124-d760-40eb-b25a-703e447a3e4d"
These name entries however are used in SubmitDataProvider as 'OperationParam' identifiers, which are validating by whole string only:
@Operation(name = ProviderConstants.CR_OPERATION_SUBMIT_DATA, type = Measure.class)
public Bundle submitData(
RequestDetails theRequestDetails,
@IdParam IdType theId,
@OperationParam(**name = "measureReport"**, min = 1, max = 1) MeasureReport theReport,
@OperationParam(**name = "resource"**) List<IBaseResource> theResources) {
return myR4SubmitDataProcessorFactory.create(theRequestDetails).submitData(theId, theReport, theResources);
}
This means 'measureReport-1234' will not be found because it's looking for 'measureReport'. This results in "resource is null" errors when I go to submit the very data collect-data gave me.
Furthermore, Measure identification in the data returned by $collect-data includes version:
"measure": "https://madie.cms.gov/Measure/AlaraCTClinicalFHIR|0.4.000"
The result is the server telling me it can't find the Measure.
To get around all this I've had to "clean" the data returned by $collect-data, to establish proper name strings, and remove versioning from the measure identifier. This results in a 200 response and the data is submitted with a Bundle returned.
To Reproduce Steps to reproduce the behavior:
- run $collect-data and get a Parameters resource as json in response.
- $submit-data this json resource via POST to another hapi-fhir server with the json data as body.
- Verify rejection
Expected behavior $collect-data returns something $submit-data accepts without modification on my end.
Environment (please complete the following information):
- HAPI FHIR Version 7.4.0
- eCQM Testing Tool (React TS fetch)
Of course my final question would be, is there some configuration I can do on my end to address this at the server level? Or is it perhaps bad data somehow that was persisted to the server that's causing this? I don't find "measureReport-" in any data being posted to our server.