From 2163c421a2f068952ec62eda28e56134156f546f Mon Sep 17 00:00:00 2001
From: Daniil <94884910+Filienko@users.noreply.github.com>
Date: Sat, 18 Nov 2023 13:05:45 -0800
Subject: [PATCH] Added an inactive patient to test

---
 isacc_messaging/api/views.py      |  2 +-
 tests/test_models/patient_70.json | 43 +++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletion(-)
 create mode 100644 tests/test_models/patient_70.json

diff --git a/isacc_messaging/api/views.py b/isacc_messaging/api/views.py
index 98274b70..48cf2d2d 100644
--- a/isacc_messaging/api/views.py
+++ b/isacc_messaging/api/views.py
@@ -208,7 +208,7 @@ def update_patient_extensions(dry_run):
 @click.argument('param_to_update', default='active', help='Parameter to update for the patient')
 @click.argument('value', default='True', help='Value to set for the parameter')
 @click.option("--dry-run", is_flag=True, default=False, help="Simulate execution; don't persist to FHIR store")
-def update_dict(param_to_update, value):
+def update_patient_params(param_to_update, value):
     """Iterate through all patients, update any the parameter values for all of them"""
     if value.lower() in ('true', 'false'):
         value = value.lower() in ('true')  # Convert to boolean
diff --git a/tests/test_models/patient_70.json b/tests/test_models/patient_70.json
new file mode 100644
index 00000000..24c2d7da
--- /dev/null
+++ b/tests/test_models/patient_70.json
@@ -0,0 +1,43 @@
+{
+  "resourceType": "Patient",
+  "id": "69",
+  "meta": {
+    "versionId": "39",
+    "lastUpdated": "2023-10-19T00:53:21.195+00:00",
+    "source": "#RFawZwTDR1vXuSSq",
+    "security": [ {
+      "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
+      "code": "HTEST"
+    } ]
+  },
+  "text": {
+    "status": "generated",
+    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Dwight <b>SCHRUTE </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Date of birth</td><td><span>03 February 1960</span></td></tr></tbody></table></div>"
+  },
+  "extension": [ {
+    "url": "http://isacc.app/time-of-last-unfollowedup-message",
+    "valueDateTime": "2023-04-28T17:49:52.609906+00:00"
+  }, {
+    "url": "http://isacc.app/date-time-of-next-outgoing-message",
+    "valueDateTime": "1973-10-18T12:53:21Z"
+  } ],
+  "identifier": [ {
+    "system": "https://github.com/uwcirg/cosri-patientsearch/counter",
+    "value": "23"
+  } ],
+  "name": [ {
+    "family": "Schrute",
+    "given": [ "Dwight" ]
+  } ],
+  "telecom": [ {
+    "system": "sms",
+    "value": "3602815483"
+  } ],
+  "birthDate": "1960-02-03",
+  "active": false,
+  "generalPractitioner": [ {
+    "reference": "Practitioner/57",
+    "type": "Practitioner",
+    "display": "McRainodes, J.R."
+  } ]
+}