From e740f389ade3363784851a5862264554bd7feac9 Mon Sep 17 00:00:00 2001 From: czh-orz <45495440+czh-orz@users.noreply.github.com> Date: Fri, 3 May 2019 10:32:42 -0400 Subject: [PATCH 1/3] Update README.md Updated link to tests --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8532e2a73..9d775ada9 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ bundle exec rake test ## Inspecting and Exporting Tests Tests are written to be easily understood, even by those who aren't familiar with Ruby. They can be -viewed directly [in this repository](https://github.com/siteadmin/inferno/tree/master/lib/app/sequences). +viewed directly [in this repository](https://github.com/siteadmin/inferno/tree/master/lib/app/modules). Tests contain metadata that provide additional details and traceability to standards. The active tests and related metadata can be exported into CSV format and saved to a file named `testlist.csv` with the following command: From bb63aea18b3beca17f8f90801a6518efabecd76c Mon Sep 17 00:00:00 2001 From: Rob Scanlon Date: Tue, 2 Jul 2019 12:12:17 -0400 Subject: [PATCH 2/3] Patient ID not saving when input from a user (eg. US Core R4). --- lib/app/models/testing_instance.rb | 2 ++ lib/version.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/app/models/testing_instance.rb b/lib/app/models/testing_instance.rb index 1a678d51a..c65ad3f33 100644 --- a/lib/app/models/testing_instance.rb +++ b/lib/app/models/testing_instance.rb @@ -152,6 +152,8 @@ def patient_id=(patient_id) resource_id: patient_id ) + save! + reload end diff --git a/lib/version.rb b/lib/version.rb index 143e67645..6ed74ae6f 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Inferno - VERSION = '2.3.0' + VERSION = '2.3.1' end From a4dc349f373980f54e9368fbfc377c5a5f4d0b4b Mon Sep 17 00:00:00 2001 From: Stephen MacVicar Date: Tue, 2 Jul 2019 12:58:28 -0400 Subject: [PATCH 3/3] fix TestingInstance test --- test/model/testing_instance_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/model/testing_instance_test.rb b/test/model/testing_instance_test.rb index a246be7fc..aa08bb35a 100644 --- a/test/model/testing_instance_test.rb +++ b/test/model/testing_instance_test.rb @@ -5,8 +5,8 @@ class TestingInstanceTest < MiniTest::Test def setup - @patient_id1 = 1 - @patient_id2 = 2 + @patient_id1 = '1' + @patient_id2 = '2' @testing_instance = Inferno::Models::TestingInstance.new @testing_instance.resource_references << Inferno::Models::ResourceReference.new( resource_type: 'Patient', @@ -20,7 +20,9 @@ def test_patient_id_assignment @testing_instance.patient_id = @patient_id2 - assert(@testing_instance.resource_references.empty?) + assert(@testing_instance.patient_id == @patient_id2) + assert(@testing_instance.resource_references.length == 1) + assert(@testing_instance.resource_references.first.resource_id == @patient_id2) end def test_patient_id_reassignment