Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional reference while processing transaction bundle #1329

Closed
sridhar-shivraj opened this issue Jul 10, 2020 · 5 comments
Closed

Conditional reference while processing transaction bundle #1329

sridhar-shivraj opened this issue Jul 10, 2020 · 5 comments
Assignees
Labels
cms-interop This issue is associated with the CMS interoperability rule enhancement New feature or request needs-design P2 Priority 2 - Should Have showcase Used to Identify End-of-Sprint Demos

Comments

@sridhar-shivraj
Copy link

sridhar-shivraj commented Jul 10, 2020

Is your feature request related to a problem? Please describe.
When processing transactions, servers SHALL:
-check all references for search URIs
-For search URIs, use the search to locate matching resources
-if there are no matches, or multiple matches, the transaction fails, and an error is returned to the user
-if there is a single match, the server replaces the search URI with a reference to the matching resource

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
See "Conditional references" under https://www.hl7.org/fhir/http.html#trules

@prb112 prb112 added the enhancement New feature or request label Jul 10, 2020
@prb112
Copy link
Contributor

prb112 commented Jul 10, 2020

This is an enhancement request, I've moved the text to the formatted template.

@prb112 prb112 added the cms-interop This issue is associated with the CMS interoperability rule label Aug 31, 2020
@lmsurpre
Copy link
Member

should benefit from #1353

@lmsurpre lmsurpre added the P3 Priority 3 - Nice To Have label Mar 15, 2021
@ibmatc
Copy link
Contributor

ibmatc commented May 13, 2021

I just discovered that after switching to FHIR 4.7.1 all of our Synthea-generated data no longer loads. They are all being flagged as invalid because they use conditional references for the Practitioner field. I have disabled validation for our use, but it would be appreciated if this were not necessary by supporting conditional references.

@lmsurpre lmsurpre added P2 Priority 2 - Should Have and removed P3 Priority 3 - Nice To Have labels May 13, 2021
JohnTimm added a commit that referenced this issue May 14, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 14, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 14, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 14, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
@JohnTimm JohnTimm self-assigned this May 14, 2021
@JohnTimm JohnTimm added this to the Sprint 2021-06 milestone May 14, 2021
JohnTimm added a commit that referenced this issue May 14, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 14, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
JohnTimm added a commit that referenced this issue May 14, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
@prb112
Copy link
Contributor

prb112 commented May 14, 2021

Tested the following cases with a version of the following bundle:

  1. Transaction - Create-Patient, Observation with Condition
  2. Transaction - Create-Patient, Observation with Condition v1, Observation with Condition v2
  3. Transaction - Create-Patient, Observation with Condition - Out of Order

I also worked through the Integration Tests and John is going to update the error message to alert to the not-found reason.

{
    "resourceType": "Bundle",
    "id": "20160113160203",
    "type": "transaction",
    "entry": [
        {
            "fullUrl": "urn:uuid:c72aa430-2ddc-456e-7a09-dea8264671d1",
            "resource": {
                "resourceType": "Patient",
                "id": "12345",
                "identifier": [
                    {
                        "system": "http://ibm.com/fhir/patient-id",
                        "value": "12345"
                    }
                ],
                "name": [
                    {
                        "family": "Doe",
                        "given": [
                            "John"
                        ]
                    }
                ]
            },
            "request": {
                "method": "PUT",
                "url": "Patient/12345"
            }
        },
        {
            "fullUrl": "urn:uuid:c72aa430-2ddc-456e-7a09-dea8264671d8",
            "resource": {
                "resourceType": "Observation",
                "id": "67890",
                "status": "final",
                "code": {
                    "text": "test"
                },
                "subject": {
                    "reference": "Patient?identifier=http://ibm.com/fhir/patient-id|12345"
                }
            },
            "request": {
                "method": "PUT",
                "url": "Observation/67890"
            }
        },
        {
            "fullUrl": "urn:uuid:c72aa430-2ddc-456e-7a09-dea8264671d8",
            "resource": {
                "resourceType": "Observation",
                "id": "67890",
                "status": "final",
                "code": {
                    "text": "test"
                },
                "subject": {
                    "reference": "Patient?identifier=http://ibm.com/fhir/patient-id|12345"
                }
            },
            "request": {
                "method": "PUT",
                "url": "Observation/67890"
            }
        }
    ]
}

JohnTimm added a commit that referenced this issue May 14, 2021
…2366)

* Issue #1329 - validate conditional references in ValidationSupport

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #1329 - update copyright header

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #1329 - conditional reference support for transaction bundles

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #1329 - updated getConditionalReferences

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #1329 - update server integration test

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #1329 - updated server integration test and test data

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>

* Issue #1329 - updated error messages per PR feedback

Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
@prb112
Copy link
Contributor

prb112 commented May 14, 2021

Hi @sridhar-shivraj The enhancement will be in version 4.8.0 Please let us know if you have any feedback. We appreciate it.

@prb112 prb112 closed this as completed May 14, 2021
@JohnTimm JohnTimm added the showcase Used to Identify End-of-Sprint Demos label Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cms-interop This issue is associated with the CMS interoperability rule enhancement New feature or request needs-design P2 Priority 2 - Should Have showcase Used to Identify End-of-Sprint Demos
Projects
None yet
Development

No branches or pull requests

5 participants