From 7380bf16f6662dbdf3e17c2bf9e4b8a9a179a30b Mon Sep 17 00:00:00 2001 From: Volker Schmidt Date: Sun, 2 Dec 2018 19:51:54 +0100 Subject: [PATCH] Added Maven Release Plugin. --- ...kedEntityInstanceTransformationAppTest.java | 4 ++-- .../impl/TrackedEntityMetadataServiceImpl.java | 2 +- .../V1.0.0.0_10_0__Initial_Sample_Data.sql | 18 ++++++++++++++++++ pom.xml | 17 +++++++++++++++++ 4 files changed, 38 insertions(+), 3 deletions(-) diff --git a/app/src/test/java/org/dhis2/fhir/adapter/fhir/transform/impl/trackedentity/AbstractTrackedEntityInstanceTransformationAppTest.java b/app/src/test/java/org/dhis2/fhir/adapter/fhir/transform/impl/trackedentity/AbstractTrackedEntityInstanceTransformationAppTest.java index e33fa993..f32e6b80 100644 --- a/app/src/test/java/org/dhis2/fhir/adapter/fhir/transform/impl/trackedentity/AbstractTrackedEntityInstanceTransformationAppTest.java +++ b/app/src/test/java/org/dhis2/fhir/adapter/fhir/transform/impl/trackedentity/AbstractTrackedEntityInstanceTransformationAppTest.java @@ -50,11 +50,11 @@ public abstract class AbstractTrackedEntityInstanceTransformationAppTest extends protected void expectTrackedEntityMetadataRequests() throws Exception { systemDhis2Server.expect( ExpectedCount.once(), method( HttpMethod.GET ) ).andExpect( header( "Authorization", testConfiguration.getDhis2SystemAuthorization() ) ) - .andExpect( requestTo( dhis2BaseUrl + "/api/" + dhis2ApiVersion + "/trackedEntityAttributes.json?paging=false&fields=id,name,code,valueType,optionSetValue,optionSet%5Bid,name,options%5Bcode,name%5D%5D" ) ) + .andExpect( requestTo( dhis2BaseUrl + "/api/" + dhis2ApiVersion + "/trackedEntityAttributes.json?paging=false&fields=id,name,code,valueType,generated,optionSetValue,optionSet%5Bid,name,options%5Bcode,name%5D%5D" ) ) .andRespond( withSuccess( IOUtils.resourceToString( "/org/dhis2/fhir/adapter/dhis/test/default-tracked-entity-attributes.json", StandardCharsets.UTF_8 ), MediaType.APPLICATION_JSON ) ); systemDhis2Server.expect( ExpectedCount.once(), method( HttpMethod.GET ) ).andExpect( header( "Authorization", testConfiguration.getDhis2SystemAuthorization() ) ) .andExpect( requestTo( dhis2BaseUrl + "/api/" + dhis2ApiVersion + "/trackedEntityTypes.json?paging=false&filter=name:eq:Person&fields=id,name," + - "trackedEntityTypeAttributes%5Bid,name,valueType,mandatory,trackedEntityAttribute%5Bid,name,code,valueType,optionSetValue,optionSet%5Bid,name,options%5Bcode,name%5D%5D%5D%5D" ) ) + "trackedEntityTypeAttributes%5Bid,name,valueType,mandatory,trackedEntityAttribute%5Bid,name,code,valueType,generated,optionSetValue,optionSet%5Bid,name,options%5Bcode,name%5D%5D%5D%5D" ) ) .andRespond( withSuccess( IOUtils.resourceToString( "/org/dhis2/fhir/adapter/dhis/test/default-tracked-entity-type.json", StandardCharsets.UTF_8 ), MediaType.APPLICATION_JSON ) ); } } diff --git a/dhis/src/main/java/org/dhis2/fhir/adapter/dhis/tracker/trackedentity/impl/TrackedEntityMetadataServiceImpl.java b/dhis/src/main/java/org/dhis2/fhir/adapter/dhis/tracker/trackedentity/impl/TrackedEntityMetadataServiceImpl.java index a7c4fa1d..a3992e97 100644 --- a/dhis/src/main/java/org/dhis2/fhir/adapter/dhis/tracker/trackedentity/impl/TrackedEntityMetadataServiceImpl.java +++ b/dhis/src/main/java/org/dhis2/fhir/adapter/dhis/tracker/trackedentity/impl/TrackedEntityMetadataServiceImpl.java @@ -51,7 +51,7 @@ @Service public class TrackedEntityMetadataServiceImpl implements TrackedEntityMetadataService { - protected static final String TRACKED_ENTITY_ATTRIBUTE_FIELDS = "id,name,code,valueType,optionSetValue,optionSet[id,name,options[code,name]]"; + protected static final String TRACKED_ENTITY_ATTRIBUTE_FIELDS = "id,name,code,valueType,generated,optionSetValue,optionSet[id,name,options[code,name]]"; protected static final String TRACKED_ENTITY_TYPE_FIELDS = "id,name,trackedEntityTypeAttributes[id,name,valueType,mandatory,trackedEntityAttribute[" + TRACKED_ENTITY_ATTRIBUTE_FIELDS + "]]"; diff --git a/fhir/src/main/resources/db/migration/sample/V1.0.0.0_10_0__Initial_Sample_Data.sql b/fhir/src/main/resources/db/migration/sample/V1.0.0.0_10_0__Initial_Sample_Data.sql index 3b4c5c86..2bcf5782 100644 --- a/fhir/src/main/resources/db/migration/sample/V1.0.0.0_10_0__Initial_Sample_Data.sql +++ b/fhir/src/main/resources/db/migration/sample/V1.0.0.0_10_0__Initial_Sample_Data.sql @@ -66,3 +66,21 @@ INSERT INTO fhir_remote_subscription_system (id, version, remote_subscription_id VALUES ('ea9804a3-9e82-4d0d-9cd2-e417b32b1c0c', 0, '73cd99c5-0ca8-42ad-a53b-1891fccce08f', 'ORGANIZATION', 'c4e9ac6a-cc8f-4c73-aab6-0fa6775c0ca3'); INSERT INTO fhir_remote_subscription_system (id, version, remote_subscription_id, fhir_resource_type, system_id) VALUES ('ef7d37ae-6a02-46de-bf15-3dc522a464ed', 0, '73cd99c5-0ca8-42ad-a53b-1891fccce08f', 'PATIENT', 'ff842c76-a529-4563-972d-216b887a3573'); + +-- User Sierra Leone demo database +INSERT INTO fhir_executable_script_argument (id, executable_script_id, script_argument_id, override_value) +VALUES ('290d67ca-8177-4a1e-ac51-2072a3563c22', '72451c8f-7492-4707-90b8-a3e0796de19e', '276b26f2-ba01-41e6-89c6-b1100580b1f3', NULL); +INSERT INTO fhir_executable_script_argument (id, executable_script_id, script_argument_id, override_value) +VALUES ('9232ac8e-0160-423c-b484-52ce94aa8563', '72451c8f-7492-4707-90b8-a3e0796de19e', '0a7c26cb-7bd3-4394-9d47-a610ac231f8a', 'NAME:Last name'); +INSERT INTO fhir_executable_script_argument (id, executable_script_id, script_argument_id, override_value) +VALUES ('8e2b17f6-c903-4279-8b2b-0925c15e176a', '72451c8f-7492-4707-90b8-a3e0796de19e', 'b41dd571-a129-4fa6-a807-35ea5663e8e3', 'CODE:MMD_PER_NAM'); +INSERT INTO fhir_executable_script_argument (id, executable_script_id, script_argument_id, override_value) +VALUES ('dc2ba48e-d3c7-4b10-98ba-2b958aff9bbb', '72451c8f-7492-4707-90b8-a3e0796de19e', '90b3c110-38e4-4291-934c-e2569e8af1ba', 'CODE:MMD_PER_DOB'); +INSERT INTO fhir_executable_script_argument (id, executable_script_id, script_argument_id, override_value) +VALUES ('e484c8cc-21eb-4905-b633-8b6674698fa6', '72451c8f-7492-4707-90b8-a3e0796de19e', '8e3efdc7-6ce4-4899-bb20-faed7d5e3279', 'NAME:Gender'); +INSERT INTO fhir_executable_script_argument (id, executable_script_id, script_argument_id, override_value) +VALUES ('a93e4952-2725-453e-8f2d-260d3131769a', '72451c8f-7492-4707-90b8-a3e0796de19e', 'ae13ceca-86d7-4f60-8d54-25587d53a5bd', 'CODE:MMD_PER_ADR1'); + +UPDATE fhir_tracked_entity +SET tracked_entity_identifier_ref = 'NAME:National identifier' +WHERE id = '4203754d-2177-4a44-86aa-2de31ee4c8ee'; diff --git a/pom.xml b/pom.xml index 279b87df..5f3d6cbb 100644 --- a/pom.xml +++ b/pom.xml @@ -69,6 +69,11 @@ false + + scm:git:https://github.com/dhis2/dhis2-fhir-adapter + scm:git:https://github.com/dhis2/dhis2-fhir-adapter + + org.springframework.boot @@ -142,6 +147,18 @@ + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + true + @{project.version} + + + +