From 9be355b0da2226d6e7109b6a1f4c8e0dbb0ffc56 Mon Sep 17 00:00:00 2001 From: Fred Deniger Date: Fri, 3 May 2024 18:54:39 +0200 Subject: [PATCH] remove attribute for appointments. --- README.md | 47 ++- backend/README.md | 44 +-- backend/distro.properties | 10 +- backend/log4j2.xml | 3 + backend/module-create-users/README.md | 31 ++ backend/module-create-users/api/pom.xml | 9 +- .../createusers/CreateUsersActivator.java | 10 +- .../DemoPatientGeneratorWithLocation.java | 93 +++++ .../DemoProviderGeneratorWithLocation.java | 35 ++ .../DemoVisitGeneratorLocation.java | 372 ++++++++++++++++++ .../module/createusers/Generators.java | 27 ++ .../createusers/PatientCreatorRunnable.java | 93 +++++ .../createusers/ReferenceDemoDataCreator.java | 188 +++++++++ ...unity-outreach.xml => create-clerk-l1.xml} | 8 +- ...-mobile-clinic.xml => create-clerk-l2.xml} | 8 +- ...patient-clinic.xml => create-clerk-l3.xml} | 8 +- .../src/main/resources/create-clerk-many.xml | 6 +- ...mobile-clinic.xml => create-doctor-l1.xml} | 8 +- ...nity-outreach.xml => create-doctor-l2.xml} | 8 +- ...atient-clinic.xml => create-doctor-l3.xml} | 8 +- .../src/main/resources/create-doctor-many.xml | 6 +- ...-mobile-clinic.xml => create-nurse-l1.xml} | 8 +- ...unity-outreach.xml => create-nurse-l2.xml} | 8 +- ...patient-clinic.xml => create-nurse-l3.xml} | 8 +- .../src/main/resources/create-nurse-many.xml | 6 +- .../resources/liquibase-add-default-users.xml | 40 +- .../omod/src/main/resources/config.xml | 6 + backend/module-create-users/pom.xml | 54 ++- .../attributetypes/attribute_types.csv | 2 + .../autogenerationoptions-core_demo.csv | 2 + .../globalproperties/custom.xml | 36 +- .../idgen/identifier_sources.csv | 1 + .../locations-core_demo_with_code.csv | 116 ++++++ .../patientidentifiertypes-core_demo.csv | 5 + backend/pom.xml | 2 +- docker-compose.yml | 4 +- keycloak/README.md | 5 +- keycloak/users.csv | 20 +- 38 files changed, 1171 insertions(+), 174 deletions(-) create mode 100644 backend/module-create-users/README.md create mode 100644 backend/module-create-users/api/src/main/java/org/openmrs/module/createusers/DemoPatientGeneratorWithLocation.java create mode 100644 backend/module-create-users/api/src/main/java/org/openmrs/module/createusers/DemoProviderGeneratorWithLocation.java create mode 100644 backend/module-create-users/api/src/main/java/org/openmrs/module/createusers/DemoVisitGeneratorLocation.java create mode 100644 backend/module-create-users/api/src/main/java/org/openmrs/module/createusers/Generators.java create mode 100644 backend/module-create-users/api/src/main/java/org/openmrs/module/createusers/PatientCreatorRunnable.java create mode 100644 backend/module-create-users/api/src/main/java/org/openmrs/module/createusers/ReferenceDemoDataCreator.java rename backend/module-create-users/api/src/main/resources/{create-clerk-community-outreach.xml => create-clerk-l1.xml} (94%) rename backend/module-create-users/api/src/main/resources/{create-clerk-mobile-clinic.xml => create-clerk-l2.xml} (95%) rename backend/module-create-users/api/src/main/resources/{create-clerk-outpatient-clinic.xml => create-clerk-l3.xml} (94%) rename backend/module-create-users/api/src/main/resources/{create-doctor-mobile-clinic.xml => create-doctor-l1.xml} (95%) rename backend/module-create-users/api/src/main/resources/{create-doctor-community-outreach.xml => create-doctor-l2.xml} (94%) rename backend/module-create-users/api/src/main/resources/{create-doctor-outpatient-clinic.xml => create-doctor-l3.xml} (94%) rename backend/module-create-users/api/src/main/resources/{create-nurse-mobile-clinic.xml => create-nurse-l1.xml} (95%) rename backend/module-create-users/api/src/main/resources/{create-nurse-community-outreach.xml => create-nurse-l2.xml} (94%) rename backend/module-create-users/api/src/main/resources/{create-nurse-outpatient-clinic.xml => create-nurse-l3.xml} (94%) create mode 100644 backend/openmrs_custom_config/attributetypes/attribute_types.csv create mode 100644 backend/openmrs_custom_config/autogenerationoptions/autogenerationoptions-core_demo.csv create mode 100644 backend/openmrs_custom_config/idgen/identifier_sources.csv create mode 100644 backend/openmrs_custom_config/locations/locations-core_demo_with_code.csv create mode 100644 backend/openmrs_custom_config/patientidentifiertypes/patientidentifiertypes-core_demo.csv diff --git a/README.md b/README.md index d7fa915..b759387 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,38 @@ -# openmrs-distro-keycloak -reference openmrs distro datafilter, oauth2 module using Keycloak with default users configured: -- The users list is given by `keycloak/users.csv` -- The default password is setup in a env variables, see `env.default` +# Why +The goal of this distribution is to enable the effortless initiation of an OpenMRS Distro with Single Sign-On (SSO) and DataFilter activated through a single command line (utilizing Docker). -# How to start -1. Copy the file `.env.default` to `.env` -2. Edit .env and provide default username, password -3. Start Using published images: - `docker compose -f docker-compose.yml up -d --build` -4. to build images locally and start: `docker compose up -d --build` +# ICRC Customization + +This distribution is a customized version of https://github.com/openmrs/openmrs-distro-referenceapplication to: +- integrate Oauth2 Module: [openmrs-module-oauth2login](https://github.com/openmrs/openmrs-module-oauth2login) +- integrate DataFilter Module: [openmrs-module-datafilter](https://github.com/openmrs/openmrs-module-datafilter) +- Generate default users and populate the database with patient data. -# Login to ghrc +# Components +- [database](./database/README.md) is used to create a MariaDB Docker Image with an "initial" OpenMRS Dump. +- [frontend](./frontend/README.md) activate oauth2 login in the frontend +- [backend](./backend/README.md) create an OpenMRS distribution incorporating OAuth2, DataFilter modules, and a custom module for generating default users and patients. +- [keycloak](./keycloak/README.md) start and configure automatically Keycloak -```bash -export CR_PAT=YOUR_TOKEN -echo $CR_PAT | docker login ghcr.io -u --password-stdin -``` +# How to build and start + +1. Copy the file `.env.default` to `.env` +2. Edit .env and provide default username, password +3. Start dockers with: `docker compose up -d --build` +4. Go to http://localhost +5. You should be redirected to Keycloak. +6. Sign in using a user selected from the provided list [keycloak/users.csv](./keycloak/users.csv) and the password defined in `.env` -See https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry +To login you can use the username (before @). For instance to log as `doctor.many@localhost.local`, you can use `doctor.many` in sso login page. -# Useful command +# How to use images: +A default docker-compose file is available here: +https://github.com/icrc/openmrs-android-fhir/docker-compose.yml -- `docker compose down -v` to restart all from scratch -- `docker compose up -d` to start quickly +A `.env` is always required to define passwords and sso admin username. -# Other Resources -- [database](./database/README.md) is used to ceate a MariaDB Docker Image with an OpenMRS Dump. diff --git a/backend/README.md b/backend/README.md index fe2781f..782e9b2 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,39 +1,9 @@ -_Packages a distribution of configs, metadata and binaries to run OpenMRS_ +ICRC Customization of https://github.com/openmrs/openmrs-distro-referenceapplication to: +- integrate Oauth2 Module: [openmrs-module-oauth2login](https://github.com/openmrs/openmrs-module-oauth2login) +- integrate DataFilter Module: [openmrs-module-datafilter](https://github.com/openmrs/openmrs-module-datafilter) +- activate Location Based identifier ( see related configuration in `openmrs_custom_config` folder) +- 4 Locations are activated: `Location 1`,`Location 2`,`Location 3`,`Location 4`. See [openmrs_custom_config/locations/locations-core_demo_with_code.csv](./openmrs_custom_config/locations/locations-core_demo_with_code.csv) +- Create Default user via the intern module `module-create-users` (to be improved): see [module-create-users/README.md](./module-create-users/README.md) ------ -```bash -mvn clean package -``` - -Output: - -`target/openmrs-distro-package/openmrs-distro-package-$version.zip` - -Package contents: - -|File or Directory|Description| -|-----------------|-----------| -|`openmrs_config` |The OpenMRS configuration, particularly including any files to be processed by the [Initializer module](https://github.com/mekomsolutions/openmrs-module-initializer). An example configuration can be found [here](https://github.com/mekomsolutions/openmrs-config-haiti). -|`openmrs_core` |The main OpenMRS WAR file.| -|`openmrs_module` |The modules (OMODs) to be run in this OpenMRS instance.| -|`spa` |The compiled SPA for the 3.x frontend.| -|`spa_config` |Any configuration files used by the SPA.| -|`openmrs-distro.properties`|The distro.properties used to generate this package.| - ----- - -### Specifying dependencies -#### OpenMRS modules -`omod`s are specified as Maven `` in the [pom.xml](pom.xml) file. - -#### OpenMRS Configuration (Initializer) -OpenMRS config can be set in [openmrs-config/configuration/](openmrs-config/configuration/) folder - -#### Micro Frontends -ESMs are set in the [spa-config.json](spa-config.json) file. - -#### Micro Frontends configuration -MF Config can be set in [spa-config/configuration/](spa-config/configuration/) folder - ----- +O \ No newline at end of file diff --git a/backend/distro.properties b/backend/distro.properties index 9bc25ec..2e5a15f 100644 --- a/backend/distro.properties +++ b/backend/distro.properties @@ -11,13 +11,13 @@ omod.metadatamapping=${metadatamapping.version} omod.metadatasharing=${metadatasharing.version} omod.openconceptlab=${openconceptlab.version} omod.owa=${owa.version} -omod.referencedemodata=${referencedemodata.version} +#omod.referencedemodata=${referencedemodata.version} omod.attachments=${attachments.version} omod.queue=${queue.version} -#omod.appointments=${appointments.version} -#omod.appointments.groupId=org.bahmni.module -#omod.teleconsultation=${teleconsultation.version} -#omod.teleconsultation.groupId=org.bahmni.module +omod.appointments=${appointments.version} +omod.appointments.groupId=org.bahmni.module +omod.teleconsultation=${teleconsultation.version} +omod.teleconsultation.groupId=org.bahmni.module omod.cohort=${cohort.version} omod.reporting=${reporting.version} omod.reportingrest=${reportingrest.version} diff --git a/backend/log4j2.xml b/backend/log4j2.xml index 2b950b7..2567f06 100644 --- a/backend/log4j2.xml +++ b/backend/log4j2.xml @@ -35,6 +35,7 @@ + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - + - + \ No newline at end of file diff --git a/backend/module-create-users/omod/src/main/resources/config.xml b/backend/module-create-users/omod/src/main/resources/config.xml index edfbd99..fbe9675 100644 --- a/backend/module-create-users/omod/src/main/resources/config.xml +++ b/backend/module-create-users/omod/src/main/resources/config.xml @@ -12,7 +12,13 @@ org.openmrs.module.createusers.CreateUsersActivator + org.openmrs.module.idgen + org.openmrs.module.fhir2 + org.openmrs.module.patientflags + org.openmrs.module.webservices.rest org.openmrs.module.initializer org.openmrs.module.datafilter + + diff --git a/backend/module-create-users/pom.xml b/backend/module-create-users/pom.xml index 4f32d16..d0c9d53 100644 --- a/backend/module-create-users/pom.xml +++ b/backend/module-create-users/pom.xml @@ -15,6 +15,16 @@ create-users no description + + 4.4.0 + 2.0.0-20231101.130425-8 + 1.11.6 + 2.2.0-SNAPSHOT + 3.0.5 + 2.4.0 + + + api @@ -49,11 +59,50 @@ org.openmrs.api openmrs-api - 2.3.0 + 2.5.0 + + + org.openmrs.api + openmrs-api + provided + + + org.openmrs.module + referencedemodata-api + ${referencedemodata.version} + jar + compile + + + org.openmrs.module + idgen-api + ${idgen.version} + provided + + + org.bahmni.module + appointments-api + ${appointments.version} + provided + + + org.openmrs.module + datafilter-api + ${datafilter.version} + provided + + + org.openmrs.module + patientflags-api + ${patientflags.version} + provided + + + openmrs-repo @@ -78,7 +127,4 @@ - - 1.11.6 - diff --git a/backend/openmrs_custom_config/attributetypes/attribute_types.csv b/backend/openmrs_custom_config/attributetypes/attribute_types.csv new file mode 100644 index 0000000..06a9422 --- /dev/null +++ b/backend/openmrs_custom_config/attributetypes/attribute_types.csv @@ -0,0 +1,2 @@ +Uuid,Void/Retire,Entity name,Name,Description,Min occurs,Max occurs,Datatype classname,Datatype config,Preferred handler classname,Handler config,_order:1000 +1bb29984-3193-11e7-93ae-92367f002671,,Location,Code,Location Code used for prefixing HSU IDs,0,1,org.openmrs.customdatatype.datatype.FreeTextDatatype,,,, \ No newline at end of file diff --git a/backend/openmrs_custom_config/autogenerationoptions/autogenerationoptions-core_demo.csv b/backend/openmrs_custom_config/autogenerationoptions/autogenerationoptions-core_demo.csv new file mode 100644 index 0000000..7e9e4d1 --- /dev/null +++ b/backend/openmrs_custom_config/autogenerationoptions/autogenerationoptions-core_demo.csv @@ -0,0 +1,2 @@ +Uuid,Identifier Type,Location,Identifier Source,Manual Entry Enabled,Auto Generation Enabled,_order:2000 +fb930160-9029-459c-a534-a69e0e9b8647,05a29f94-c0ed-11e2-94be-8c13b969e334,,791eed12-c0f1-11e2-94be-8c13b969e334,TRUE,TRUE, \ No newline at end of file diff --git a/backend/openmrs_custom_config/globalproperties/custom.xml b/backend/openmrs_custom_config/globalproperties/custom.xml index df04c41..d23f1eb 100644 --- a/backend/openmrs_custom_config/globalproperties/custom.xml +++ b/backend/openmrs_custom_config/globalproperties/custom.xml @@ -1,17 +1,23 @@ - - - oauth2login.redirectUriAfterLogin - /spa/home - - - - icrc_PrivBasedAppointmentFilter.disabled - true - - - icrc_PrivBasedApptServiceDefFilter.disabled - true - - + + + + oauth2login.redirectUriAfterLogin + /spa/home + + + + datafilter.patientLocationLinkingInterceptor.enabled + true + + Enables Data Filter's PatientLocationLinkingInterceptor that associates newly created patients with the current + user's session location. + + + + + idgen.prefixLocationAttributeType + Code + + \ No newline at end of file diff --git a/backend/openmrs_custom_config/idgen/identifier_sources.csv b/backend/openmrs_custom_config/idgen/identifier_sources.csv new file mode 100644 index 0000000..997a832 --- /dev/null +++ b/backend/openmrs_custom_config/idgen/identifier_sources.csv @@ -0,0 +1 @@ +Uuid,Void/Retire,Identifier type,Name,Description,Prefix,Suffix,First identifier base,Min length,Max length,Base character set,_version:1,_order:6001 791eed12-c0f1-11e2-94be-8c13b969e334,,05a29f94-c0ed-11e2-94be-8c13b969e334,Location Prefixed Identifier Source,Location Prefixed Identifier Source,provider:idgen.locationBasedPrefixProvider,,100000,7,,0123456789ACDEFGHJKLMNPRTUVWXY,, 8549f706-7e85-4c1d-9424-217d50a2988b,TRUE,OpenMRS ID,Generator for OpenMRS ID,Generator for OpenMRS ID,,,100000,7,7,0123456789ACDEFGHJKLMNPRTUVWXY,, \ No newline at end of file diff --git a/backend/openmrs_custom_config/locations/locations-core_demo_with_code.csv b/backend/openmrs_custom_config/locations/locations-core_demo_with_code.csv new file mode 100644 index 0000000..398c82b --- /dev/null +++ b/backend/openmrs_custom_config/locations/locations-core_demo_with_code.csv @@ -0,0 +1,116 @@ +Uuid,Void/Retire,Name,Description,Parent,Attribute|Code,Tags,Tag|Facility Location,Tag|Queue Location,Attribute|9eca4f4e-707f-4bb8-8289-2f9b6e93803c,Attribute|Last Audit Date,Address 1,Address 2,Address 3,Address 4,Address 5,Address 6,City/Village,County/District,State/Province,Postal Code,Country,_order:1000 +44c3efb0-2583-4c80-a79e-1f756a03c0a1,,Location 1,Location 1,,L1-,Login Location,TRUE,TRUE,,,,,,,,,,,,,, +ba685651-ed3b-4e63-9b35-78893060758a,,Location 2,Location 2,,L2-,Login Location,,,,,,,,,,,,,,,, +8d9045ad-50f0-45b8-93c8-3ed4bce19dbf,,Location 3,Location 3,,L3-,Login Location,,,,,,,,,,,,,,,, +1ce1b7d4-c865-4178-82b0-5932e51503d6,,Location 4,Location 4,,L4-,Login Location,,,,,,,,,,,,,,,, +8d6c993e-c2cc-11de-8d13-0010c6dffd0f,true,Unknown Location,Unknown Location,,,,,,,,,,,,,,,,,, +dbdaabf6-a326-4804-aba7-062073e05cd1,true,Site 1,Site 1,,Login Location,,,,,,,,,,,,,,,, +4a06a96f-dd21-4695-8d76-b9c405cebafc,true,Site 2,Site 2,,Login Location,,,,,,,,,,,,,,,, +d493f3eb-ba7c-4e6c-988d-62491e496045,true,Site 3,Site 3,,Login Location,,,,,,,,,,,,,,,, +dd2ad4cd-e33a-40cc-955a-e91e313f9a3b,true,Site 4,Site 4,,Login Location,,,,,,,,,,,,,,,, +94346397-3848-4b92-9219-a981ed4265f8,true,Site 5,Site 5,,Login Location,,,,,,,,,,,,,,,, +0566e68d-26ff-4e1d-a199-a9b8ecc3a7d4,true,Site 6,Site 6,,Login Location,,,,,,,,,,,,,,,, +9ade8976-a178-4bce-a229-50cfcf61b87d,true,Site 7,Site 7,,Login Location,,,,,,,,,,,,,,,, +50cfb6ca-a360-41f2-b3a0-7c5a19f4aa98,true,Site 8,Site 8,,Login Location,,,,,,,,,,,,,,,, +d5be46a5-3afa-40fa-86ab-3c1ff31543e3,true,Site 9,Site 9,,Login Location,,,,,,,,,,,,,,,, +5f47d469-7c8d-4f34-887c-16db797bec3d,true,Site 10,Site 10,,Login Location,,,,,,,,,,,,,,,, +d81f9408-1582-4270-848f-6af319424733,true,Site 11,Site 11,,Login Location,,,,,,,,,,,,,,,, +ffd78808-5b88-4a56-9c94-54754725ad90,true,Site 12,Site 12,,Login Location,,,,,,,,,,,,,,,, +a61a5145-8da1-4410-be23-479314814cc7,true,Site 13,Site 13,,Login Location,,,,,,,,,,,,,,,, +5e6abb9d-7ab3-4203-8b02-1462bcca0c51,true,Site 14,Site 14,,Login Location,,,,,,,,,,,,,,,, +6536f254-a296-4d0f-84f7-9c0f0b12536e,true,Site 15,Site 15,,Login Location,,,,,,,,,,,,,,,, +0cb740b2-153f-49e2-b599-aabb90330bd2,true,Site 16,Site 16,,Login Location,,,,,,,,,,,,,,,, +2cead8f3-0e6c-468b-9f10-6a7ca75604dd,true,Site 17,Site 17,,Login Location,,,,,,,,,,,,,,,, +facac3e6-8c4a-4528-a497-8cf22ffd1a50,true,Site 18,Site 18,,Login Location,,,,,,,,,,,,,,,, +29fc4038-18d4-4b11-bc2b-63983932e6ac,true,Site 19,Site 19,,Login Location,,,,,,,,,,,,,,,, +c84338a5-69a7-411a-aa0f-f405cb44697b,true,Site 20,Site 20,,Login Location,,,,,,,,,,,,,,,, +09d08c88-5b12-4831-8268-62242822180d,true,Site 21,Site 21,,Login Location,,,,,,,,,,,,,,,, +ac529390-16d6-4454-83be-4fcbbc5988aa,true,Site 22,Site 22,,Login Location,,,,,,,,,,,,,,,, +b03c3107-fc5b-4b49-a31d-02bf327d6dd4,true,Site 23,Site 23,,Login Location,,,,,,,,,,,,,,,, +302090a6-11ac-455d-80c9-08c06ebd1087,true,Site 24,Site 24,,Login Location,,,,,,,,,,,,,,,, +bb5787d4-307e-40ec-89b3-f9f539a5d88f,true,Site 25,Site 25,,Login Location,,,,,,,,,,,,,,,, +13ecc2c0-7170-4d51-a93d-7189fd885c05,true,Site 26,Site 26,,Login Location,,,,,,,,,,,,,,,, +6dfacc57-17e6-481e-bde6-36742bf2bb66,true,Site 27,Site 27,,Login Location,,,,,,,,,,,,,,,, +2425adbe-b446-4d70-a684-5d757370a230,true,Site 28,Site 28,,Login Location,,,,,,,,,,,,,,,, +d114a8ac-aa7e-4350-a8bf-de2caf0ea440,true,Site 29,Site 29,,Login Location,,,,,,,,,,,,,,,, +ca22282f-0d68-4c1c-a985-90b69cf943a3,true,Site 30,Site 30,,Login Location,,,,,,,,,,,,,,,, +8d976ed0-49fe-4ed9-909d-f7b9d4081712,true,Site 31,Site 31,,Login Location,,,,,,,,,,,,,,,, +370c2cff-4681-40fa-bd29-b557399a6486,true,Site 32,Site 32,,Login Location,,,,,,,,,,,,,,,, +3ad56ffe-05bc-4ccf-aa87-f517f65e10fd,true,Site 33,Site 33,,Login Location,,,,,,,,,,,,,,,, +d38b9028-8035-4595-84ca-c8e7c9e2ecd4,true,Site 34,Site 34,,Login Location,,,,,,,,,,,,,,,, +07032097-5031-4c93-a29a-52a14d124a0a,true,Site 35,Site 35,,Login Location,,,,,,,,,,,,,,,, +aaf478f9-b3e2-4038-977b-56896a8060e2,true,Site 36,Site 36,,Login Location,,,,,,,,,,,,,,,, +9a93ba80-8a44-4f99-980c-b1e13dbca33a,true,Site 37,Site 37,,Login Location,,,,,,,,,,,,,,,, +5c0ff819-e936-4e75-9c1d-4d001a6fd95e,true,Site 38,Site 38,,Login Location,,,,,,,,,,,,,,,, +743a7d4a-3404-49db-a0ec-beddbdec0919,true,Site 39,Site 39,,Login Location,,,,,,,,,,,,,,,, +1b1317ae-3688-416d-a8f0-1378b92b9e04,true,Site 40,Site 40,,Login Location,,,,,,,,,,,,,,,, +c2861e47-ecc1-4e81-992d-7b3c29fce0b0,true,Site 41,Site 41,,Login Location,,,,,,,,,,,,,,,, +92dbdbdf-17da-4cf0-873c-ad15dfae71cb,true,Site 42,Site 42,,Login Location,,,,,,,,,,,,,,,, +fd7fae67-7a2e-456c-81db-3cbdb10fd510,true,Site 43,Site 43,,Login Location,,,,,,,,,,,,,,,, +2ccae22b-26ab-4c40-a813-55462e27a0c8,true,Site 44,Site 44,,Login Location,,,,,,,,,,,,,,,, +2ef7caf2-affa-4003-8fe7-128db6ce31ee,true,Site 45,Site 45,,Login Location,,,,,,,,,,,,,,,, +148dc112-9e26-42f9-b514-e28cf2e44b1f,true,Site 46,Site 46,,Login Location,,,,,,,,,,,,,,,, +6d49188b-2bdf-4c6e-bdff-7eeed3e15a64,true,Site 47,Site 47,,Login Location,,,,,,,,,,,,,,,, +0fa578fc-301a-418c-9cf9-b35707fcb478,true,Site 48,Site 48,,Login Location,,,,,,,,,,,,,,,, +eeba7391-361a-41ad-a884-02d5504abaac,true,Site 49,Site 49,,Login Location,,,,,,,,,,,,,,,, +2592d89f-8655-464e-bb76-5536d394c276,true,Site 50,Site 50,,Login Location,,,,,,,,,,,,,,,, +184ac7d9-225a-41f8-bac7-c87b1327e1b0,true,Ward 1,Ward 1,,Login Location,,,,,,,,,,,,,,,, +5a7f3c53-6bb4-448b-a966-5e65b397b9f3,true,Ward 2,Ward 2,,Login Location,,,,,,,,,,,,,,,, +2272b8cd-b690-4878-a50c-40d22235b3f3,true,Ward 3,Ward 3,,Login Location,,,,,,,,,,,,,,,, +820eae5e-e3e9-40a3-9e86-41d874572cf7,true,Ward 4,Ward 4,,Login Location,,,,,,,,,,,,,,,, +f105e38c-6ea4-418a-a0ae-9aa39b7f991c,true,Ward 5,Ward 5,,Login Location,,,,,,,,,,,,,,,, +3848c2f7-1ffa-4ee8-a3eb-cc4a3d939be1,true,Ward 6,Ward 6,,Login Location,,,,,,,,,,,,,,,, +43a62c8c-d0e3-46f6-8ff7-7c7c153d73d7,true,Ward 7,Ward 7,,Login Location,,,,,,,,,,,,,,,, +3b4dff4d-ec74-4742-ba09-50b9b89eb3af,true,Ward 8,Ward 8,,Login Location,,,,,,,,,,,,,,,, +a47e5316-4f78-4007-b92a-627de0b0fe2c,true,Ward 9,Ward 9,,Login Location,,,,,,,,,,,,,,,, +988f96fb-e0ae-4819-8e8d-ec37dc8e3292,true,Ward 10,Ward 10,,Login Location,,,,,,,,,,,,,,,, +4047a80b-65d9-4fec-bdc9-0f205c06ba2c,true,Ward 11,Ward 11,,Login Location,,,,,,,,,,,,,,,, +0108eb6a-6478-4f87-9425-d7164eb91acb,true,Ward 12,Ward 12,,Login Location,,,,,,,,,,,,,,,, +c117a236-8e65-4327-bb60-42c46db4f6de,true,Ward 13,Ward 13,,Login Location,,,,,,,,,,,,,,,, +af81eb43-3c83-419d-a394-9e1a24e4ce63,true,Ward 14,Ward 14,,Login Location,,,,,,,,,,,,,,,, +532a3eef-5e37-4e1a-b60d-6b901e49ba88,true,Ward 15,Ward 15,,Login Location,,,,,,,,,,,,,,,, +61c952e0-cc51-4ccb-90e3-fd1602f24e92,true,Ward 16,Ward 16,,Login Location,,,,,,,,,,,,,,,, +a5fb6b17-7634-453a-acf6-898545b5324a,true,Ward 17,Ward 17,,Login Location,,,,,,,,,,,,,,,, +99eb8204-c704-49f3-bbc7-1e1eeb37c365,true,Ward 18,Ward 18,,Login Location,,,,,,,,,,,,,,,, +c76bde7e-4240-4d2f-822b-61dc6bc09d36,true,Ward 19,Ward 19,,Login Location,,,,,,,,,,,,,,,, +3b1c8620-7f69-4657-a010-4f649889f60d,true,Ward 20,Ward 20,,Login Location,,,,,,,,,,,,,,,, +059e5941-e813-43c9-93b7-b5793e27e4c2,true,Ward 21,Ward 21,,Login Location,,,,,,,,,,,,,,,, +48b931de-31b2-41d7-9cd1-c5c63d4ce7cf,true,Ward 22,Ward 22,,Login Location,,,,,,,,,,,,,,,, +2e2fabfa-ca65-414e-b1c2-a04679fe64df,true,Ward 23,Ward 23,,Login Location,,,,,,,,,,,,,,,, +89ed3c56-2618-4d56-b995-09a09994eea8,true,Ward 24,Ward 24,,Login Location,,,,,,,,,,,,,,,, +c2e201b4-72db-4233-b3e6-fc8fdb6ac71e,true,Ward 25,Ward 25,,Login Location,,,,,,,,,,,,,,,, +53f4acf6-5c7a-4946-8df7-491a58eaaa91,true,Ward 26,Ward 26,,Login Location,,,,,,,,,,,,,,,, +9f25f4cf-5566-47b4-a254-44b1943840d7,true,Ward 27,Ward 27,,Login Location,,,,,,,,,,,,,,,, +9d33bf8e-a6ed-44c0-8677-9237481df256,true,Ward 28,Ward 28,,Login Location,,,,,,,,,,,,,,,, +e886e814-987d-4f83-933d-4f31c700e0a4,true,Ward 29,Ward 29,,Login Location,,,,,,,,,,,,,,,, +b1d037c5-b487-4c3d-b7c1-0b0a7b50bfd1,true,Ward 30,Ward 30,,Login Location,,,,,,,,,,,,,,,, +99c120e1-6e4b-4df1-ad2c-f81a50dfda7d,true,Ward 31,Ward 31,,Login Location,,,,,,,,,,,,,,,, +7c4c7c7f-523e-4cd4-b2d8-7bd8036788c7,true,Ward 32,Ward 32,,Login Location,,,,,,,,,,,,,,,, +f277520e-91af-4ea1-98a2-f011e6f85a37,true,Ward 33,Ward 33,,Login Location,,,,,,,,,,,,,,,, +84b2819f-cdb5-47f9-88f4-825131bb6afa,true,Ward 34,Ward 34,,Login Location,,,,,,,,,,,,,,,, +4738f9f4-ca34-4f9f-9e89-d7a2ba2b51a3,true,Ward 35,Ward 35,,Login Location,,,,,,,,,,,,,,,, +13b6681c-ae49-4f76-a5c6-24013d1bd7ec,true,Ward 36,Ward 36,,Login Location,,,,,,,,,,,,,,,, +3b6c2971-7a90-4076-baff-28f327e2ff9e,true,Ward 37,Ward 37,,Login Location,,,,,,,,,,,,,,,, +49d7321a-0ee6-419e-8c74-96554a1902e1,true,Ward 38,Ward 38,,Login Location,,,,,,,,,,,,,,,, +d5b5cf4e-e5fc-44c8-b19b-99bae46f7914,true,Ward 39,Ward 39,,Login Location,,,,,,,,,,,,,,,, +de7aa639-6cdb-4184-9171-235316d8aa6d,true,Ward 40,Ward 40,,Login Location,,,,,,,,,,,,,,,, +d212de33-7757-4899-b347-2cc693635b55,true,Ward 41,Ward 41,,Login Location,,,,,,,,,,,,,,,, +6534f987-9d1a-442a-a336-da6d62b25301,true,Ward 42,Ward 42,,Login Location,,,,,,,,,,,,,,,, +f8e92d51-9072-4cf0-9af2-7eb30b077c11,true,Ward 43,Ward 43,,Login Location,,,,,,,,,,,,,,,, +b120e051-c927-4ff6-9307-f90c8ded63ca,true,Ward 44,Ward 44,,Login Location,,,,,,,,,,,,,,,, +d1572bd9-ad63-4acc-9c2d-5e1dd0aeea99,true,Ward 45,Ward 45,,Login Location,,,,,,,,,,,,,,,, +0f9194e3-f7ff-438b-9319-387925cd6310,true,Ward 46,Ward 46,,Login Location,,,,,,,,,,,,,,,, +d14dd072-2f21-4340-b13d-845da00f8b28,true,Ward 47,Ward 47,,Login Location,,,,,,,,,,,,,,,, +3ebe38d4-ec5c-49c3-b498-0ca98c15f410,true,Ward 48,Ward 48,,Login Location,,,,,,,,,,,,,,,, +689d68a5-5857-48af-9f26-dc374fdf2997,true,Ward 49,Ward 49,,Login Location,,,,,,,,,,,,,,,, +736b08f9-94d6-4b50-ad58-6bc69b9cbfb8,true,Ward 50,Ward 50,,Login Location,,,,,,,,,,,,,,,, +4bc65b7a-bcd6-4829-860c-310aaf2c74db,true,Ward 51,Ward 51,,Login Location,,,,,,,,,,,,,,,, +14e1afa1-fa96-41b0-bfaa-a7aff2659ee6,true,Ward 52,Ward 52,,Login Location,,,,,,,,,,,,,,,, +8d243ead-936f-4bc8-b8a6-95baa2ed5217,true,Ward 53,Ward 53,,Login Location,,,,,,,,,,,,,,,, +9212bcda-32dc-4fb8-a517-8ade92908816,true,Ward 54,Ward 54,,Login Location,,,,,,,,,,,,,,,, +b8457ebe-48cd-4e6b-8139-23b269017d45,true,Ward 55,Ward 55,,Login Location,,,,,,,,,,,,,,,, +423ca603-a696-4a25-a00f-2e998df01a9f,true,Ward 56,Ward 56,,Login Location,,,,,,,,,,,,,,,, +9b35114a-a1cc-400c-ba1e-ee61538feeb7,true,Ward 57,Ward 57,,Login Location,,,,,,,,,,,,,,,, +aa661b2b-bf9f-4335-965c-9dcb5b6adf94,true,Ward 58,Ward 58,,Login Location,,,,,,,,,,,,,,,, +8874c0eb-be2b-4c9c-926c-bdd1e4394b99,true,Ward 59,Ward 59,,Login Location,,,,,,,,,,,,,,,, +2faca5a9-bfce-4cdc-8e09-690411230bcc,true,Ward 60,Ward 60,,Login Location,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/backend/openmrs_custom_config/patientidentifiertypes/patientidentifiertypes-core_demo.csv b/backend/openmrs_custom_config/patientidentifiertypes/patientidentifiertypes-core_demo.csv new file mode 100644 index 0000000..8944cfd --- /dev/null +++ b/backend/openmrs_custom_config/patientidentifiertypes/patientidentifiertypes-core_demo.csv @@ -0,0 +1,5 @@ +Uuid,Void/Retire,Name,Required,Description,Format,Format description,Validator,Location behavior,Uniqueness behavior,_order:1001 +05a29f94-c0ed-11e2-94be-8c13b969e334,,OpenMRS ID,true,OpenMRS patient identifier with location based identifiers,,,,, +22348099-3873-459e-a32e-d93b17eda533,,Legacy ID,Identifier type to record optional previous identifers ,FALSE,,,,NOT_USED, +b4143563-16cd-4439-b288-f83d61670fc8,,ID Card,ID Card,FALSE,,,,NOT_USED,UNIQUE +a71403f3-8584-4289-ab41-2b4e5570bd45,,SSN,Social Security Number,FALSE,[A-Z]{1}-[0-9]{7},"Identifier should be 1 letter, followed by a dash and 7 numerical characters. Eg, A-0010902",,NOT_USED,UNIQUE diff --git a/backend/pom.xml b/backend/pom.xml index f6614ec..bcbcc47 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -9,7 +9,7 @@ ssoapplication-distro - OpenMRS distro + SSO OpenMRS distro pom diff --git a/docker-compose.yml b/docker-compose.yml index af0f656..0644b02 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,11 +28,13 @@ services: # image: ghcr.io/icrc/openmrs-distro-sso/openmrs-backend-2.5.13:latest build: context: backend - + ports: + - "5005:5005" restart: "unless-stopped" depends_on: - database environment: + OMRS_DEV_DEBUG_PORT: 5005 OMRS_CONFIG_MODULE_WEB_ADMIN: "true" OMRS_CONFIG_AUTO_UPDATE_DATABASE: "true" OMRS_CONFIG_CREATE_TABLES: "true" diff --git a/keycloak/README.md b/keycloak/README.md index 08638f5..c5cf74c 100644 --- a/keycloak/README.md +++ b/keycloak/README.md @@ -1,5 +1,2 @@ # Why -Modify default Keycloak Docker image to automatically create users listed in `users.csv` using password given in -main `.env `file. - -See `../env.default` file \ No newline at end of file +Modify default Keycloak Docker image to automatically create users listed in [users.csv](users.csv) using password given in main [../.env](../.env). If this env file doesn't exist create it from [../env.default](../env.default) diff --git a/keycloak/users.csv b/keycloak/users.csv index 60a9a8f..11014a8 100644 --- a/keycloak/users.csv +++ b/keycloak/users.csv @@ -1,13 +1,15 @@ admin@localhost.local -clerk.outreach@localhost.local +clerk@localhost.local +doctor@localhost.local +clerk.l1@localhost.local +clerk.l2@localhost.local +clerk.l3@localhost.local clerk.many@localhost.local -clerk.mobile@localhost.local -clerk.outpatient@localhost.local -doctor.outreach@localhost.local +doctor.l1@localhost.local +doctor.l2@localhost.local +doctor.l3@localhost.local doctor.many@localhost.local -doctor.mobile@localhost.local -doctor.outpatient@localhost.local -nurse.outreach@localhost.local +nurse.l1@localhost.local +nurse.l2@localhost.local +nurse.l3@localhost.local nurse.many@localhost.local -nurse.mobile@localhost.local -nurse.outpatient@localhost.local