Existing composite unique search parameters with dateTime component stopped working after V7_4_0 release.
No longer writing to table HFJ_IDX_CMP_STRING_UNIQ and now duplicate resources are being created.
To Reproduce
1) Create composite unique SP with date component.
3) Create Observation with same effective date and code as in previous step.
Actual behaviour
Second Observation with same effective date and code is created.
Expected behaviour
409 conflicts response
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "HAPI-0550: HAPI-1093: Can not create resource of type Observation as it would create a duplicate unique index matching query: ........."
}
]
}
Existing composite unique search parameters with dateTime component stopped working after
V7_4_0
release. No longer writing to tableHFJ_IDX_CMP_STRING_UNIQ
and now duplicate resources are being created.To Reproduce 1) Create composite unique SP with date component.
Requests Example:
`POST {SERVER_URL}/SearchParameter/` 1) ```json { "resourceType": "SearchParameter", "id": "obs-effective", "status": "active", "code": "date", "base": [ "Observation" ], "type": "date", "expression": "Observation.effective" } ``` 2) ```json { "resourceType": "SearchParameter", "id": "obs-code", "status": "active", "code": "code", "base": [ "Observation" ], "type": "token", "expression": "Observation.code" } ``` 3) ```json { "resourceType": "SearchParameter", "id": "observation-date-code", "extension": [ { "url": "http://hapifhir.io/fhir/StructureDefinition/sp-unique", "valueBoolean": true } ], "name": "observation-date-code", "status": "active", "code": "observation-date-code", "base": [ "Observation" ], "type": "composite", "expression": "Observation", "component": [ { "definition": "SearchParameter/obs-effective", "expression": "Observation" }, { "definition": "SearchParameter/obs-code", "expression": "Observation" } ] } ```2) Create Observation with effective date and code.
Request Example:
`POST {SERVER_URL}/Observation/` ```json { "resourceType": "Observation", "status": "final", "code": { "coding": [ { "system": "http://loinc.org", "code": "789-8" } ] }, "effectiveDateTime": "2009-11-26T13:35:08-05:00", "valueQuantity": { "value": 4.12, "system": "http://unitsofmeasure.org", "code": "10*12/L" } } ```3) Create Observation with same effective date and code as in previous step.
Actual behaviour Second Observation with same effective date and code is created.
Expected behaviour 409 conflicts response