Skip to content

Commit

Permalink
OZ-545: Rewrite xml routes using Java DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
VaishSiddharth authored and corneliouzbett committed Jul 16, 2024
1 parent 306b724 commit 351ebf3
Show file tree
Hide file tree
Showing 128 changed files with 2,769 additions and 9,148 deletions.
8 changes: 8 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
#
# Copyright © 2021, Ozone HIS <[email protected]>
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

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

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

version: 1
build:
# Unable to run tests because of no Docker agent available in OCD3 yet. https://mekomsolutions.atlassian.net/browse/INFRA-318
Expand Down
8 changes: 8 additions & 0 deletions dev/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#
# Copyright © 2021, Ozone HIS <[email protected]>
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

version: '3'
services:
eip-client:
Expand Down
135 changes: 135 additions & 0 deletions odoo-openmrs/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2021, Ozone HIS <[email protected]>
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ozonehis</groupId>
<artifactId>eip-odoo-openmrs-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>eip-odoo-openmrs</artifactId>
<packaging>jar</packaging>
<name>EIP Odoo OpenMRS</name>
<description>EIP Odoo OpenMRS</description>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<camel.version>4.0.1</camel.version>
<camel.openmrs.fhir.version>4.1.0-SNAPSHOT</camel.openmrs.fhir.version>

<!-- Classifier for the dependency report artifact -->
<dependencyReportClassifier>dependencies</dependencyReportClassifier>
</properties>

<dependencies>
<dependency>
<groupId>org.openmrs.eip</groupId>
<artifactId>camel-openmrs-fhir</artifactId>
<version>${camel.openmrs.fhir.version}</version>
</dependency>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-client</artifactId>
<version>${xmlRpcClientVersion}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<phase>package</phase>
<configuration>
<artifactSet>
<includes>
<include>org.openmrs.eip:*</include>
<include>org.apache.xmlrpc:xmlrpc-client</include>
<include>org.liquibase:*</include>
<include>com.ozonehis:*</include>
<include>org.apache.camel:camel-fhir</include>
<include>org.apache.camel:camel-fhir-api</include>
<include>org.apache.commons:*</include>
<include>commons-io:commons-io</include>
<include>ca.uhn.hapi.fhir:*</include>
<include>com.fasterxml.jackson.core:jackson-databind</include>
<include>org.apache.httpcomponents:*</include>
<include>com.google.guava:*</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/okio.kotlin_module</exclude>
<exclude>META-INF.versions.9.module-info</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.mekomsolutions.maven.plugin</groupId>
<artifactId>dependency-tracker-maven-plugin</artifactId>
<version>1.0.0-alpha</version>
<executions>
<execution>
<id>Compile dependency report</id>
<goals>
<goal>track</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
<!-- Attach the dependency report to the build -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>Attach the dependency report</id>
<goals>
<goal>attach-artifact</goal>
</goals>
<phase>package</phase>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-dependencies.txt</file>
<type>txt</type>
<classifier>${dependencyReportClassifier}</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* Copyright © 2021, Ozone HIS <[email protected]>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package com.ozonehis.eip.odoo.openmrs;

import static java.util.Arrays.asList;

import java.util.List;

public class Constants {
public static final String PARTNER_MODEL = "res.partner";

public static final String SALE_ORDER_MODEL = "sale.order";

public static final String SALE_ORDER_LINE_MODEL = "sale.order.line";

public static final String COUNTRY_STATE_MODEL = "res.country.state";

public static final String COUNTRY_MODEL = "res.country";

public static final String UOM_MODEL = "uom.uom";

public static final String PRODUCT_MODEL = "product.product";

public static final String IR_MODEL = "ir.model.data";

public static final String CREATE_METHOD = "create";

public static final String SEARCH_READ_METHOD = "search_read";

public static final String SEARCH_METHOD = "search";

public static final String WRITE_METHOD = "write";

public static final String UNLINK_METHOD = "unlink";

public static final String HEADER_ODOO_ID_ATTRIBUTE_VALUE = "odoo.attribute.value";

public static final String EXCHANGE_PROPERTY_SKIP_ENCOUNTER = "skip.encounter";

public static final String FHIR_RESOURCE_TYPE = "fhir.resource.type";

public static final String HEADER_ENABLE_PATIENT_SYNC = "enable.patient.sync";

public static final List<String> orderDefaultAttributes =
asList("id", "client_order_ref", "partner_id", "state", "order_line");

public static final List<String> partnerDefaultAttributes =
asList("id", "name", "ref", "street", "street2", "city", "zip", "active", "comment");
}
Loading

0 comments on commit 351ebf3

Please sign in to comment.