openehr-rails 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +46 -0
  3. data/.github/ISSUE_TEMPLATE/config.yml +1 -0
  4. data/.github/ISSUE_TEMPLATE/enhancement.md +37 -0
  5. data/.github/workflows/ci.yml +4 -4
  6. data/.github/workflows/release.yml +10 -8
  7. data/.rubocop.yml +25 -0
  8. data/.rubocop_todo.yml +619 -0
  9. data/CHANGELOG.md +71 -0
  10. data/CLAUDE.md +108 -1
  11. data/README.md +15 -5
  12. data/doc/DEMO_ja.md +8 -3
  13. data/doc/HANDOFF_openehr_ruby_wishlist.md +140 -0
  14. data/docs/backlog.md +140 -0
  15. data/docs/design/binding-extraction-plan.md +489 -0
  16. data/docs/design/fix-terminology-scope-plan.md +301 -0
  17. data/docs/reports/binding-extraction-log.md +345 -0
  18. data/docs/reports/institutionalization-log.md +51 -0
  19. data/lib/openehr-rails.rb +0 -5
  20. data/lib/openehr_rails/aql/query_validator.rb +24 -31
  21. data/lib/openehr_rails/fhir/profile_generator.rb +3 -1
  22. data/lib/openehr_rails/opt/field_extractor.rb +56 -18
  23. data/lib/openehr_rails/opt/parser.rb +58 -0
  24. data/lib/openehr_rails/version.rb +5 -0
  25. data/lib/openehr_rails.rb +1 -0
  26. data/openehr-rails.gemspec +5 -4
  27. data/spec/openehr_rails/aql/executor_spec.rb +48 -2
  28. data/spec/openehr_rails/aql/query_validator_spec.rb +23 -17
  29. data/spec/openehr_rails/fhir/profile_generator_spec.rb +28 -0
  30. data/spec/openehr_rails/opt/field_extractor_binding_spec.rb +100 -0
  31. data/spec/openehr_rails/opt/field_extractor_embedded_archetype_spec.rb +33 -0
  32. data/spec/openehr_rails/opt/parser_problem_list_spec.rb +16 -0
  33. data/spec/openehr_rails/opt/parser_term_bindings_spec.rb +45 -0
  34. data/spec/templates/lab_result_report_reduced.opt +145 -0
  35. data/spec/templates/problem_list.opt +1099 -0
  36. data/spec/unit/require_smoke_spec.rb +23 -0
  37. metadata +42 -5
  38. data/lib/openehr-rails/version.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8420a812bd6c4b3f95a403f4804fa58d660a1aa6d736d106bc0dc57a8b63e1ee
4
- data.tar.gz: df4f5629f4915f03c4a07b944a168a1c53d08da043e07cbc6cf6d705d036f017
3
+ metadata.gz: 49c5536ccdf6abee6fb03aea4a4ed6002fc6402e6551d6f234b0e6a1a7b9200c
4
+ data.tar.gz: c36b2b1b58f60d22c2cbbbcb5754108bb3235f12737bd573103d2a3463a70618
5
5
  SHA512:
6
- metadata.gz: 0e39f211e2243b0ac74aff1408136652ba0b4f829a8bc28a92a842ba3e1636955d4ea9fcdfe6ee0e0351b9f3c7c5bd763139478574a5d5acf19c8f8fb9f62a5a
7
- data.tar.gz: 4a8e6beb226a33825df8cd1d762b546cbaf4ca39877d2bda72ab8e81978a58fe57ceefa75ef1d372c609d495fb6d35adc65016592078d10f746be0f7ca041ed7
6
+ metadata.gz: 0651aa4386933ccff02d230ab06d1eda996ca102da9b99ba2ebf09d3fde233ce7f08cea00b26644b744b92b647f917fe0e80dd6169fa158d9af19759c7db7f1b
7
+ data.tar.gz: 4358f499a80546004d5ca80b1ec542f2fe2d977a674461be36ee1afb288322717b71507978a50b1f7560edf1248835783f29e60b0bc874f164d8c4141bcc06a8
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: Bug report
3
+ about: Something behaves incorrectly
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Summary
10
+
11
+ <!-- One or two sentences: what's wrong. -->
12
+
13
+ ## Environment
14
+
15
+ - `openehr-rails` version: <!-- e.g. 0.4.1 -->
16
+ - `openehr` version: <!-- e.g. ~> 2.3 -->
17
+ - Rails version: <!-- e.g. 8.1 -->
18
+ - Ruby version: <!-- e.g. 3.3, 3.4, 4.0 -->
19
+
20
+ ## Reproduction
21
+
22
+ <!-- Minimal runnable code (a generator invocation, a snippet against a model, an
23
+ .opt/.adl fixture) that reproduces the bug from a clean checkout. -->
24
+
25
+ ```ruby
26
+ ```
27
+
28
+ ## Expected vs Actual
29
+
30
+ - Expected:
31
+ - Actual:
32
+
33
+ ## Root cause
34
+
35
+ <!-- file:line, if known. Leave blank if not yet investigated -- explore/plan happens
36
+ after filing, not before. -->
37
+
38
+ ## Proposed fix
39
+
40
+ <!-- Optional at filing time; fill in once a plan exists. -->
41
+
42
+ ## Acceptance criteria
43
+
44
+ <!-- Spec-verifiable. E.g.: -->
45
+ - [ ] A reproduction spec for this bug goes red on the current code, then green after
46
+ the fix (see CLAUDE.md's "Ticket-driven workflow": bug = red-first).
@@ -0,0 +1 @@
1
+ blank_issues_enabled: true
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: Enhancement
3
+ about: Propose new behavior or a change to existing behavior
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Motivation
10
+
11
+ <!-- Why this is needed -- what's painful or missing today, and for whom. -->
12
+
13
+ ## Current behavior
14
+
15
+ <!-- What happens now. file:line references if known. -->
16
+
17
+ ## Proposed behavior
18
+
19
+ <!-- What should happen instead/additionally. -->
20
+
21
+ ## Acceptance criteria
22
+
23
+ <!-- Spec-verifiable. E.g.: -->
24
+ - [ ] A spec for the new behavior goes red on the current code, then green once
25
+ implemented (see CLAUDE.md's "Ticket-driven workflow": enhancement = red-first).
26
+
27
+ ## Compatibility notes
28
+
29
+ <!-- Surface this change touches -- check all that apply, and say how: -->
30
+ - [ ] Runtime behavior
31
+ - [ ] Public API
32
+ - [ ] Install-time dependency (gemspec, supported Ruby/Rails versions)
33
+ - [ ] Generator output (`lib/generators/**/templates/` -- migrations/scaffolding
34
+ shipped to and expanded inside host applications; counts as shipped product, see
35
+ CLAUDE.md)
36
+
37
+ <!-- semver impact, if known: -->
@@ -13,12 +13,12 @@ jobs:
13
13
  strategy:
14
14
  fail-fast: false
15
15
  matrix:
16
- ruby: ['3.2', '3.3', '3.4', '4.0']
16
+ ruby: ['3.3', '3.4', '4.0']
17
17
  rails: ['7_2', '8_0', '8_1']
18
18
  env:
19
19
  BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile
20
20
  steps:
21
- - uses: actions/checkout@v4
21
+ - uses: actions/checkout@v7
22
22
  - uses: ruby/setup-ruby@v1
23
23
  with:
24
24
  ruby-version: ${{ matrix.ruby }}
@@ -31,7 +31,7 @@ jobs:
31
31
  runs-on: ubuntu-latest
32
32
  needs: spec
33
33
  steps:
34
- - uses: actions/checkout@v4
34
+ - uses: actions/checkout@v7
35
35
  - uses: ruby/setup-ruby@v1
36
36
  with:
37
37
  ruby-version: '4.0'
@@ -49,7 +49,7 @@ jobs:
49
49
  runs-on: ubuntu-latest
50
50
  needs: spec
51
51
  steps:
52
- - uses: actions/checkout@v4
52
+ - uses: actions/checkout@v7
53
53
  - uses: ruby/setup-ruby@v1
54
54
  with:
55
55
  ruby-version: '4.0'
@@ -12,20 +12,22 @@ jobs:
12
12
  ci:
13
13
  uses: ./.github/workflows/ci.yml
14
14
 
15
- release:
16
- name: Release to RubyGems
15
+ build:
16
+ name: Build gem artifact
17
17
  needs: ci
18
18
  runs-on: ubuntu-latest
19
- permissions:
20
- id-token: write # required for RubyGems Trusted Publishing (OIDC)
21
- contents: read
22
19
  steps:
23
- - uses: actions/checkout@v4
20
+ - uses: actions/checkout@v7
24
21
  - uses: ruby/setup-ruby@v1
25
22
  with:
26
23
  ruby-version: '4.0'
27
24
  bundler-cache: true
28
25
  - name: release:check (clean tree, sibling-file tracking, gemspec validity)
29
26
  run: bundle exec rake release:check
30
- - name: Release
31
- uses: rubygems/release-gem@v1
27
+ - name: Build gem
28
+ run: bundle exec rake build
29
+ - name: Upload gem artifact
30
+ uses: actions/upload-artifact@v7
31
+ with:
32
+ name: gem
33
+ path: pkg/*.gem
data/.rubocop.yml ADDED
@@ -0,0 +1,25 @@
1
+ plugins:
2
+ - rubocop-rails
3
+ - rubocop-rspec
4
+
5
+ inherit_from: .rubocop_todo.yml
6
+
7
+ AllCops:
8
+ NewCops: enable
9
+ TargetRubyVersion: 3.3
10
+ SuggestExtensions: false
11
+ Exclude:
12
+ - 'bin/**/*'
13
+ - 'db/schema.rb'
14
+ - 'gemfiles/**/*'
15
+ - 'vendor/**/*'
16
+ - 'demo/**/*'
17
+ - 'tmp/**/*'
18
+ - 'coverage/**/*'
19
+ - 'lib/generators/**/templates/**/*'
20
+
21
+ Metrics/BlockLength:
22
+ Exclude:
23
+ - 'spec/**/*'
24
+ - '*.gemspec'
25
+ - 'lib/tasks/**/*.rake'