Skip to content

Commit 863f5fc

Browse files
authored
fix(data): align test data with what's in OpenEMR (#709)
* add appointment alias for colonoscopy * add "Spinal meningeal cancer" diagnosis * remove old diagnosis codes that have no master source equivalent * fix diagnose code and master source diagnosis to match * dynamically update dates mentioned in road closure announcement to be in the future
1 parent 5cc468d commit 863f5fc

File tree

7 files changed

+50
-573
lines changed

7 files changed

+50
-573
lines changed

db_management/opaldb/data/initial/diagnosis.sql

Lines changed: 15 additions & 565 deletions
Large diffs are not rendered by default.

db_management/opaldb/data/test/01_mastersourcealias.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ INSERT INTO `masterSourceAlias` (`ID`, `externalId`, `code`, `description`, `typ
4747
(28049, '35', 'Medical Record | Imaging Report', 'Medical Record | Imaging Report', 3, 7, 0, '', '2025-03-12 12:24:23', 'OpenEMR', '2025-03-12 12:24:23', 'OpenEMR'),
4848
(28050, '36', 'Medical Record | Clinical Notes', 'Medical Record | Clinical Notes', 3, 7, 0, '', '2025-03-12 12:24:23', 'OpenEMR', '2025-03-12 12:24:23', 'OpenEMR'),
4949
(28051, 'OpenEMR', 'Consult_In_Patient', 'CON-IP', 2, 7, 0, '', '2025-03-17 13:42:40', 'interface-engine', '2025-03-17 09:42:40', 'interface-engine'),
50-
(28052, 'OpenEMR', 'new_patient', 'New Patient', 2, 7, 0, '', '2025-04-24 15:04:09', 'interface-engine', '2025-04-24 11:04:09', 'interface-engine');
50+
(28052, 'OpenEMR', 'new_patient', 'New Patient', 2, 7, 0, '', '2025-04-24 15:04:09', 'interface-engine', '2025-04-24 11:04:09', 'interface-engine'),
51+
(28053, 'OpenEMR', 'Colonoscopy', 'CLNSPY', 2, 7, 0, '', '2025-11-24 19:49:41', 'interface-engine', '2025-11-24 14:49:41', 'interface-engine');

db_management/opaldb/data/test/01_mastersourcediagnosis.sql

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,14 @@ INSERT INTO `masterSourceDiagnosis` (`ID`, `externalId`, `code`, `description`,
88
(1759, 'G20.B2', 'G20.B2', "Parkinson\'s disease with dyskinesia, with fluctuations", 7, 0, '', '2025-02-27 10:42:45', 'interface-engine', '2025-02-27 10:42:50', 'interface-engine'),
99
(1760, 'G95.0', 'G95.0', 'Syringomyelia and syringobulbia', 7, 0, '', '2025-02-27 11:12:21', 'interface-engine', '2025-02-27 11:12:26', 'interface-engine'),
1010
(1761, 'C07.', 'C07.', 'Malignant neoplasm of parotid gland', 7, 0, '', '2025-03-05 09:03:09', 'interface-engine', '2025-03-05 09:56:15', 'interface-engine'),
11-
(1762, 'C18.9', 'C18.9', 'Malignant neoplasm of colon, unspecified', 7, 0, '', '2025-03-05 23:03:12', 'interface-engine', '2025-03-05 23:40:16', 'interface-engine');
11+
(1762, 'C18.9', 'C18.9', 'Malignant neoplasm of colon, unspecified', 7, 0, '', '2025-03-05 23:03:12', 'interface-engine', '2025-03-05 23:40:16', 'interface-engine'),
12+
(1763, 'C70.1', 'C70.1', 'Malignant neoplasm of spinal meninges', 7, 0, '', '2025-09-24 13:05:00', 'interface-engine', '2025-11-24 14:48:47', 'interface-engine'),
13+
(1764, 'G20.A2', 'G20.A2', 'Parkinson`s disease without dyskinesia, with fluctuations', 7, 0, '', '2025-11-04 09:03:36', 'interface-engine', '2025-11-24 14:48:53', 'interface-engine'),
14+
(1765, 'C50.111', 'C50.111', 'Malignant neoplasm of central portion of right female breast', 7, 0, '', '2025-10-16 12:03:00', 'interface-engine', '2025-11-24 14:48:54', 'interface-engine'),
15+
(1766, 'S88.912S', 'S88.912S', 'Complete traumatic amputation of left lower leg, level unspecified, sequela', 7, 0, '', '2025-07-21 11:00:00', 'interface-engine', '2025-11-24 14:49:02', 'interface-engine'),
16+
(1767, 'B18.2', 'B18.2', 'Chronic viral hepatitis C', 7, 0, '', '2025-07-21 10:45:00', 'interface-engine', '2025-11-24 14:49:05', 'interface-engine'),
17+
(1768, 'I80.202', 'I80.202', 'Phlebitis and thrombophlebitis of unspecified deep vessels of left lower extremity', 7, 0, '', '2025-07-21 10:30:00', 'interface-engine', '2025-11-24 14:49:07', 'interface-engine'),
18+
(1769, 'B20.', 'B20.', 'Human immunodeficiency virus [HIV] disease', 7, 0, '', '2025-07-21 10:04:00', 'interface-engine', '2025-11-24 16:18:50', 'interface-engine'),
19+
(1770, 'I82.512', 'I82.512', 'Chronic embolism and thrombosis of left femoral vein', 7, 0, '', '2025-10-10 11:54:00', 'interface-engine', '2025-11-24 14:49:11', 'interface-engine'),
20+
(1771, 'I10.', 'I10.', 'Essential (primary) hypertension', 7, 0, '', '2025-08-17 14:00:00', 'interface-engine', '2025-11-24 16:18:35', 'interface-engine')
21+
;

db_management/opaldb/data/test/01_postcontrol.sql

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,14 @@ INSERT INTO `PostControl` (`PostControlSerNum`, `PostType`, `PublishFlag`, `Post
5858
(1093, 'Announcement', 0, 'Annonce de démonstration', 'Demo Announcement', '<p><b>Annonce de démonstration </b></p><p>Cette annonce s\\\'agit d\\\'une annonce de démonstration qui peut être diffusée aux utilisateurs d\\\'Opal. </p><p>Par exemple, il peut conseiller les patients sur des questions générales telles que les changements d\\\'horaires d\\\'ouverture des hôpitaux, les travaux routiers à proximité de l\\\'hôpital, les mesures d\\\'urgence, etc.</p><p><img src=\\"https://static.wixstatic.com/media/1bb73a_22da9dac42fd4bc9834c2d4d5cef3afa~mv2.png/v1/fill/w_224,h_154,al_c,q_85,usm_1.20_1.00_0.01,enc_avif,quality_auto/OPAL_logo.png\\"/></p><p><br/></p>', '<p><b>Demo Announcement</b><br/><br/>This is a demonstration announcement that can be broadcast to Opal users. For example, it can advise patients about general issues such as changes to hospital opening hours, road construction near the hospital, emergency measures, etc.<br/><br/>Using Opal ADMIN, messages like this can be sent to all patients or just patients who meet certain criteria.<br/></p><div><br/></div><p><img src=\\"https://static.wixstatic.com/media/1bb73a_22da9dac42fd4bc9834c2d4d5cef3afa~mv2.png/v1/fill/w_224,h_154,al_c,q_85,usm_1.20_1.00_0.01,enc_avif,quality_auto/OPAL_logo.png\\"/></p>', '0000-00-00 00:00:00', 0, '2025-03-07 11:01:38', '2002-01-01 00:00:00', NULL, '2025-03-07 11:01:38', 0, 'wcXpuaPbtr'),
5959
(1094, 'Treatment Team Message', 0, 'Dernière séance de radiothérapie', 'Last Radiotherapy Session', '<p>Vous avez terminé votre dernière séance de radiothérapie!</p><p>J\\\'espère que vous passerez une relaxante et agréable fin de semaine et que vous vous remettiez en forme bientôt.</p><p>De votre entourage traitant, filmant, développant.<br/></p>', '<p>You have completed your last session of radiotherapy!</p><p>Hope you can have a nice relaxing weekend and get back into shape soon</p><p>From your treating, filming, developing team of friends.<br/></p>', '0000-00-00 00:00:00', 0, '2025-03-12 11:31:06', '2002-01-01 00:00:00', NULL, '2025-03-12 11:31:37', 0, 'cjya0N4isp'),
6060
(1095, 'Announcement', 0, 'Notes de Réconforts des Cèdres Mars', 'Cedars Healing Notes March', '<p>Bringing Hope Through Music</p><p>Music Concert at the Cedars Cancer Center<br/>Thursday, March 5, 2020 at 10 am<br/>DS1 Radio-Oncology reception area</p><p>Tong Wang (pianist), Adam Jeffreys (violinist)<br/><br/></p>', '<p>Bringing Hope Through Music</p><p>Music Concert at the Cedars Cancer Center<br/>Thursday, March 5, 2020 at 10 am<br/>DS1 Radio-Oncology reception area</p><p>Tong Wang (pianist), Adam Jeffreys (violinist)<br/><br/></p>', '0000-00-00 00:00:00', 0, '2025-03-12 11:35:50', '2002-01-01 00:00:00', NULL, '2025-03-12 11:35:50', 0, 'cjya0N4isp'),
61-
(1096, 'Announcement', 1, 'Avis de Fermeture de Route', 'Road Closure Notice', '<p>Veuillez noter que l’accès à l’hôpital Royal par la rue Décarie sera temporairement fermé en raison de travaux routiers, du <b>9 mai au 12 mai,</b> entre <b>8h00 et 16h00</b>.</p><p>Pendant cette période, toute la circulation automobile devra emprunter les itinéraires de déviation désignés, qui seront clairement indiqués afin de garantir l’accès continu à l’hôpital.</p><p>Nous nous excusons pour tout inconvénient que cela pourrait causer et vous remercions de votre compréhension.<br/><br/></p>', '<p>Hello,</p><p>Please be advised that access to the Royal Hospital via Décarie Street will be temporarily closed due to roadwork from <b>May 9th to May 12th</b>, between <b>8:00 and 16:00</b>.</p><p>During this period, all vehicle traffic must use the designated detour routes, which will be clearly marked to ensure continued access to the hospital.</p><p>We apologize for any inconvenience this may cause and thank you for your understanding.<br/></p>', '2025-05-21 14:11:00', 0, '2025-05-08 11:32:31', '2025-05-28 10:57:00', NULL, '2025-05-28 10:57:00', 0, 'qza1MZd5lS');
61+
(1096, 'Announcement', 1, 'Avis de Fermeture de Route', 'Road Closure Notice', '<p>Veuillez noter que l’accès à l’hôpital Royal par la rue Décarie sera temporairement fermé en raison de travaux routiers, du <b>9 mai au 12 mai</b>, entre <b>8h00 et 16h00</b>.</p><p>Pendant cette période, toute la circulation automobile devra emprunter les itinéraires de déviation désignés, qui seront clairement indiqués afin de garantir l’accès continu à l’hôpital.</p><p>Nous nous excusons pour tout inconvénient que cela pourrait causer et vous remercions de votre compréhension.<br/><br/></p>', '<p>Hello,</p><p>Please be advised that access to the Royal Hospital via Décarie Street will be temporarily closed due to roadwork from <b>May 9th to May 12th</b>, between <b>8:00 and 16:00</b>.</p><p>During this period, all vehicle traffic must use the designated detour routes, which will be clearly marked to ensure continued access to the hospital.</p><p>We apologize for any inconvenience this may cause and thank you for your understanding.<br/></p>', '2025-05-21 14:11:00', 0, '2025-05-08 11:32:31', '2025-05-28 10:57:00', NULL, '2025-05-28 10:57:00', 0, 'qza1MZd5lS');
62+
63+
-- Change hardcoded dates in announcement text to dates in the future
64+
UPDATE PostControl
65+
SET Body_EN = REPLACE(Body_EN, 'May 9th to May 12th', CONCAT(DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 5 DAY), '%b %D'), ' to ', DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 8 DAY), '%b %D')))
66+
WHERE PostControlSerNum = 1096;
67+
68+
SET lc_time_names = 'fr_CA';
69+
UPDATE PostControl
70+
SET Body_FR = REPLACE(Body_FR, '9 mai au 12 mai', CONCAT(DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 5 DAY), '%e %b'), ' au ', DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 8 DAY), '%e %b')))
71+
WHERE PostControlSerNum = 1096;

0 commit comments

Comments
 (0)