Skip to content

Commit f81055d

Browse files
Initial commit
1 parent 6380b0d commit f81055d

File tree

23 files changed

+1703
-0
lines changed

23 files changed

+1703
-0
lines changed

.github/workflows/check-deps.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Check for dependency changes
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '*/60 * * * *'
7+
8+
jobs:
9+
check-deps:
10+
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-check-deps-build-publish.yml@main
11+
secrets:
12+
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
13+
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
release:
9+
types: [ published ]
10+
11+
jobs:
12+
validate:
13+
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main
14+
secrets:
15+
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
16+
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
17+
18+
spotless:
19+
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-spotless-check.yml@main
20+
21+
integration-tests:
22+
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-integration-test.yml@main
23+
with:
24+
maven-args: '-pl eip-odoo-openelis-it -am'
25+
maven-phase: 'verify'
26+
27+
publish:
28+
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'release' }}
29+
needs: [integration-tests, spotless, validate]
30+
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-publish.yml@main
31+
secrets:
32+
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
33+
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/.classpath
2+
/.settings
3+
/.project
4+
5+
/.idea
6+
*.iml
7+
*.DS_Store
8+
.java-version
9+
10+
## Maven
11+
log/
12+
target/
13+
pom.xml.tag
14+
pom.xml.releaseBackup
15+
dependency-reduced-pom.xml
16+
17+
## IntelliJ IDEA
18+
*.iws
19+
.idea
20+
.idea/
21+
22+
## Visual Studio Code
23+
.vscode
24+
25+
## Environment
26+
!/dev/.env
27+
/dev/dev.env
28+

.gitpod.Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Copyright © 2025, Ozone HIS <[email protected]>
3+
#
4+
# This Source Code Form is subject to the terms of the Mozilla Public
5+
# License, v. 2.0. If a copy of the MPL was not distributed with this
6+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
#
8+
9+
FROM gitpod/workspace-java-17:2024-05-15-13-36-34

.gitpod.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright © 2025, Ozone HIS <[email protected]>
3+
#
4+
# This Source Code Form is subject to the terms of the Mozilla Public
5+
# License, v. 2.0. If a copy of the MPL was not distributed with this
6+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
#
8+
9+
# The .gitpod.yml file is used to configure your Gitpod workspace.
10+
image:
11+
file: .gitpod.Dockerfile

.ocd3.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Copyright © 2025, Ozone HIS <[email protected]>
3+
#
4+
# This Source Code Form is subject to the terms of the Mozilla Public
5+
# License, v. 2.0. If a copy of the MPL was not distributed with this
6+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
#
8+
9+
version: 1
10+
build:
11+
# Unable to run tests because of no Docker agent available in OCD3 yet. https://mekomsolutions.atlassian.net/browse/INFRA-318
12+
bash_commands: "echo 'Build is handled by GitHub Actions. Skipping...' && exit 0"
13+
deploy:
14+
bash_commands: "echo 'Publishing is handled by GitHub Actions. Skipping...' && exit 0"

odoo-openelis/dev/.env

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# OpenMRS configuration
2+
OPENMRS_URL=localhost:8080/openmrs
3+
OPENMRS_USER=superman
4+
OPENMRS_PASSWORD=Admin123
5+
OPENMRS_RESULTS_ENCOUNTER_TYPE_UUID=
6+
OPENMRS_IDENTIFIER_TYPE_UUID=
7+
OPENMRS_CONCEPT_COMPLEX_UUID=
8+
9+
# Odoo configuration
10+
ODOO_URL=localhost:8069
11+
ODOO_USER=admin
12+
ODOO_PASSWORD=admin
13+
ODOO_DATABASE=odoo
14+
EMR_WEIGHT_CONCEPT=
15+
CREATE_CUSTOMER_IF_NOT_EXIST=false
16+
ODOO_CUSTOMER_EXTERNAL_ID=comment
17+
ODOO_CUSTOMER_DOB_FIELD=
18+
ODOO_CUSTOMER_WEIGHT_FIELD=
19+
ODOO_ENABLE_EXTRA_CUSTOMER_FIELDS_ROUTE=false
20+
ODOO_ENABLE_EXTRA_QUOTATION_FIELDS_ROUTE=false
21+
22+
# Bahmni specific
23+
BAHMNI_TEST_ORDER_TYPE_UUID=
24+
25+
# General EIP configuration
26+
EIP_WATCHED_TABLES=patient,person_name,person_address,patient_identifier,orders,test_order,drug_order
27+
DB_EVENT_DESTINATIONS_ODOO=direct:odoo-event-listener
28+
EIP_DB_NAME_ODOO=openmrs_eip_mgt_odoo
29+
EIP_DB_USER_ODOO=openmrs_eip_mgt_odoo
30+
EIP_DB_PASSWORD_ODOO=password
31+
32+
# OAuth2 Client
33+
OAUTH_ENABLED=true
34+
OAUTH_CLIENT_ID=eip
35+
OAUTH_CLIENT_SECRET=_demo_sample_key_to_be_replaced_
36+
OAUTH_CLIENT_SCOPE=email
37+
OAUTH_ACCESS_TOKEN_URL=http://localhost:8080/openmrs/oauth/token
38+
39+
# Debezium MySQL Connector (CDC) configuration
40+
MYSQL_ADMIN_USER=admin
41+
MYSQL_ADMIN_USER_PASSWORD=password
42+
43+
# OpenMRS Datasource configuration
44+
OPENMRS_DB_USER=openmrs
45+
OPENMRS_DB_PASSWORD=password
46+
OPENMRS_DB_NAME=openmrs
47+
OPENMRS_DB_HOST=localhost
48+
OPENMRS_DB_PORT=3306
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright © 2025, Ozone HIS <[email protected]>
3+
#
4+
# This Source Code Form is subject to the terms of the Mozilla Public
5+
# License, v. 2.0. If a copy of the MPL was not distributed with this
6+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
#
8+
9+
version: '3'
10+
services:
11+
eip-client:
12+
container_name: ozone-eip-client
13+
env_file:
14+
- .env
15+
image: mekomsolutions/eip-client
16+
ports:
17+
- "8085:8080"
18+
volumes:
19+
- ../target/eip-odoo-openelis-1.0.0-SNAPSHOT.jar:/eip-client/routes/eip-odoo-openelis-1.0.0-SNAPSHOT.jar

odoo-openelis/pom.xml

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright © 2025, Ozone HIS <[email protected]>
5+
6+
This Source Code Form is subject to the terms of the Mozilla Public
7+
License, v. 2.0. If a copy of the MPL was not distributed with this
8+
file, You can obtain one at http://mozilla.org/MPL/2.0/.
9+
10+
-->
11+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
12+
<modelVersion>4.0.0</modelVersion>
13+
<parent>
14+
<groupId>com.ozonehis</groupId>
15+
<artifactId>eip-odoo-openelis-parent</artifactId>
16+
<version>1.0.0-SNAPSHOT</version>
17+
</parent>
18+
19+
<artifactId>eip-odoo-openelis</artifactId>
20+
<packaging>jar</packaging>
21+
<name>EIP Odoo OpenELIS</name>
22+
<description>EIP Odoo OpenELIS</description>
23+
24+
<properties>
25+
<maven.compiler.source>17</maven.compiler.source>
26+
<maven.compiler.target>17</maven.compiler.target>
27+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
28+
<camel.version>4.1.0</camel.version>
29+
<camel.openmrs.fhir.version>4.2.0-SNAPSHOT</camel.openmrs.fhir.version>
30+
31+
<!-- Classifier for the dependency report artifact -->
32+
<dependencyReportClassifier>dependencies</dependencyReportClassifier>
33+
</properties>
34+
35+
<dependencies>
36+
<dependency>
37+
<groupId>org.openmrs.eip</groupId>
38+
<artifactId>camel-openmrs-fhir</artifactId>
39+
<version>${camel.openmrs.fhir.version}</version>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.apache.xmlrpc</groupId>
43+
<artifactId>xmlrpc-client</artifactId>
44+
<version>${xmlRpcClientVersion}</version>
45+
</dependency>
46+
<dependency>
47+
<groupId>com.jayway.jsonpath</groupId>
48+
<artifactId>json-path</artifactId>
49+
<version>2.9.0</version>
50+
<scope>test</scope>
51+
</dependency>
52+
</dependencies>
53+
54+
<build>
55+
<plugins>
56+
<plugin>
57+
<groupId>org.apache.maven.plugins</groupId>
58+
<artifactId>maven-shade-plugin</artifactId>
59+
<version>3.2.4</version>
60+
<executions>
61+
<execution>
62+
<goals>
63+
<goal>shade</goal>
64+
</goals>
65+
<phase>package</phase>
66+
<configuration>
67+
<artifactSet>
68+
<includes>
69+
<include>org.openmrs.eip:*</include>
70+
<include>org.apache.xmlrpc:xmlrpc-client</include>
71+
<include>org.liquibase:*</include>
72+
<include>com.ozonehis:*</include>
73+
<include>org.apache.camel:camel-fhir</include>
74+
<include>org.apache.camel:camel-fhir-api</include>
75+
<include>org.apache.commons:*</include>
76+
<include>commons-io:commons-io</include>
77+
<include>ca.uhn.hapi.fhir:*</include>
78+
<include>com.fasterxml.jackson.core:jackson-databind</include>
79+
<include>org.apache.httpcomponents:*</include>
80+
<include>com.google.guava:*</include>
81+
</includes>
82+
</artifactSet>
83+
<filters>
84+
<filter>
85+
<artifact>*:*</artifact>
86+
<excludes>
87+
<exclude>META-INF/*.SF</exclude>
88+
<exclude>META-INF/*.DSA</exclude>
89+
<exclude>META-INF/*.RSA</exclude>
90+
<exclude>META-INF/MANIFEST.MF</exclude>
91+
<exclude>META-INF/okio.kotlin_module</exclude>
92+
<exclude>META-INF.versions.9.module-info</exclude>
93+
</excludes>
94+
</filter>
95+
</filters>
96+
</configuration>
97+
</execution>
98+
</executions>
99+
</plugin>
100+
<plugin>
101+
<groupId>net.mekomsolutions.maven.plugin</groupId>
102+
<artifactId>dependency-tracker-maven-plugin</artifactId>
103+
<version>1.1.0-SNAPSHOT</version>
104+
<executions>
105+
<execution>
106+
<id>Compile dependency report</id>
107+
<goals>
108+
<goal>track</goal>
109+
</goals>
110+
<phase>compile</phase>
111+
</execution>
112+
</executions>
113+
</plugin>
114+
<!-- Attach the dependency report to the build -->
115+
<plugin>
116+
<groupId>org.codehaus.mojo</groupId>
117+
<artifactId>build-helper-maven-plugin</artifactId>
118+
<version>3.5.0</version>
119+
<executions>
120+
<execution>
121+
<id>Attach the dependency report</id>
122+
<goals>
123+
<goal>attach-artifact</goal>
124+
</goals>
125+
<phase>package</phase>
126+
<configuration>
127+
<artifacts>
128+
<artifact>
129+
<file>${project.build.directory}/${project.artifactId}-${project.version}-dependencies.txt</file>
130+
<type>txt</type>
131+
<classifier>${dependencyReportClassifier}</classifier>
132+
</artifact>
133+
</artifacts>
134+
</configuration>
135+
</execution>
136+
</executions>
137+
</plugin>
138+
</plugins>
139+
</build>
140+
141+
</project>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright © 2025, Ozone HIS <[email protected]>
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
*/
8+
package com.ozonehis.eip.odoo.openmrs;
9+
10+
public class Constants {
11+
12+
public static final String PARTNER_MODEL = "res.partner";
13+
14+
public static final String SALE_ORDER_MODEL = "sale.order";
15+
16+
public static final String SALE_ORDER_LINE_MODEL = "sale.order.line";
17+
18+
public static final String COUNTRY_STATE_MODEL = "res.country.state";
19+
20+
public static final String COUNTRY_MODEL = "res.country";
21+
22+
public static final String UOM_MODEL = "uom.uom";
23+
24+
public static final String PRODUCT_MODEL = "product.product";
25+
26+
public static final String IR_MODEL = "ir.model.data";
27+
28+
public static final String CREATE_METHOD = "create";
29+
30+
public static final String SEARCH_READ_METHOD = "search_read";
31+
32+
public static final String SEARCH_METHOD = "search";
33+
34+
public static final String WRITE_METHOD = "write";
35+
36+
public static final String UNLINK_METHOD = "unlink";
37+
38+
public static final String HEADER_ODOO_ID_ATTRIBUTE_VALUE = "odoo.attribute.value";
39+
40+
public static final String EXCHANGE_PROPERTY_SKIP_ENCOUNTER = "skip.encounter";
41+
42+
public static final String FHIR_OPENMRS_SYSTEM_PREFIX = "http://fhir.openmrs.org/";
43+
44+
public static final String FHIR_OPENMRS_EXT_PREFIX = FHIR_OPENMRS_SYSTEM_PREFIX + "ext/";
45+
46+
public static final String FHIR_OPENMRS_FHIR_EXT_MEDICINE = FHIR_OPENMRS_EXT_PREFIX + "medicine";
47+
48+
public static final String FHIR_OPENMRS_EXT_DRUG_NAME = FHIR_OPENMRS_FHIR_EXT_MEDICINE + "#drugName";
49+
}

0 commit comments

Comments
 (0)