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

Add Progress Note Act #18

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
38 changes: 19 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ PATH
ruby-cda (0.3.0)
activesupport (>= 5.0)
i18n (>= 1)
nokogiri (>= 1.6)
nokogiri (>= 1.13.4)
virtus (>= 1.0)

GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.2.3)
activesupport (7.0.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -25,35 +25,35 @@ GEM
concurrent-ruby (1.1.10)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.4.4)
i18n (1.10.0)
diff-lcs (1.5.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
mini_portile2 (2.8.0)
minitest (5.15.0)
nokogiri (1.13.3)
minitest (5.16.3)
nokogiri (1.13.8)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
racc (1.6.0)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-collection_matchers (1.2.0)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rspec_junit_formatter (0.4.1)
rspec-support (~> 3.11.0)
rspec-support (3.11.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
thread_safe (0.3.6)
tzinfo (2.0.4)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
virtus (2.0.0)
axiom-types (~> 0.1)
Expand Down
2 changes: 2 additions & 0 deletions lib/ccd/autoloads.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ module Ccd
autoload :ProductInstance, 'ccd/models/product_instance.rb'
autoload :ProductInstanceTemplate, 'ccd/templates/product_instance_template.rb'
autoload :ProgressNote, 'ccd/models/progress_note.rb'
autoload :ProgressNoteAct, 'ccd/models/progress_note_act.rb'
autoload :ProgressNoteTemplate, 'ccd/templates/progress_note_template.rb'
autoload :ProgressNoteActTemplate, 'ccd/templates/progress_note_act_template.rb'
autoload :PurposeOfReferenceObservation, 'ccd/models/purpose_of_reference_observation.rb'
autoload :PurposeOfReferenceObservationTemplate, 'ccd/templates/purpose_of_reference_observation_template.rb'
autoload :QuantityMeasurementObservation, 'ccd/models/quantity_measurement_observation.rb'
Expand Down
11 changes: 11 additions & 0 deletions lib/ccd/models/progress_note_act.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module Ccd
class ProgressNoteAct < Cda::Act
include Ccd::ProgressNoteActTemplate

def self.template_type
"act"
end

Ccd.load_extension('progress_note_act.rb')
end
end
30 changes: 30 additions & 0 deletions lib/ccd/templates/progress_note_act_template.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module Ccd::ProgressNoteActTemplate
def self.include(base)
base.class_eval do
extend ::Ccd::Dsl

# SHALL contain exactly one [1..1] @classCode="ACT" (CodeSystem: HL7ActClass 2.16.840.1.113883.5.6 STATIC) (CONF:7469).
constraint 'class_code', {:cardinality=>"1..1", :value=>"ACT"}

# SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: ActMood 2.16.840.1.113883.5.1001 STATIC) (CONF:7470).
constraint 'mood_code', {:cardinality=>"1..1", :value=>"EVN"}

# SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.202" (CONF:10489).
constraint 'template_id', {:cardinality=>"1..1", :value=>{:root=>"2.16.840.1.113883.10.20.22.4.202", :extension=>"2016-11-01"}}

# SHALL contain exactly one [1..1] code (CONF:7477).
constraint 'code', {:cardinality=>"1..1", :value=>{:code=>"34109-9", :display_name=>"Note", :code_system=>"2.16.840.1.113883.6.1", :codeSystemName=>"LOINC"}}

constraint 'code.translation', {:cardinality=>"1..1", :value=>{:code=>"11506-3", :display_name=>"ProgressNote", :code_system=>"2.16.840.1.113883.6.1", :codeSystemName=>"LOINC"}}

# SHALL contain exactly one [1..1] text (CONF:7270).
constraint 'text', {:cardinality=>"1..1"}

# This statusCode SHALL contain exactly one [1..1] @code, which SHALL be selected from ValueSet ProblemAct statusCode 2.16.840.1.113883.11.20.9.19 STATIC 2011-09-09 (CONF:19086).
constraint 'status_code.code', {:cardinality=>"1..1"}

# SHALL contain exactly one [1..1] effectiveTime (CONF:7498).
constraint 'effective_time', {:cardinality=>"1..1"}
end
end
end
2 changes: 1 addition & 1 deletion ruby-cda.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |s|
s.homepage = 'https://github.com/niquola/ruby-cda'

s.add_dependency 'activesupport', '>= 5.0'
s.add_dependency 'nokogiri', '>= 1.6'
s.add_dependency 'nokogiri', '>= 1.13.4'
s.add_dependency 'virtus', '>= 1.0'
s.add_dependency 'i18n', '>= 1'

Expand Down