diff --git a/manage.py b/manage.py index bf035135b2..7232d53319 100644 --- a/manage.py +++ b/manage.py @@ -97,6 +97,19 @@ def flush_cache(): r.flushdb() +@app.cli.command() +def last_usage(): + """Returns number of seconds since last usage was recorded + + NB in the event of no recorded usage, such as after a redis flush + a value of -1 will be returned + + """ + from portal.usage_monitor import last_usage + seconds_old = last_usage() or -1 + click.echo(seconds_old) + + @app.cli.command() def sync(): """Synchronize database with latest schema and persistence data. diff --git a/portal/config/eproms/CommunicationRequest.json b/portal/config/eproms/CommunicationRequest.json index 7e60dc99f8..0c65aa6e19 100644 --- a/portal/config/eproms/CommunicationRequest.json +++ b/portal/config/eproms/CommunicationRequest.json @@ -240,6 +240,22 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Baseline | Day 1 Reminder" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"days\": 1}", + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_baseline" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -272,6 +288,22 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Baseline | Week 1 Reminder" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 1}", + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_baseline" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -304,6 +336,22 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Baseline | Week 2 Reminder" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 2}", + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_baseline" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -336,6 +384,22 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Baseline | Week 3 Reminder" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_baseline" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -368,6 +432,22 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Baseline | Week 4 Reminder" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"months\": 1}", + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_baseline" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -402,6 +482,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 3 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -436,6 +533,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 3 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -470,6 +584,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 3 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -504,6 +635,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 3 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -538,6 +686,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 3 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -572,6 +737,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 6 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -606,6 +788,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 6 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -640,6 +839,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 6 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -674,6 +890,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 6 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -708,6 +941,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 6 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -747,14 +997,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 9 Month Reminder (2)" + "value": "IRONMAN v5 Recurring | 9 Month Reminder (1)" } ], "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"weeks\": 1}", + "notify_post_qb_start": "{\"days\": 0}", "qb_iteration": 1, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -764,14 +1014,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 9 Month Reminder (2)" + "value": "IRONMAN Recurring | 9 Month Reminder (2)" } ], "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", "notify_post_qb_start": "{\"weeks\": 1}", "qb_iteration": 1, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -781,14 +1031,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 9 Month Reminder (3)" + "value": "IRONMAN v3 Recurring | 9 Month Reminder (2)" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", "qb_iteration": 1, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -798,14 +1048,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 9 Month Reminder (3)" + "value": "IRONMAN v5 Recurring | 9 Month Reminder (2)" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", "qb_iteration": 1, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -815,11 +1065,11 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 9 Month Reminder (4)" + "value": "IRONMAN Recurring | 9 Month Reminder (3)" } ], - "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", - "notify_post_qb_start": "{\"weeks\": 3}", + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", "qb_iteration": 1, "questionnaire_bank": { "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" @@ -832,11 +1082,11 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 9 Month Reminder (4)" + "value": "IRONMAN v3 Recurring | 9 Month Reminder (3)" } ], - "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", - "notify_post_qb_start": "{\"weeks\": 3}", + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", "qb_iteration": 1, "questionnaire_bank": { "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" @@ -849,10 +1099,78 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 9 Month Final Reminder" + "value": "IRONMAN v5 Recurring | 9 Month Reminder (3)" } ], - "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 9 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 9 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 9 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 9 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", "notify_post_qb_start": "{\"weeks\": 4}", "qb_iteration": 1, "questionnaire_bank": { @@ -878,6 +1196,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 9 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -912,6 +1247,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 12 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -946,6 +1298,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 12 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -980,6 +1349,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 12 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1014,6 +1400,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 12 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1048,6 +1451,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 12 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1082,6 +1502,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 15 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1116,6 +1553,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 15 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1150,6 +1604,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 15 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1184,6 +1655,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 15 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1218,6 +1706,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 15 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1252,6 +1757,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 18 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1291,14 +1813,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 18 Month Reminder (3)" + "value": "IRONMAN v5 Recurring | 18 Month Reminder (2)" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", - "qb_iteration": 1, + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1308,7 +1830,24 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 18 Month Reminder (3)" + "value": "IRONMAN Recurring | 18 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 18 Month Reminder (3)" } ], "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", @@ -1320,6 +1859,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 18 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1354,6 +1910,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 18 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1388,6 +1961,23 @@ "resourceType": "CommunicationRequest", "status": "active" }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 18 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, { "identifier": [ { @@ -1417,7 +2007,1197 @@ "notify_post_qb_start": "{\"days\": 0}", "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 21 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 21 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 21 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 21 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 21 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 21 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 21 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 21 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 21 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 21 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 21 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 21 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 21 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 24 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 24 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 24 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 24 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 24 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 24 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 24 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 24 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 24 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 24 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 24 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 24 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 24 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 24 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 24 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 1, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 27 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 27 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 27 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 27 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 27 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 30 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 30 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 30 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 0, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 30 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 30 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 30 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 30 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 30 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 30 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 30 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 30 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 30 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 30 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 30 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_6mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 30 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_start6mo_yearly_end30mo" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 33 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 33 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 33 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 33 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 33 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 36 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 36 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 36 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 36 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 36 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 36 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 36 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 36 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 36 Month Reminder (3)" + } + ], + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 36 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 36 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 36 Month Reminder (4)" + } + ], + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN Recurring | 36 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v3 Recurring | 36 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 36 Month Final Reminder" + } + ], + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 2, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 39 Month Reminder (1)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" + }, + "resourceType": "CommunicationRequest", + "status": "active" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/identity-codes/communicationrequest/name", + "use": "usual", + "value": "IRONMAN v5 Recurring | 39 Month Reminder (2)" + } + ], + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 3, + "questionnaire_bank": { + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1427,14 +3207,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 21 Month Reminder (2)" + "value": "IRONMAN v5 Recurring | 39 Month Reminder (3)" } ], - "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"weeks\": 1}", + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1444,14 +3224,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 21 Month Reminder (2)" + "value": "IRONMAN v5 Recurring | 39 Month Reminder (4)" } ], - "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"weeks\": 1}", + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1461,14 +3241,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 21 Month Reminder (3)" + "value": "IRONMAN v5 Recurring | 39 Month Final Reminder" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1478,14 +3258,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 21 Month Reminder (3)" + "value": "IRONMAN v5 Recurring | 42 Month Reminder (1)" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", - "qb_iteration": 3, + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start3.5years_yearly" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1495,14 +3275,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 21 Month Reminder (4)" + "value": "IRONMAN v5 Recurring | 42 Month Reminder (2)" } ], - "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", - "notify_post_qb_start": "{\"weeks\": 3}", - "qb_iteration": 3, + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start3.5years_yearly" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1512,14 +3292,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 21 Month Reminder (4)" + "value": "IRONMAN v5 Recurring | 42 Month Reminder (3)" } ], - "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", - "notify_post_qb_start": "{\"weeks\": 3}", - "qb_iteration": 3, + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start3.5years_yearly" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1529,14 +3309,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 21 Month Final Reminder" + "value": "IRONMAN v5 Recurring | 42 Month Reminder (4)" } ], - "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", - "notify_post_qb_start": "{\"weeks\": 4}", - "qb_iteration": 3, + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start3.5years_yearly" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1546,14 +3326,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 21 Month Final Reminder" + "value": "IRONMAN v5 Recurring | 42 Month Final Reminder" } ], "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", "notify_post_qb_start": "{\"weeks\": 4}", - "qb_iteration": 3, + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_3mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start3.5years_yearly" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1563,14 +3343,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 24 Month Reminder (1)" + "value": "IRONMAN v5 Recurring | 45 Month Reminder (1)" } ], "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", "notify_post_qb_start": "{\"days\": 0}", - "qb_iteration": 1, + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1580,14 +3360,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 24 Month Reminder (1)" + "value": "IRONMAN v5 Recurring | 45 Month Reminder (2)" } ], "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"days\": 0}", - "qb_iteration": 1, + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1597,14 +3377,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 24 Month Reminder (2)" + "value": "IRONMAN v5 Recurring | 45 Month Reminder (3)" } ], - "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"weeks\": 1}", - "qb_iteration": 1, + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1614,14 +3394,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 24 Month Reminder (2)" + "value": "IRONMAN v5 Recurring | 45 Month Reminder (4)" } ], - "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"weeks\": 1}", - "qb_iteration": 1, + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1631,14 +3411,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 24 Month Reminder (3)" + "value": "IRONMAN v5 Recurring | 45 Month Final Reminder" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", - "qb_iteration": 1, + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1648,14 +3428,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 24 Month Reminder (3)" + "value": "IRONMAN v5 Recurring | 48 Month Reminder (1)" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", - "qb_iteration": 1, + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 2, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1665,14 +3445,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 24 Month Reminder (4)" + "value": "IRONMAN v5 Recurring | 48 Month Reminder (2)" } ], - "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", - "notify_post_qb_start": "{\"weeks\": 3}", - "qb_iteration": 1, + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 2, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1682,14 +3462,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 24 Month Reminder (4)" + "value": "IRONMAN v5 Recurring | 48 Month Reminder (3)" } ], - "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", - "notify_post_qb_start": "{\"weeks\": 3}", - "qb_iteration": 1, + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 2, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1699,14 +3479,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 24 Month Final Reminder" + "value": "IRONMAN v5 Recurring | 48 Month Reminder (4)" } ], - "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", - "notify_post_qb_start": "{\"weeks\": 4}", - "qb_iteration": 1, + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 2, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1716,14 +3496,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 24 Month Final Reminder" + "value": "IRONMAN v5 Recurring | 48 Month Final Reminder" } ], "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", "notify_post_qb_start": "{\"weeks\": 4}", - "qb_iteration": 1, + "qb_iteration": 2, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1733,14 +3513,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 30 Month Reminder (1)" + "value": "IRONMAN v5 Recurring | 51 Month Reminder (1)" } ], "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", "notify_post_qb_start": "{\"days\": 0}", - "qb_iteration": 2, + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1750,14 +3530,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 30 Month Reminder (1)" + "value": "IRONMAN v5 Recurring | 51 Month Reminder (2)" } ], "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"days\": 0}", - "qb_iteration": 2, + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1767,14 +3547,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 30 Month Reminder (2)" + "value": "IRONMAN v5 Recurring | 51 Month Reminder (3)" } ], - "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"weeks\": 1}", - "qb_iteration": 2, + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1784,14 +3564,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 30 Month Reminder (2)" + "value": "IRONMAN v5 Recurring | 51 Month Reminder (4)" } ], - "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"weeks\": 1}", - "qb_iteration": 2, + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1801,14 +3581,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 30 Month Reminder (3)" + "value": "IRONMAN v5 Recurring | 51 Month Final Reminder" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", - "qb_iteration": 2, + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1818,14 +3598,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 30 Month Reminder (3)" + "value": "IRONMAN v5 Recurring | 54 Month Reminder (1)" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", - "qb_iteration": 2, + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start3.5years_yearly" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1835,14 +3615,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 30 Month Reminder (4)" + "value": "IRONMAN v5 Recurring | 54 Month Reminder (2)" } ], - "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", - "notify_post_qb_start": "{\"weeks\": 3}", - "qb_iteration": 2, + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start3.5years_yearly" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1852,14 +3632,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 30 Month Reminder (4)" + "value": "IRONMAN v5 Recurring | 54 Month Reminder (3)" } ], - "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", - "notify_post_qb_start": "{\"weeks\": 3}", - "qb_iteration": 2, + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start3.5years_yearly" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1869,14 +3649,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 30 Month Final Reminder" + "value": "IRONMAN v5 Recurring | 54 Month Reminder (4)" } ], - "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", - "notify_post_qb_start": "{\"weeks\": 4}", - "qb_iteration": 2, + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start3.5years_yearly" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1886,14 +3666,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 30 Month Final Reminder" + "value": "IRONMAN v5 Recurring | 54 Month Final Reminder" } ], "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", "notify_post_qb_start": "{\"weeks\": 4}", - "qb_iteration": 2, + "qb_iteration": 0, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_6mo_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_start3.5years_yearly" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1903,14 +3683,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 36 Month Reminder (1)" + "value": "IRONMAN v5 Recurring | 57 Month Reminder (1)" } ], "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", "notify_post_qb_start": "{\"days\": 0}", - "qb_iteration": 2, + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1920,14 +3700,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 36 Month Reminder (1)" + "value": "IRONMAN v5 Recurring | 57 Month Reminder (2)" } ], "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"days\": 0}", - "qb_iteration": 2, + "notify_post_qb_start": "{\"weeks\": 1}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1937,14 +3717,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 36 Month Reminder (2)" + "value": "IRONMAN v5 Recurring | 57 Month Reminder (3)" } ], - "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"weeks\": 1}", - "qb_iteration": 2, + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1954,14 +3734,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 36 Month Reminder (2)" + "value": "IRONMAN v5 Recurring | 57 Month Reminder (4)" } ], - "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", - "notify_post_qb_start": "{\"weeks\": 1}", - "qb_iteration": 2, + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1971,14 +3751,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 36 Month Reminder (3)" + "value": "IRONMAN v5 Recurring | 57 Month Final Reminder" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", - "qb_iteration": 2, + "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", + "notify_post_qb_start": "{\"weeks\": 4}", + "qb_iteration": 3, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_3mo_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -1988,14 +3768,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 36 Month Reminder (3)" + "value": "IRONMAN v5 Recurring | 60 Month Reminder (1)" } ], - "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", - "notify_post_qb_start": "{\"weeks\": 2}", + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"days\": 0}", "qb_iteration": 2, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -2005,14 +3785,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 36 Month Reminder (4)" + "value": "IRONMAN v5 Recurring | 60 Month Reminder (2)" } ], - "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", - "notify_post_qb_start": "{\"weeks\": 3}", + "lr_uuid": "b71dfdf6-bb19-3fff-84bd-4cdb30050499", + "notify_post_qb_start": "{\"weeks\": 1}", "qb_iteration": 2, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -2022,14 +3802,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 36 Month Reminder (4)" + "value": "IRONMAN v5 Recurring | 60 Month Reminder (3)" } ], - "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", - "notify_post_qb_start": "{\"weeks\": 3}", + "lr_uuid": "b98cd174-7894-db68-b335-9e36e055592d", + "notify_post_qb_start": "{\"weeks\": 2}", "qb_iteration": 2, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -2039,14 +3819,14 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN Recurring | 36 Month Final Reminder" + "value": "IRONMAN v5 Recurring | 60 Month Reminder (4)" } ], - "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", - "notify_post_qb_start": "{\"weeks\": 4}", + "lr_uuid": "2c837970-71e3-d736-9d2f-626f417bbbad", + "notify_post_qb_start": "{\"weeks\": 3}", "qb_iteration": 2, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" }, "resourceType": "CommunicationRequest", "status": "active" @@ -2056,18 +3836,18 @@ { "system": "http://us.truenth.org/identity-codes/communicationrequest/name", "use": "usual", - "value": "IRONMAN v3 Recurring | 36 Month Final Reminder" + "value": "IRONMAN v5 Recurring | 60 Month Final Reminder" } ], "lr_uuid": "d9514c96-4769-993f-f6e4-03a67d8f7424", "notify_post_qb_start": "{\"weeks\": 4}", "qb_iteration": 2, "questionnaire_bank": { - "reference": "api/questionnaire_bank/IRONMAN_v3_recurring_annual_pattern" + "reference": "api/questionnaire_bank/IRONMAN_v5_recurring_annual_pattern" }, "resourceType": "CommunicationRequest", "status": "active" - } + } ], "id": "SitePersistence v0.2", "meta": { diff --git a/portal/config/eproms/Organization.json b/portal/config/eproms/Organization.json index cdbf4e0fa2..36f36ba4e3 100644 --- a/portal/config/eproms/Organization.json +++ b/portal/config/eproms/Organization.json @@ -3275,9 +3275,10 @@ "timezone": "America/New_York", "url": "http://hl7.org/fhir/StructureDefinition/user-timezone" }, - { + { "research_protocols": [ - {"name": "IRONMAN v3"} + {"name": "IRONMAN v3", "retired_as_of": "2019-12-17T00:00:00Z"}, + {"name": "IRONMAN v5"} ], "url": "http://us.truenth.org/identity-codes/research-protocol" } @@ -3296,6 +3297,103 @@ "reference": "api/organization/22000" }, "resourceType": "Organization" + }, + { + "extension": [ + { + "url": "http://hl7.org/fhir/valueset/languages", + "valueCodeableConcept": { + "coding": [ + { + "code": "en_AU", + "display": "Australian English", + "system": "urn:ietf:bcp:47" + }, + { + "code": "en_US", + "display": "American English", + "system": "urn:ietf:bcp:47" + }, + { + "code": "en_GB", + "display": "English", + "system": "urn:ietf:bcp:47" + }, + { + "code": "af_ZA", + "display": "Afrikaans", + "system": "urn:ietf:bcp:47" + }, + { + "code": "es_US", + "display": "Spanish (United States)", + "system": "urn:ietf:bcp:47" + }, + { + "code": "fr_CA", + "display": "Canadian French", + "system": "urn:ietf:bcp:47" + }, + { + "code": "zu_ZA", + "display": "Zulu", + "system": "urn:ietf:bcp:47" + }, + { + "code": "xh_ZA", + "display": "Xhosa", + "system": "urn:ietf:bcp:47" + }, + { + "code": "pt_BR", + "display": "Portuguese (Brazil)", + "system": "urn:ietf:bcp:47" + }, + { + "code": "sv_SE", + "display": "Swedish", + "system": "urn:ietf:bcp:47" + }, + { + "code": "de_CH", + "display": "Swiss German", + "system": "urn:ietf:bcp:47" + }, + { + "code": "es_ES", + "display": "Spanish (Spain)", + "system": "urn:ietf:bcp:47" + } + ] + } + }, + { + "timezone": "America/New_York", + "url": "http://hl7.org/fhir/StructureDefinition/user-timezone" + }, + { + "research_protocols": [ + {"name": "IRONMAN v2", "retired_as_of": "2015-12-15T00:00:00Z"}, + {"name": "IRONMAN v3", "retired_as_of": "2016-12-15T00:00:00Z"}, + {"name": "IRONMAN v5"} + ], + "url": "http://us.truenth.org/identity-codes/research-protocol" + } + ], + "id": 147999, + "identifier": [ + { + "system": "http://pcctc.org/", + "use": "secondary", + "value": "147-999" + } + ], + "language": "en_US", + "name": "Test Site II", + "partOf": { + "reference": "api/organization/22000" + }, + "resourceType": "Organization" } ], "id": "SitePersistence v0.2", diff --git a/portal/config/eproms/Questionnaire.json b/portal/config/eproms/Questionnaire.json index a46997a822..3e6d591570 100644 --- a/portal/config/eproms/Questionnaire.json +++ b/portal/config/eproms/Questionnaire.json @@ -6933,6 +6933,24 @@ ] } ] + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/questionnaire", + "value": "ironmisc_v5" + } + ], + "resourceType": "Questionnaire" + }, + { + "identifier": [ + { + "system": "http://us.truenth.org/questionnaire", + "value": "physactivity" + } + ], + "resourceType": "Questionnaire" } ], "id": "SitePersistence v0.2", diff --git a/portal/config/eproms/QuestionnaireBank.json b/portal/config/eproms/QuestionnaireBank.json index 69984677ac..f23a36114b 100644 --- a/portal/config/eproms/QuestionnaireBank.json +++ b/portal/config/eproms/QuestionnaireBank.json @@ -147,6 +147,56 @@ "resourceType": "QuestionnaireBank", "start": "{\"days\": 0}" }, + { + "classification": "baseline", + "expired": "{\"months\": 2, \"days\": 14}", + "name": "IRONMAN_v5_baseline", + "overdue": "{\"days\": 1}", + "questionnaires": [ + { + "questionnaire": { + "display": "eortc", + "reference": "api/questionnaire/eortc?system=http://us.truenth.org/questionnaire" + }, + "rank": 0 + }, + { + "questionnaire": { + "display": "ironmisc_v5", + "reference": "api/questionnaire/ironmisc_v5?system=http://us.truenth.org/questionnaire" + }, + "rank": 1 + }, + { + "questionnaire": { + "display": "factfpsi", + "reference": "api/questionnaire/factfpsi?system=http://us.truenth.org/questionnaire" + }, + "rank": 2 + }, + { + "questionnaire": { + "display": "epic26", + "reference": "api/questionnaire/epic26?system=http://us.truenth.org/questionnaire" + }, + "rank": 3 + }, + { + "questionnaire": { + "display": "prems", + "reference": "api/questionnaire/prems?system=http://us.truenth.org/questionnaire" + }, + "rank": 4 + } + ], + "recurs": [], + "research_protocol": { + "display": "IRONMAN v5", + "reference": "api/research_protocol/IRONMAN v5" + }, + "resourceType": "QuestionnaireBank", + "start": "{\"days\": 0}" + }, { "classification": "indefinite", "expired": "{\"years\": 50}", @@ -189,6 +239,27 @@ "resourceType": "QuestionnaireBank", "start": "{\"days\": 0}" }, + { + "classification": "indefinite", + "expired": "{\"years\": 50}", + "name": "IRONMAN_v5_indefinite", + "questionnaires": [ + { + "questionnaire": { + "display": "irondemog_v3", + "reference": "api/questionnaire/irondemog_v3?system=http://us.truenth.org/questionnaire" + }, + "rank": 0 + } + ], + "recurs": [], + "research_protocol": { + "display": "IRONMAN v5", + "reference": "api/research_protocol/IRONMAN v5" + }, + "resourceType": "QuestionnaireBank", + "start": "{\"days\": 0}" + }, { "classification": "recurring", "due": "{\"days\": 0}", @@ -261,6 +332,42 @@ "resourceType": "QuestionnaireBank", "start": "{\"days\": 0}" }, + { + "classification": "recurring", + "due": "{\"days\": 0}", + "expired": "{\"months\": 3, \"days\": -2}", + "name": "IRONMAN_v5_recurring_3mo_pattern", + "overdue": "{\"days\": 16}", + "questionnaires": [ + { + "questionnaire": { + "display": "eortc", + "reference": "api/questionnaire/eortc?system=http://us.truenth.org/questionnaire" + }, + "rank": 0 + }, + { + "questionnaire": { + "display": "ironmisc_v5", + "reference": "api/questionnaire/ironmisc_v5?system=http://us.truenth.org/questionnaire" + }, + "rank": 1 + } + ], + "recurs": [ + { + "cycle_length": "{\"months\": 6}", + "start": "{\"months\": 3, \"days\": -15}", + "termination": "{\"months\": 59}" + } + ], + "research_protocol": { + "display": "IRONMAN v5", + "reference": "api/research_protocol/IRONMAN v5" + }, + "resourceType": "QuestionnaireBank", + "start": "{\"days\": 0}" + }, { "classification": "recurring", "due": "{\"days\": 0}", @@ -347,6 +454,99 @@ "resourceType": "QuestionnaireBank", "start": "{\"days\": 0}" }, + { + "classification": "recurring", + "due": "{\"days\": 0}", + "expired": "{\"months\": 3, \"days\": -2}", + "name": "IRONMAN_v5_start6mo_yearly_end30mo", + "overdue": "{\"days\": 16}", + "questionnaires": [ + { + "questionnaire": { + "display": "eortc", + "reference": "api/questionnaire/eortc?system=http://us.truenth.org/questionnaire" + }, + "rank": 0 + }, + { + "questionnaire": { + "display": "ironmisc_v5", + "reference": "api/questionnaire/ironmisc_v5?system=http://us.truenth.org/questionnaire" + }, + "rank": 1 + }, + { + "questionnaire": { + "display": "factfpsi", + "reference": "api/questionnaire/factfpsi?system=http://us.truenth.org/questionnaire" + }, + "rank": 2 + }, + { + "questionnaire": { + "display": "physactivity", + "reference": "api/questionnaire/physactivity?system=http://us.truenth.org/questionnaire" + }, + "rank": 3 + } + ], + "recurs": [ + { + "cycle_length": "{\"years\": 1}", + "start": "{\"months\": 6, \"days\": -15}", + "termination": "{\"months\": 33}" + } + ], + "research_protocol": { + "display": "IRONMAN v5", + "reference": "api/research_protocol/IRONMAN v5" + }, + "resourceType": "QuestionnaireBank", + "start": "{\"days\": 0}" + }, + { + "classification": "recurring", + "due": "{\"days\": 0}", + "expired": "{\"months\": 3, \"days\": -2}", + "name": "IRONMAN_v5_start3.5years_yearly", + "overdue": "{\"days\": 16}", + "questionnaires": [ + { + "questionnaire": { + "display": "eortc", + "reference": "api/questionnaire/eortc?system=http://us.truenth.org/questionnaire" + }, + "rank": 0 + }, + { + "questionnaire": { + "display": "ironmisc_v5", + "reference": "api/questionnaire/ironmisc_v5?system=http://us.truenth.org/questionnaire" + }, + "rank": 1 + }, + { + "questionnaire": { + "display": "factfpsi", + "reference": "api/questionnaire/factfpsi?system=http://us.truenth.org/questionnaire" + }, + "rank": 2 + } + ], + "recurs": [ + { + "cycle_length": "{\"years\": 1}", + "start": "{\"months\": 42, \"days\": -15}", + "termination": "{\"months\": 62}" + } + ], + "research_protocol": { + "display": "IRONMAN v5", + "reference": "api/research_protocol/IRONMAN v5" + }, + "resourceType": "QuestionnaireBank", + "start": "{\"days\": 0}" + }, { "classification": "recurring", "due": "{\"days\": 0}", @@ -460,6 +660,63 @@ }, "resourceType": "QuestionnaireBank", "start": "{\"days\": 0}" + }, + { + "classification": "recurring", + "due": "{\"days\": 0}", + "expired": "{\"months\": 3, \"days\": -2}", + "name": "IRONMAN_v5_recurring_annual_pattern", + "overdue": "{\"days\": 16}", + "questionnaires": [ + { + "questionnaire": { + "display": "eortc", + "reference": "api/questionnaire/eortc?system=http://us.truenth.org/questionnaire" + }, + "rank": 0 + }, + { + "questionnaire": { + "display": "ironmisc_v5", + "reference": "api/questionnaire/ironmisc_v5?system=http://us.truenth.org/questionnaire" + }, + "rank": 1 + }, + { + "questionnaire": { + "display": "factfpsi", + "reference": "api/questionnaire/factfpsi?system=http://us.truenth.org/questionnaire" + }, + "rank": 2 + }, + { + "questionnaire": { + "display": "epic26", + "reference": "api/questionnaire/epic26?system=http://us.truenth.org/questionnaire" + }, + "rank": 3 + }, + { + "questionnaire": { + "display": "prems", + "reference": "api/questionnaire/prems?system=http://us.truenth.org/questionnaire" + }, + "rank": 4 + } + ], + "recurs": [ + { + "cycle_length": "{\"years\": 1}", + "start": "{\"months\": 12, \"days\": -15}", + "termination": "{\"years\": 5, \"months\": 3}" + } + ], + "research_protocol": { + "display": "IRONMAN v5", + "reference": "api/research_protocol/IRONMAN v5" + }, + "resourceType": "QuestionnaireBank", + "start": "{\"days\": 0}" } ], "id": "SitePersistence v0.2", diff --git a/portal/config/eproms/ResearchProtocol.json b/portal/config/eproms/ResearchProtocol.json index 20c31b9878..ba6c297f1e 100644 --- a/portal/config/eproms/ResearchProtocol.json +++ b/portal/config/eproms/ResearchProtocol.json @@ -1,5 +1,10 @@ { "entry": [ + { + "created_at": "2019-12-16T14:00:00", + "name": "IRONMAN v5", + "resourceType": "ResearchProtocol" + }, { "created_at": "2018-02-10T11:59:00", "name": "IRONMAN v3", diff --git a/portal/migrations/script.py.mako b/portal/migrations/script.py.mako index ed2ffe3f90..02b3b86ad0 100644 --- a/portal/migrations/script.py.mako +++ b/portal/migrations/script.py.mako @@ -7,10 +7,8 @@ Create Date: ${create_date} """ from alembic import op import sqlalchemy as sa - ${imports if imports else ""} - # revision identifiers, used by Alembic. revision = ${repr(up_revision)} down_revision = ${repr(down_revision)} diff --git a/portal/migrations/versions/4737a563e3f9_.py b/portal/migrations/versions/4737a563e3f9_.py new file mode 100644 index 0000000000..4927f02bab --- /dev/null +++ b/portal/migrations/versions/4737a563e3f9_.py @@ -0,0 +1,84 @@ +"""encode comorb QuestionnaireResponse answers + +Revision ID: 4737a563e3f9 +Revises: df233cc6fa8a +Create Date: 2019-12-16 17:45:06.516658 + +""" +import copy + +from alembic import op +from sqlalchemy.orm import sessionmaker + +from portal.models.questionnaire_response import QuestionnaireResponse +from portal.models.questionnaire import Questionnaire + +# revision identifiers, used by Alembic. +revision = '4737a563e3f9' +down_revision = 'df233cc6fa8a' + + +Session = sessionmaker() + + +def fixup_comorb(questionnaire_response_json, comorb_options): + """Replace valueString text with corresponding valueCoding""" + # exit early if preconditions not met + if len(questionnaire_response_json['group']['question'][0]['answer']) == 0: + return questionnaire_response_json + + # JSONB mutation detection work around + # See https://bugs.launchpad.net/fuel/+bug/1482658 + qnr_json_copy = copy.deepcopy(questionnaire_response_json) + + target_question = qnr_json_copy['group']['question'][0] + coded_answers = [] + for answer in target_question['answer']: + if 'valueCoding' in answer: + return questionnaire_response_json + coded_answer = {'valueCoding': { + # lookup code from valueString + 'code': comorb_options[answer['valueString']], + 'system': 'https://eproms.truenth.org/api/codings/assessment', + }} + coded_answers.append(coded_answer) + + target_question['answer'] = coded_answers + return qnr_json_copy + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + session = Session(bind=op.get_bind()) + + instrument_id = 'comorb' + comorb_q = Questionnaire.find_by_name(name=instrument_id) + # exit if Questionnaire not found + if not comorb_q: + return + # invert dictionary to lookup code by answer + comorb_codes = {v: k for k, v in comorb_q.questionnaire_code_map().items()} + + questionnaire_responses = session.query(QuestionnaireResponse).filter( + QuestionnaireResponse.document[ + ("questionnaire", "reference") + ].astext.endswith(instrument_id) + ).order_by(QuestionnaireResponse.id) + + for qnr in questionnaire_responses: + qnr_json = fixup_comorb(qnr.document, comorb_options=comorb_codes) + if qnr_json == qnr.document: + continue + + qnr.document = qnr_json + session.add(qnr) + session.commit() + assert qnr.document + print("Processed QNR: %d" % qnr.id) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### diff --git a/portal/migrations/versions/df233cc6fa8a_.py b/portal/migrations/versions/df233cc6fa8a_.py new file mode 100644 index 0000000000..2ae4c71e0c --- /dev/null +++ b/portal/migrations/versions/df233cc6fa8a_.py @@ -0,0 +1,50 @@ +"""Capture email_message.recipient ID when missed on __invite__ prefix + +Revision ID: df233cc6fa8a +Revises: 908731b85112 +Create Date: 2019-12-12 16:13:54.058040 + +""" +from alembic import op +from sqlalchemy.orm import sessionmaker +from portal.models.message import EmailMessage +from portal.models.user import INVITE_PREFIX, User + +# revision identifiers, used by Alembic. +revision = 'df233cc6fa8a' +down_revision = '908731b85112' +Session = sessionmaker() + + +def upgrade(): + session = Session(bind=op.get_bind()) + + needing_attn = session.query(EmailMessage).filter( + EmailMessage.recipient_id.is_(None)) + items = [] # don't update mid query + for em in needing_attn: + items.append({'id': em.id, 'recipients': em.recipients}) + + # Whip through, updating those for which we can find a valid recipient + corrected = 0 + for i in items: + user = session.query(User).filter( + User.email == i['recipients']).first() + if not user: + user = session.query(User).filter(User.email == "{}{}".format( + INVITE_PREFIX, i['recipients'])).first() + if user: + em = session.query(EmailMessage).get(i['id']) + em.recipient_id = user.id + corrected += 1 + + if corrected: + session.commit() + print( + "Corrected {} EmailMessages of {} missing a recipient_id".format( + corrected, len(items))) + + +def downgrade(): + # No downgrade needed + pass diff --git a/portal/models/clinical_constants.py b/portal/models/clinical_constants.py index 765f34794b..2bee879969 100644 --- a/portal/models/clinical_constants.py +++ b/portal/models/clinical_constants.py @@ -16,6 +16,12 @@ class ClinicalConstants(object): + __instance = None + + def __new__(cls): + if ClinicalConstants.__instance is None: + ClinicalConstants.__instance = object.__new__(cls) + return ClinicalConstants.__instance def __iter__(self): for attr in dir(self): diff --git a/portal/models/message.py b/portal/models/message.py index 3b9686def9..874f00b813 100644 --- a/portal/models/message.py +++ b/portal/models/message.py @@ -1,6 +1,7 @@ """Model classes for message data""" from datetime import datetime +from flask import current_app from sqlalchemy.ext.hybrid import hybrid_property from textwrap import fill @@ -9,7 +10,7 @@ from ..audit import auditable_event from ..database import db from ..extensions import mail -from .user import User +from .user import INVITE_PREFIX, User def log_message(message, app): @@ -78,6 +79,18 @@ def log_message(message, app): EMAIL_FOOTER = "" +def extra_headers(): + """Function to deliver any configured extra_headers for outbound email + + Returns an empty dict, or one including any desired extra_headers, such + as a ``List-Unsubscribe`` header. + + """ + # TN-2386 Include List-Unsubscribe header to improve spam scores + return {'List-Unsubscribe': "".format( + current_app.config['CONTACT_SENDTO_EMAIL'])} + + class EmailMessage(db.Model): __tablename__ = 'email_messages' id = db.Column(db.Integer, primary_key=True) @@ -106,6 +119,10 @@ def recipients(self, value): raise ValueError("schema only supports single recipient") recipient_user = User.query.filter_by(email=value).first() + if not recipient_user: + # Capture email sent to a user prior to registration + recipient_user = User.query.filter_by(email="{}{}".format( + INVITE_PREFIX, value)).first() if recipient_user: self.recipient_id = recipient_user.id self._recipients = value @@ -134,13 +151,18 @@ def send_message(self, cc_address=None): """ message = Message( subject=self.subject, + extra_headers=extra_headers(), recipients=self.recipients.split()) if cc_address: message.cc.append(cc_address) body = self.style_message(self.body) message.html = fill( body, width=280, break_long_words=False, break_on_hyphens=False) - mail.send(message) + exc = None + try: + mail.send(message) + except Exception as e: + exc = e user = User.query.filter_by(email='__system__').first() user_id = user.id if user else None @@ -151,8 +173,18 @@ def send_message(self, cc_address=None): if user_id and subject_id: audit_msg = ("EmailMessage '{0.subject}' sent to " "{0.recipients} from {0.sender}".format(self)) + if exc: + audit_msg = "ERROR {}; {}".format(str(exc), audit_msg) auditable_event(message=audit_msg, user_id=user_id, subject_id=subject_id, context="user") + else: + # This should never happen, alert if it does + current_app.logger.error( + "Unable to generate audit log for email {}".format(Message)) + # If an exception was raised when attempting the send, re-raise now + # for clients to manage + if exc: + raise exc def __str__(self): return "EmailMessage subj:{} sent_at:{}".format( diff --git a/portal/models/organization.py b/portal/models/organization.py index d6d7ecb037..406375dc85 100644 --- a/portal/models/organization.py +++ b/portal/models/organization.py @@ -574,6 +574,10 @@ def apply_fhir(self): retired_as_of=FHIR_datetime.parse( rp.get('retired_as_of'), none_safe=True)) else: + if existing not in remove_if_not_requested: + raise ValueError( + "duplicate RP names for org {}".format( + self.organization.name)) remove_if_not_requested.remove(existing) # Unfortunately, the association proxy requires diff --git a/portal/models/procedure_codes.py b/portal/models/procedure_codes.py index ce2a6c1790..26cd466244 100644 --- a/portal/models/procedure_codes.py +++ b/portal/models/procedure_codes.py @@ -65,6 +65,12 @@ class TxStartedConstants(object): from different coding systems under the same codeable_concept """ + __instance = None + + def __new__(cls): + if TxStartedConstants.__instance is None: + TxStartedConstants.__instance = object.__new__(cls) + return TxStartedConstants.__instance def __iter__(self): for attr in dir(self): @@ -210,6 +216,12 @@ class TxNotStartedConstants(object): codeable concept containing a known procedure started coding. """ + __instance = None + + def __new__(cls): + if TxNotStartedConstants.__instance is None: + TxNotStartedConstants.__instance = object.__new__(cls) + return TxNotStartedConstants.__instance def __iter__(self): for attr in dir(self): diff --git a/portal/models/qb_timeline.py b/portal/models/qb_timeline.py index 78dcde99bb..82e9b44441 100644 --- a/portal/models/qb_timeline.py +++ b/portal/models/qb_timeline.py @@ -1,3 +1,4 @@ +from collections import namedtuple from datetime import MAXYEAR, datetime from time import sleep @@ -12,6 +13,7 @@ from ..database import db from ..date_tools import FHIR_datetime, RelativeDelta from ..dogpile_cache import dogpile_cache +from ..set_tools import left_center_right from ..timeout_lock import TimeoutLock from ..trace import trace from .overall_status import OverallStatus @@ -22,7 +24,7 @@ trigger_date, visit_name, ) -from .questionnaire_response import QNR_results +from .questionnaire_response import QNR_results, QuestionnaireResponse from .research_protocol import ResearchProtocol from .role import ROLE from .user import User @@ -266,6 +268,179 @@ def second_null_safe_datetime(x): return x[1] +RPD = namedtuple("RPD", ['rp', 'retired', 'qbds']) + + +def cur_next_rp_gen(user, classification, trigger_date): + """Generator to manage transitions through research protocols + + Returns a *pair* of research protocol data (RPD) namedtuples, + one for current (active) RP data, one for the "next". + + :param user: applicable patient + :param classification: None or 'indefinite' for special handling + :param trigger_date: patient's initial trigger date + + :yields: cur_RPD, next_RPD + + """ + rps = ResearchProtocol.assigned_to(user) + sorted_rps = sorted( + list(rps), key=second_null_safe_datetime, reverse=True) + + def qbds_for_rp(rp, classification, trigger_date): + if rp is None: + return None + if classification == 'indefinite': + return indef_qbs_by_rp(rp.id, trigger_date=trigger_date) + return ordered_rp_qbs(rp.id, trigger_date=trigger_date) + + while sorted_rps: + # Start with oldest RP (current) till it's time to progress (next) + current_rp, current_retired = sorted_rps.pop() + if sorted_rps: + next_rp, next_retired = sorted_rps[-1] + else: + next_rp = None + trace("current RP '{}'({}), next RP '{}'({})".format( + current_rp.name, current_rp.id, next_rp.name + if next_rp else 'None', next_rp.id if next_rp else 'None')) + + curRPD = RPD( + rp=current_rp, + retired=current_retired, + qbds=qbds_for_rp(current_rp, classification, trigger_date)) + if next_rp: + nextRPD = RPD( + rp=next_rp, + retired=next_retired, + qbds=qbds_for_rp(next_rp, classification, trigger_date) + ) + if curRPD.retired == nextRPD.retired: + raise ValueError( + "Invalid state: multiple RPs w/ same retire date") + else: + nextRPD = None + yield curRPD, nextRPD + + +class RP_flyweight(object): + """maintains state for RPs as it transitions + + Any number of Research Protocols may apply to a user. This + class manages transitioning through the applicable as time + passes, maintaining a "current" and "next" as well as the ability + to continue marching forward. + + """ + + def __init__(self, user, trigger_date, classification): + """Initialize flyweight state + :param user: the patient + :param trigger_date: the patient's initial trigger date + :param classification: `indefinite` or None + """ + self.user = user + self.td = trigger_date + self.classification = classification + self.rp_walker = cur_next_rp_gen( + user=self.user, trigger_date=self.td, + classification=self.classification) + self.cur_rpd, self.nxt_rpd = next(self.rp_walker, (None, None)) + self.skipped_nxt_start = None + + def adjust_start(self): + """The QB start may need a minor adjustment, done once when ready""" + self.cur_qbd.relative_start = self.cur_start + + # sanity check - make sure we don't adjust twice + if hasattr(self.cur_qbd, 'already_adjusted'): + raise RuntimeError( + 'already adjusted the qbd relative start') + self.cur_qbd.already_adjusted = True + + def consider_transition(self): + """Returns true only if state suggests it *may* be transtion time""" + return self.nxt_rpd and self.cur_rpd.retired < self.cur_exp + + def next_qbd(self): + """Advance to next qbd on applicable RPs""" + self.cur_qbd, self.cur_start, self.cur_exp = None, None, None + if self.cur_rpd: + self.cur_qbd = next(self.cur_rpd.qbds, None) + if self.cur_qbd: + self.cur_start = calc_and_adjust_start( + user=self.user, qbd=self.cur_qbd, initial_trigger=self.td) + self.cur_exp = calc_and_adjust_expired( + user=self.user, qbd=self.cur_qbd, initial_trigger=self.td) + + self.nxt_qbd, self.nxt_start = None, None + if self.nxt_rpd: + self.nxt_qbd = next(self.nxt_rpd.qbds, None) + if self.nxt_qbd: + self.nxt_start = calc_and_adjust_start( + user=self.user, qbd=self.nxt_qbd, initial_trigger=self.td) + if self.cur_qbd is None: + trace("Finished cur RP with remaining QBs in next") + self.cur_start = self.nxt_start + self.transition() + elif self.cur_start != self.nxt_start: + # Valid only when the RP being replaced doesn't have all the + # visits defined in the next one (i.e. v3 doesn't have months + # 27 or 33 and v5 does). Look ahead for a match + self.skipped_nxt_start = self.nxt_start + self.nxt_start = None + self.nxt_qbd = next(self.nxt_rpd.qbds, None) + if self.nxt_qbd: + self.nxt_start = calc_and_adjust_start( + user=self.user, qbd=self.nxt_qbd, + initial_trigger=self.td) + if self.cur_start != self.nxt_start: + # Still no match means poorly defined RP QBs + raise ValueError( + "Invalid state {}:{} not in lock-step even on " + "look ahead; RPs need to maintain same " + "schedule {}, {}, {}".format( + self.cur_rpd.rp.name, self.nxt_rpd.rp.name, + self.cur_start, self.nxt_start, + self.skipped_nxt_start)) + if self.cur_qbd: + trace("advanced to next QB: {} w/ start {}".format( + self.cur_qbd.questionnaire_bank.name, self.cur_start)) + else: + trace("out of QBs!") + + def transition(self): + """Transition internal state to 'next' Research Protocol""" + trace("transitioning to the next RP w/ cur_start {}".format( + self.cur_start)) + if self.cur_start != self.nxt_start: + raise ValueError( + "Invalid state {}:{} not in lock-step; RPs need " + "to maintain same schedule".format( + self.cur_rpd.rp.name, self.nxt_rpd.rp.name)) + + self.cur_rpd, self.nxt_rpd = next(self.rp_walker) + + # Need to "catch-up" the fresh generators to match current + # if we skipped ahead, only catch-up to the skipped_start + start = self.cur_start + if self.skipped_nxt_start: + assert self.skipped_nxt_start < start + start = self.skipped_nxt_start + while True: + # Fear not, won't loop forever as `next_qbd` will + # quickly exhaust, thus raising an exception, in + # the event of a config error where RPs somehow + # change the start, expiration synchronization. + self.next_qbd() + if start == self.cur_start: + break + + # reset in case of another advancement + self.skipped_nxt_start = None + + def ordered_qbs(user, classification=None): """Generator to yield ordered qbs for a user @@ -294,87 +469,98 @@ def ordered_qbs(user, classification=None): else: trace("no trigger date therefore nothing from ordered_qbds()") return + else: + trace("initial trigger date {}".format(td)) - # Zero to one RP makes things significantly easier - otherwise - # swap in a strategy that can work with the change. - rps = ResearchProtocol.assigned_to(user) + rp_flyweight = RP_flyweight( + user=user, trigger_date=td, classification=classification) - if len(rps) > 0: - # RP switch is delayed if user submitted any results for the then - # active QB on the RP active at that time. + if rp_flyweight.cur_rpd: user_qnrs = QNR_results(user) + rp_flyweight.next_qbd() - # With multiple RPs, move in lock step, determine when to switch. - sorted_rps = sorted( - list(rps), key=second_null_safe_datetime, reverse=True) - - # Start with oldest RP (current) till it's time to progress (next) - current_rp, current_retired = sorted_rps.pop() - if sorted_rps: - trace("multiple RPs found") - next_rp, next_retired = sorted_rps.pop() - else: - trace("single RP found") - next_rp = None - - if sorted_rps: - raise ValueError("can't cope with > 2 RPs at this time") - - if classification == 'indefinite': - current_qbds = indef_qbs_by_rp(current_rp.id, trigger_date=td) - next_rp_qbds = ( - indef_qbs_by_rp(next_rp.id, trigger_date=td) if next_rp else - None) - else: - current_qbds = ordered_rp_qbs(current_rp.id, trigger_date=td) - next_rp_qbds = ( - ordered_rp_qbs(next_rp.id, trigger_date=td) if next_rp else - None) + if not rp_flyweight.cur_qbd: + trace("no current found in initial QBD lookup, bail") + return while True: - # Advance both qb generators in sync while both RPs are defined - try: - current_qbd = next(current_qbds) - except StopIteration: - return - if next_rp_qbds: - try: - next_rp_qbd = next(next_rp_qbds) - except StopIteration: - return - users_start = calc_and_adjust_start( - user=user, qbd=current_qbd, initial_trigger=td) - users_expiration = calc_and_adjust_expired( - user=user, qbd=current_qbd, initial_trigger=td) - - # if there's still a next and current gets retired before this - # QB's expiration, switch over *unless* user submitted a matching - # QNR on the current RP - if (next_rp_qbds and current_retired < users_expiration and - not user_qnrs.earliest_result( - qb_id=current_qbd.questionnaire_bank.id, - iteration=current_qbd.iteration)): - current_qbds = next_rp_qbds - current_qbd, current_retired = next_rp_qbd, next_retired - next_rp_qbds, next_retired = None, None - users_start = calc_and_adjust_start( - user=user, qbd=current_qbd, initial_trigger=td) - - # done if user withdrew before the next start - if withdrawal_date and withdrawal_date < users_start: + if rp_flyweight.consider_transition(): + # if there's a nextRP and curRP is retired before the + # user's QB for the curRP expires, we look to transition + # the user to the nextRP. + # + # if however, the user has already posted QNRs for the + # currentRP one of two things needs to happen: + # + # 1. if any of the QNRs are for instruments which + # deterministically* demonstrate work on the current + # RP has begun, we postpone the transition to the next + # RP till the subsequent "visit" (i.e. next QB which + # will come up in the next iteration) + # 2. if all the submissions for the currentRP are + # non-deterministic*, we transition now and update the + # QNRs so they point to the QB of the nextRP + # + # * over RPs {v2,v3}, "epic23" vs "epic26" deterministically + # define the QB whereas "eortc" is non-deterministic, as + # it belongs to both + + transition_now = False + cur_only, common, next_only = left_center_right( + rp_flyweight.cur_qbd.questionnaire_instruments, + rp_flyweight.nxt_qbd.questionnaire_instruments) + combined_instruments = cur_only.union(common).union(next_only) + qnrs_for_period = user_qnrs.authored_during_period( + start=rp_flyweight.cur_start, end=rp_flyweight.cur_exp, + restrict_to_instruments=combined_instruments) + if len(qnrs_for_period) == 0: + transition_now = True + + period_instruments = set( + [q.instrument for q in qnrs_for_period]) + if not transition_now and period_instruments & cur_only: + if period_instruments & next_only: + current_app.logger.error( + "Transition ERROR, {} has deterministic QNRs " + "for multiple RPs '{}':'{}' during same visit; " + "User submitted {}; cur_only {}, common {}, " + "next_only {}".format( + user, rp_flyweight.cur_rpd.rp.name, + rp_flyweight.nxt_rpd.rp.name, + str(period_instruments), str(cur_only), + str(common), str(next_only))) + # Don't transition yet, as definitive work on the old + # (current) RP has already been posted + transition_now = False + else: + # Safe to transition, but first update all the common, + # existing QNRs to reference the *next* RP + for q in qnrs_for_period: + if q.instrument not in common: + continue + qnr = QuestionnaireResponse.query.get(q.qnr_id) + qnr.qb_id = rp_flyweight.nxt_qbd.qb_id + qnr.qb_iteration = rp_flyweight.nxt_qbd.iteration + transition_now = True + + if transition_now: + rp_flyweight.transition() + + # done if user withdrew before QB starts + if withdrawal_date and withdrawal_date < rp_flyweight.cur_start: trace("withdrawn as of {}".format(withdrawal_date)) break - current_qbd.relative_start = users_start - # sanity check - make sure we don't adjust twice - if hasattr(current_qbd, 'already_adjusted'): - raise RuntimeError('already adjusted the qbd relative start') - current_qbd.already_adjusted = True - yield current_qbd + rp_flyweight.adjust_start() + yield rp_flyweight.cur_qbd + + rp_flyweight.next_qbd() + if not rp_flyweight.cur_qbd: + return else: trace("no RPs found") - # Neither RP case hit, try intervention associated QBs + # No applicable RPs, try intervention associated QBs if classification == 'indefinite': iqbds = indef_intervention_qbs(user, trigger_date=td) else: diff --git a/portal/models/qbd.py b/portal/models/qbd.py index bf8900a3b6..20d09e916d 100644 --- a/portal/models/qbd.py +++ b/portal/models/qbd.py @@ -54,6 +54,10 @@ def questionnaire_bank(self, qb): self.qb_id = qb.id self._questionnaire_bank = qb + @property + def questionnaire_instruments(self): + return set(q.name for q in self.questionnaire_bank.questionnaires) + def as_json(self): from ..models.questionnaire_bank import visit_name diff --git a/portal/models/questionnaire_response.py b/portal/models/questionnaire_response.py index 024e8718f6..7c359770ce 100644 --- a/portal/models/questionnaire_response.py +++ b/portal/models/questionnaire_response.py @@ -434,6 +434,20 @@ def qnrs_missing_qb_association(self): associated = [qnr for qnr in self.qnrs if qnr.qb_id is not None] return len(self.qnrs) != len(associated) + def authored_during_period(self, start, end, restrict_to_instruments=None): + """Return the ordered list of QNRs with authored in [start, end)""" + results = [] + for qnr in self.qnrs: + if qnr.authored < start: + continue + if qnr.authored >= end: + return results + if (restrict_to_instruments and + qnr.instrument not in restrict_to_instruments): + continue + results.append(qnr) + return results + def earliest_result(self, qb_id, iteration): """Returns timestamp of earliest result for given params, or None""" for qnr in self.qnrs: diff --git a/portal/models/reference.py b/portal/models/reference.py index 437441d580..feb697c68e 100644 --- a/portal/models/reference.py +++ b/portal/models/reference.py @@ -164,7 +164,7 @@ def get_object_by_identifier(obj, system, value): (re.compile('[Oo]rganization/(\d+)'), Organization, 'id'), (re.compile('[Qq]uestionnaire/(\w+)\?[Ss]ystem=(\S+)'), Questionnaire, 'identifier'), - (re.compile('[Qq]uestionnaire_[Bb]ank/(\w+)'), + (re.compile('[Qq]uestionnaire_[Bb]ank/(\w+[.]?\w*)'), QuestionnaireBank, 'name'), (re.compile('[Ii]ntervention/(\w+)'), Intervention, 'name'), (re.compile('[Pp]atient/(\d+)'), User, 'id'), diff --git a/portal/set_tools.py b/portal/set_tools.py new file mode 100644 index 0000000000..ad40b278a5 --- /dev/null +++ b/portal/set_tools.py @@ -0,0 +1,9 @@ +"""Module for additional set tools/utilities""" + + +def left_center_right(leftset, rightset): + """Return left only, center (common) and right only elements""" + left = leftset - rightset + common = leftset & rightset + right = rightset - leftset + return left, common, right diff --git a/portal/static/js/src/accountCreation.js b/portal/static/js/src/accountCreation.js index 995de80f56..9282f20377 100644 --- a/portal/static/js/src/accountCreation.js +++ b/portal/static/js/src/accountCreation.js @@ -490,8 +490,11 @@ import {CurrentUserObj} from "./mixins/CurrentUser.js"; let self = this; CurrentUserObj.initCurrentUser(function() { OT.init(function() { - self.getOrgs(self.populateOrgsByRole); - self.handleMedidataRave(CurrentUserObj.topLevelOrgs, CurrentUserObj.isAdminUser()); + setTimeout(function() { + //delay a bit to call orgs api after current user info is loaded + this.getOrgs(this.populateOrgsByRole); + this.handleMedidataRave(CurrentUserObj.topLevelOrgs, CurrentUserObj.isAdminUser()); + }.bind(self), 150); }); }); }; diff --git a/portal/static/js/src/gil.js b/portal/static/js/src/gil.js index a2bcbaa182..6bcac215a0 100755 --- a/portal/static/js/src/gil.js +++ b/portal/static/js/src/gil.js @@ -675,20 +675,12 @@ module.exports = OrgTool = (function() { }; this.getOrgs = function(userId, sync, callback) { var self = this; - $.ajax ({ - type: "GET", - url: "/api/organization", - async: sync? false : true - }).done(function(data) { - + callback = callback || function() {}; + //use common ajax function, which will retry and report error with detail + tnthAjax.getOrgs(userId, {sync: sync}, function(data) { $("#fillOrgs").attr("userId", userId); - (self.populateOrgsList).apply(self, [data.entry]); self.populateUI(); - if (callback) { - callback(); - } - $("#modal-org").on("hide.bs.modal", function(e) { if (typeof sessionStorage !== "undefined") { sessionStorage.setItem("noOrgModalViewed", "true"); @@ -745,11 +737,7 @@ module.exports = OrgTool = (function() { }; }); }); - }).fail(function(xhr) { - window.app.global.reportError(userId, "/api/organization", xhr.responseText); - if (callback) { - callback(); - } + callback(data); }); }, this.updateOrg = function(userId, callback) { diff --git a/portal/static/js/src/modules/TnthAjax.js b/portal/static/js/src/modules/TnthAjax.js index 3c0a76a0a9..2a4c920709 100644 --- a/portal/static/js/src/modules/TnthAjax.js +++ b/portal/static/js/src/modules/TnthAjax.js @@ -71,10 +71,12 @@ export default { /*global $ */ }, 3000); //retry after 3 seconds })(self, url, method, userId, params, callback); } else { - params.attempts = 0; fieldHelper.showError(targetField); callback({"error": true, "data": xhr}); self.sendError(xhr, url, userId, params); + //reset attempts after reporting error so we know how many attempts have been made + //multiple attempts can signify server not being responsive or busy network + params.attempts = 0; } }); }, diff --git a/portal/static/js/src/profile.js b/portal/static/js/src/profile.js index fd05042e23..1ea3218c34 100644 --- a/portal/static/js/src/profile.js +++ b/portal/static/js/src/profile.js @@ -159,7 +159,7 @@ export default (function() { consentDate: "", completionDate: "", todayObj: { displayDay: "", displayMonth: "", displayYear: ""}, - errorMessage: "" + errorMessage: null }, patientEmailForm: { loading: false @@ -1742,9 +1742,16 @@ export default (function() { }, manualEntryModalVis: function(hide) { if (hide) { + /* + * TODO, need to find out why IE is raising vue error here + */ this.manualEntry.loading = true; + $("#manualEntryLoader").show(); + $("#manualEntryButtonsContainer").hide(); } else { this.manualEntry.loading = false; + $("#manualEntryLoader").hide(); + $("#manualEntryButtonsContainer").show(); } }, continueToAssessment: function(method, completionDate, assessment_url) { @@ -1774,7 +1781,7 @@ export default (function() { setTimeout(function(callback) { callback = callback || function() {}; if (callback) { callback(); } - }, 1000, self.manualEntryModalVis); + }, 5000, self.manualEntryModalVis); }, setManualEntryDateToToday: function() { this.manualEntry.todayObj = this.modules.tnthDates.getTodayDateObj(); @@ -1791,6 +1798,19 @@ export default (function() { this.manualEntry.completionDate = this.manualEntry.consentDate; } }, + resetManualEntryFormValidationError: function() { + //reset error message to null + this.manualEntry.errorMessage = null; + //reset bootstrap form validation error + $("#manualEntryCompletionDateContainer").removeClass("has-error"); + $("#manualEntryMessageContainer").html("").removeClass("with-errors"); + }, + setManualEntryErrorMessage: function(message) { + if (!message) { + return; + } + $("#manualEntryMessageContainer").html(message); + }, initCustomPatientDetailSection: function() { var subjectId = this.subjectId, self = this; $(window).on("beforeunload", function() { //fix for safari @@ -1803,8 +1823,8 @@ export default (function() { self.manualEntry.initloading = true; }); $("#manualEntryModal").on("shown.bs.modal", function() { - self.manualEntry.errorMessage = ""; self.manualEntry.method = ""; + self.resetManualEntryFormValidationError(); self.modules.tnthAjax.getConsent(subjectId, {sync: true}, function(data) { //get consent date var dataArray = []; if (!data || !data.consent_agreements || data.consent_agreements.length === 0) { @@ -1842,7 +1862,7 @@ export default (function() { }); $("input[name='entryMethod']").on("click", function() { - self.manualEntry.errorMessage = ""; + self.resetManualEntryFormValidationError(); self.manualEntry.method = $(this).val(); if ($(this).val() === "interview_assisted") { //if method is interview assisted, reset completion date to GMT date/time for today @@ -1858,26 +1878,27 @@ export default (function() { ["qCompletionDay", "qCompletionMonth", "qCompletionYear"].forEach(function(fn) { var fd = $("#" + fn), tnthDates = self.modules.tnthDates; + fd.on("change", function(e) { e.stopImmediatePropagation(); + + //reset error + self.resetManualEntryFormValidationError(); + $("#meSubmit").attr("disabled", false); + var d = $("#qCompletionDay"); var m = $("#qCompletionMonth"); var y = $("#qCompletionYear"); - var isValid = d.val() !== "" && m.val() !== "" && y.val() !== "" && d.get(0).validity.valid && m.get(0).validity.valid && y.get(0).validity.valid; - if (!isValid) { - $("#meSubmit").attr("disabled", true); - return; - } + //add true boolean flag to check for future date entry var errorMessage = tnthDates.dateValidator(d.val(), m.val(), y.val(), true); if (errorMessage) { self.manualEntry.errorMessage = errorMessage; + self.setManualEntryErrorMessage(errorMessage); + $("#meSubmit").attr("disabled", true); return false; } - - //reset error - self.manualEntry.errorMessage = ""; - + var gmtDateObj = tnthDates.getDateObj(y.val(), m.val(), d.val(), 12, 0, 0); self.manualEntry.completionDate = self.modules.tnthDates.getDateWithTimeZone(gmtDateObj, "system"); @@ -1920,17 +1941,18 @@ export default (function() { self.modules.tnthAjax.getCurrentQB(subjectId, completionDate, null, function(data) { if (data.error) { self.manualEntry.errorMessage = i18next.t("Server error occurred checking questionnaire window"); - self.manualEntryModalVis(); - return false; } //check questionnaire time windows if (!(data.questionnaire_bank && Object.keys(data.questionnaire_bank).length > 0)) { self.manualEntry.errorMessage = i18next.t("Invalid completion date. Date of completion is outside the days allowed."); + } + if (self.manualEntry.errorMessage) { + self.setManualEntryErrorMessage(self.manualEntry.errorMessage); self.manualEntryModalVis(); - } else { - self.manualEntry.errorMessage = ""; - self.continueToAssessment(method, completionDate, linkUrl); + return false; } + self.resetManualEntryFormValidationError(); + self.continueToAssessment(method, completionDate, linkUrl); }); }); diff --git a/portal/static/less/eproms.less b/portal/static/less/eproms.less index 7b39a71527..9b349f6709 100644 --- a/portal/static/less/eproms.less +++ b/portal/static/less/eproms.less @@ -4007,7 +4007,7 @@ body.vis-on-callback { /* allow page-specific presentation of content after load margin-top: 1em; label { position: relative; - top: 0.35em; + top: 2px; margin-bottom: 4px; } } diff --git a/portal/templates/profile/profile_macros.html b/portal/templates/profile/profile_macros.html index 048ca94334..12ecbdcd94 100644 --- a/portal/templates/profile/profile_macros.html +++ b/portal/templates/profile/profile_macros.html @@ -1120,10 +1120,10 @@