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

Adding new Parameter strictMatch to the $mdm-history-link operation #5262

Closed
TynerGjs opened this issue Aug 30, 2023 · 0 comments · Fixed by #5282 · May be fixed by #5264
Closed

Adding new Parameter strictMatch to the $mdm-history-link operation #5262

TynerGjs opened this issue Aug 30, 2023 · 0 comments · Fixed by #5282 · May be fixed by #5264
Assignees

Comments

@TynerGjs
Copy link
Contributor

Describe the issue
Currently, when requesting the $mdm-link-history endpoint with the parameters resourceId and goldenResourceId, the response includes historical links that are not limited to the relation between the specified resourceId and goldenResourceId. The goal of this enhancement is to add a parameter to filter the response so that it only include historical links relevant to both the specified resourceId AND goldenResourceId.

For example:
The result of this request

GET {{base_url}}/$mdm-link-history?goldenResourceId=2244206&resourceId=2019:

Click to expand
 {
    "resourceType": "Parameters",
    "parameter": [
        {
            "name": "historical link",
            "part": [
                {
                    "name": "goldenResourceId",
                    "valueString": "Patient/2244206"
                },
                {
                    "name": "revisionTimestamp",
                    "valueString": "2023-05-08 22:49:07.206"
                },
                {
                    "name": "sourceResourceId",
                    "valueString": "Patient/2019"
                },
                {
                    "name": "matchResult",
                    "valueString": "POSSIBLE_MATCH"
                },
                {
                    "name": "score",
                    "valueDecimal": 0.83333333333333337034076748750521801412105560302734375
                },
                {
                    "name": "linkSource",
                    "valueString": "AUTO"
                },
                {
                    "name": "eidMatch",
                    "valueBoolean": false
                },
                {
                    "name": "hadToCreateNewResource",
                    "valueBoolean": false
                },
                {
                    "name": "score",
                    "valueDecimal": 0.83333333333333337034076748750521801412105560302734375
                },
                {
                    "name": "linkCreated",
                    "valueDecimal": 1683586147166
                },
                {
                    "name": "linkUpdated",
                    "valueDecimal": 1683586147166
                }
            ]
        },
        {
            "name": "historical link",
            "part": [
                {
                    "name": "goldenResourceId",
                    "valueString": "Patient/2244208"
                },
                {
                    "name": "revisionTimestamp",
                    "valueString": "2023-05-29 18:58:47.669"
                },
                {
                    "name": "sourceResourceId",
                    "valueString": "Patient/2019"
                },
                {
                    "name": "matchResult",
                    "valueString": "NO_MATCH"
                },
                {
                    "name": "score",
                    "valueDecimal": 0.83333333333333337034076748750521801412105560302734375
                },
                {
                    "name": "linkSource",
                    "valueString": "MANUAL"
                },
                {
                    "name": "eidMatch",
                    "valueBoolean": false
                },
                {
                    "name": "hadToCreateNewResource",
                    "valueBoolean": false
                },
                {
                    "name": "score",
                    "valueDecimal": 0.83333333333333337034076748750521801412105560302734375
                },
                {
                    "name": "linkCreated",
                    "valueDecimal": 1683586147185
                },
                {
                    "name": "linkUpdated",
                    "valueDecimal": 1685386727646
                }
            ]
        },
        {
            "name": "historical link",
            "part": [
                {
                    "name": "goldenResourceId",
                    "valueString": "Patient/2244206"
                },
                {
                    "name": "revisionTimestamp",
                    "valueString": "2023-05-08 22:49:06.69"
                },
                {
                    "name": "sourceResourceId",
                    "valueString": "Patient/2011"
                },
                {
                    "name": "matchResult",
                    "valueString": "MATCH"
                },
                {
                    "name": "score",
                    "valueDecimal": 1
                },
                {
                    "name": "linkSource",
                    "valueString": "AUTO"
                },
                {
                    "name": "eidMatch",
                    "valueBoolean": false
                },
                {
                    "name": "hadToCreateNewResource",
                    "valueBoolean": true
                },
                {
                    "name": "score",
                    "valueDecimal": 1
                },
                {
                    "name": "linkCreated",
                    "valueDecimal": 1683586146680
                },
                {
                    "name": "linkUpdated",
                    "valueDecimal": 1683586146680
                }
            ]
        },
    ]
}

After applying the strictMatch parameter:

GET {{base_url}}/$mdm-link-history?goldenResourceId=2244206&resourceId=2019&strictMatch:

Click to expand
{
    "resourceType": "Parameters",
    "parameter": [
        {
            "name": "historical link",
            "part": [
                {
                    "name": "goldenResourceId",
                    "valueString": "Patient/2244206"
                },
                {
                    "name": "revisionTimestamp",
                    "valueString": "2023-05-08 22:49:07.206"
                },
                {
                    "name": "sourceResourceId",
                    "valueString": "Patient/2019"
                },
                {
                    "name": "matchResult",
                    "valueString": "POSSIBLE_MATCH"
                },
                {
                    "name": "score",
                    "valueDecimal": 0.83333333333333337034076748750521801412105560302734375
                },
                {
                    "name": "linkSource",
                    "valueString": "AUTO"
                },
                {
                    "name": "eidMatch",
                    "valueBoolean": false
                },
                {
                    "name": "hadToCreateNewResource",
                    "valueBoolean": false
                },
                {
                    "name": "score",
                    "valueDecimal": 0.83333333333333337034076748750521801412105560302734375
                },
                {
                    "name": "linkCreated",
                    "valueDecimal": 1683586147166
                },
                {
                    "name": "linkUpdated",
                    "valueDecimal": 1683586147166
                }
            ]
        }
    ]
}

Environment (please complete the following information):

  • HAPI FHIR 6.9.4-SNAPSHOT
    Additional context
    Add any other context about the problem here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant