Open pmanko opened 1 year ago
Updated Insert:
use openmrs;
INSERT INTO `fhir_patient_identifier_system` (
`fhir_patient_identifier_system_id`,
`patient_identifier_type_id`,
`url`,
`name`,
`description`,
`creator`,
`date_created`,
`retired`,
`retired_by`,
`date_retired`,
`retire_reason`,
`changed_by`,
`date_changed`,
`uuid`
)
VALUES (
'1',
'3',
'http://clientregistry.org/artnumber',
'ART Number',
'ART Number',
1,
'2013-12-27 00:00:00',
0,
NULL,
NULL,
NULL,
NULL,
NULL,
'd5efc10e-bf9c-4813-96ef-2969cec85cbb'
),
(
'2',
'6',
'http://cote.divore/ext/identifier/UPI',
'UPI',
'UPI',
1,
'2013-12-27 00:00:00',
0,
NULL,
NULL,
NULL,
NULL,
NULL,
'b4a56d59-42b2-4a4a-86cc-0fb3188bca11'
),
(
'3',
'1',
'http://tap-cdi.openelis.org/ext/identifier/openmrs-id',
'UPI',
'UPI',
1,
'2013-12-27 00:00:00',
0,
NULL,
NULL,
NULL,
NULL,
NULL,
'17b7af60-bc69-4c1c-867e-762219f2ab19'
);
@pmanko let me get to this tomorrow
Well i think for now lets first move by an initializer script,fixing this here https://github.com/I-TECH-UW/ci-hie-demo/pull/13
The mappings in this table are required for proper communication with the Client Registry, as they provide
system
values to outgoingIdentifier
objects.One option is to add the rows directly to the loaded database. This could work, but managing large SQL files is not ideal.
Another option is to run an initializer script on Sigdep3 bootup or setup, perhaps integrated into the Dockerfile.
We will need to solve the problem of initializing the DB more broadly anyways, as we start development on some SIGDEP3 features and create a docker-based SIGDEP3 release directly from the source code.
My thinking is that for now, it might be easiest to add the two rows directly to the initial database by adding an initializing script like the following to the
/configs/sigdep3/db/
folder. This folder is mapped to thedocker-entrypoint-initdb.d
in the mysql container and gets loaded on initialization.When we setup the new SIGDEP3 project, we can update this approach if we decide on another way of rolling out the initial database, concepts, settings, etc.
Here's the script that should be updated with system url values for every identifier type that might be assigned to some patient. We don't want identifiers going out w/o the system field set, as this can cause issues with OpenCR:
These are the identifier types that we have defined in the sigdep3 db with their ID:
1: OpenMRS Identification Number,Unique number used in OpenMRS 2: Old Identification Number,Number given out prior to the OpenMRS system (No check digit) 3: Nomenclature de PEC VIH,Code etablissement(4)/Code site(2)/Année(2)/ Numero d'ordre(5) 4: Nomenclature de CD,Codification de dépistage en vigueur 5: Nomenclature de PTME,codification PTME en vigueur 6: UPI,Unique Patients Identification
@HerbertYiga @ccwhite333 @mozzy11 let me know what you think!