Skip to content
Merged
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
2 changes: 1 addition & 1 deletion lib/resource_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def self.minimal_humanname(name='Name', namespace = FHIR)
hn = namespace.const_get(:HumanName).new
hn.use = 'official'
hn.family = 'Crucible'
hn.given = [ name ]
hn.given = [ name ] if name.present?
hn.text = "#{hn.given[0]} #{hn.family}"
hn
end
Expand Down
4 changes: 2 additions & 2 deletions lib/tests/suites/connectathon_care_plan_track.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def setup
# Create some cancer-category care plans
@num_cancer_care_plans = rand(1..3)
@cancer_care_plan_category = FHIR::STU3::CodeableConcept.new(text: "Cancer care plan")
@cancer_care_plan_category.coding = FHIR::STU3::Coding.new(code: "395082007", system: "http://snomed.info/sct", display: "Cancer care plan")
@cancer_care_plan_category.coding = [FHIR::STU3::Coding.new(code: "395082007", system: "http://snomed.info/sct", display: "Cancer care plan")]
@num_cancer_care_plans.times do |t|
care_plan = @resources.generate(FHIR::STU3::CarePlan, 3)
care_plan.subject = patient.to_reference
Expand Down Expand Up @@ -129,7 +129,7 @@ def teardown

reply.resource.entry.each do |entry|
assert entry.resource.subject.equals?(@records["patient"].to_reference), "care plan #{entry.resource.id} subject ID doesn't match given subject ID #{@records["patient"].to_reference}"
assert entry.resource.category.first.coding.first.equals?(@cancer_care_plan_category.coding), "care plan category code doesn't match cancer category code #{@cancer_care_plan_category} (#{entry.resource.category.first.coding.first.mismatch(@cancer_care_plan_category.coding)})"
assert entry.resource.category.first.coding.first.equals?(@cancer_care_plan_category.coding.first), "care plan category code doesn't match cancer category code #{@cancer_care_plan_category} (#{entry.resource.category.first.coding.first.mismatch(@cancer_care_plan_category.coding.first)})"
end
end

Expand Down