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

Smarter handling of null objects in FLAT format #1117

Open
freshehr opened this issue May 10, 2023 · 0 comments
Open

Smarter handling of null objects in FLAT format #1117

freshehr opened this issue May 10, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@freshehr
Copy link

Background

When integrating data from an external source, an error is generated if a mandatory attribute in the target object is not completed , even if all of the other attributes are empty and the object is optional

For example if the target json is

    "generic_laboratory_report/laboratory_test_result:0/specimen:0/specimen_type|value": "A value",
    "generic_laboratory_report/laboratory_test_result:0/specimen:0/specimen_type|code": "some_code",
    "generic_laboratory_report/laboratory_test_result:0/specimen:0/specimen_type|terminology": "some_terminology",

and the incoming specimen_type datapoint is null or absent....

In the Better CDR if you simply make each of the |value, |code and |terminology attributes an empty string, the whole row will be ignored by the CDR, which is correct, as the Specimen type element is optional.

EhrBase is a more complicated since it enforces the openEHR constraint which says that a CodedText object must have all 3 attributes populated, and ignores the fact that the overall element is itself optional.

Enhancement

Detect if an imported datatype object is completely null, after population with empty strings or null (for numerics), do not import that element and only report an exception if the parent element/attribute is mandatory.

Discussion

No response

Further information

No response

@freshehr freshehr added the enhancement New feature or request label May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant