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

Opt 1.4 parser and converter #261

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

Opt 1.4 parser and converter #261

wants to merge 38 commits into from

Conversation

pieterbos
Copy link
Collaborator

@pieterbos pieterbos commented Jan 4, 2021

Parses an OPT 1.4 and converts it to an ADL 2 Template.

status:

  • Parses an OPT1.4
  • Converts it to OPT2 model, with 1.4 node ids/conventions
  • Converts it to ADL 2 Template, with ADL 2 node ids/conventions
  • Basic tests
  • Converts default values for some data value types
  • Converts all default value types
    • This is very easy to do once we added a namespace to the Archie XML binding, and all of the types actually in use work, so probably for a later pull request.
  • converts the ontology in the OPT, not in C_ARCHETYPE_ROOT (multiple language support, it seems?)
    • if C_ARCHETYPE_ROOT and ontology both define a constraint, which should have preference? now the ontology has priority
  • Handles component ontologies (seems they can contain other languages than in the C_ARCHETYPE_ROOT)
    • if C_ARCHETYPE_ROOT and ontology both define a constraint, which should have preference? now the ontology has priority
    • handle constraint_definitions if this is ever used
    • handle constraint_bindings if this is ever used
  • Converts annotations
  • remove hack for [openehr-EHR-COMPOSITION.report.v1]/content.. path form?
  • 'and name='.....]' path constraints implemented.
    • Add test to verify they also work?
  • check that terminology items for C_ARCHETYPE_ROOTs with archteype id are converted to id code.
  • Converts all the possibilities in <constraints>, which seem to be complex object overlays? Or if not necessary perhaps?
    • default valus
    • occurrences
    • rm_visibility, including aliases
    • refactor path lookup for RM objects AND AOM to support archetype ref + name lookup. BREAKING CHANGES!!!
    • migrate paths in annotations and visibility from archetype ref + name => unique id-code?
    • C_ATTRIBUTES constraints
    • RM_TYPE_NAME? can this change, or just for lookup?

Breaking changes

  • Path parsing and RM Path queries lookup rewritten wit a proper predicate system to implement and name/value= lookup. This should not break things, but potentially can, especially if manually constructing pathSegments and finding from there.
  • old RMPathQuery.find() deprecated. It has way too many quirks and should be replaced with findList() and work from those results. However, that will be a breaking change!

@codecov
Copy link

codecov bot commented Jul 14, 2021

Codecov Report

Merging #261 (3b1ca91) into master (adfaa70) will decrease coverage by 0.68%.
The diff coverage is 51.55%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #261      +/-   ##
============================================
- Coverage     70.47%   69.79%   -0.69%     
- Complexity     6479     6741     +262     
============================================
  Files           640      664      +24     
  Lines         21652    22969    +1317     
  Branches       3483     3806     +323     
============================================
+ Hits          15260    16032     +772     
- Misses         4763     5150     +387     
- Partials       1629     1787     +158     
Impacted Files Coverage Δ
...izer/adl/constraints/CComplexObjectSerializer.java 83.70% <0.00%> (-1.26%) ⬇️
...va/com/nedap/archie/opt14/DataValuesConverter.java 0.00% <0.00%> (ø)
.../com/nedap/archie/opt14/DefaultValueConverter.java 0.00% <0.00%> (ø)
...com/nedap/archie/opt14/Opt14ConversionMessage.java 0.00% <0.00%> (ø)
.../com/nedap/archie/query/ArchetypeRefPredicate.java 56.25% <ø> (ø)
...java/com/nedap/archie/query/NoNodeIdPredicate.java 75.00% <ø> (ø)
...n/java/com/nedap/archie/query/NodeIdPredicate.java 75.00% <ø> (ø)
...java/com/nedap/archie/query/NodeNamePredicate.java 60.00% <ø> (ø)
.../main/java/com/nedap/archie/query/RMPathQuery.java 80.68% <ø> (+11.45%) ⬆️
...ap/archie/query/RmPathQueryPredicateConverter.java 52.38% <ø> (ø)
... and 97 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update adfaa70...3b1ca91. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants