Skip to content

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

Attention: Patch coverage is 51.55556% with 654 lines in your changes missing coverage. Please review.

Project coverage is 69.79%. Comparing base (adfaa70) to head (3b1ca91).
Report is 411 commits behind head on master.

Files with missing lines Patch % Lines
...a/com/nedap/archie/opt14/TerminologyConverter.java 28.43% 68 Missing and 5 partials ⚠️
...va/com/nedap/archie/opt14/DataValuesConverter.java 0.00% 72 Missing ⚠️
...ava/com/nedap/archie/opt14/TConstraintApplier.java 5.00% 56 Missing and 1 partial ⚠️
...ava/com/nedap/archie/opt14/Opt14PathConverter.java 51.40% 33 Missing and 19 partials ⚠️
...ava/com/nedap/archie/opt14/PrimitiveConverter.java 39.75% 33 Missing and 17 partials ⚠️
...ava/com/nedap/archie/opt14/ArchetypeTermFixer.java 59.22% 23 Missing and 19 partials ⚠️
...ava/com/nedap/archie/opt14/BaseTypesConverter.java 37.87% 30 Missing and 11 partials ⚠️
...edap/archie/opt14/NodeIdFixerBeforeConversion.java 31.03% 34 Missing and 6 partials ⚠️
...java/com/nedap/archie/opt14/NodeIdSpecializer.java 71.94% 21 Missing and 18 partials ⚠️
...e/adl14/treewalkers/Adl14CComplexObjectParser.java 64.07% 29 Missing and 8 partials ⚠️
... and 19 more
Additional details and impacted files
@@             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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@joostholslag
Copy link

@MattijsK anything I can do to progress this PR? It's increasingly relevant functionality.
It would also need an update for at coded adl 2.4 archetypes.
The reverse would also be super helpful: to generate op1 from adl 2.4 templates. That would let us migrate the modelling domain independently of the CDRs.
Although Archetype Designer might have/get related/duplicate features. so might be good to coordinate with @matija.

@MattijsK
Copy link
Collaborator

Hey @joostholslag, interesting PR. This was not on our radar at all and we're not sure if it's feasable to look into this as we lack knowledge and time.

Our current focus is on the ADL2.4 converter and if this feature appears to be really important, there could be a chance that we can take a look at this somewhere next year.

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.

5 participants