Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b7cf4208 authored by Achraf Achkari's avatar Achraf Achkari
Browse files

Merge branch 'develop' into 'master'

Fix SEQUOIA Confs

See merge request !17
parents 4638f8e4 5612c4ec
No related branches found
No related tags found
2 merge requests!18Update version,!17Fix SEQUOIA Confs
...@@ -11,15 +11,15 @@ date: 19/10/2021 ...@@ -11,15 +11,15 @@ date: 19/10/2021
1. ##### [Introduction](#introduction) 1. ##### [Introduction](#introduction)
2. ##### [Clone Project](#cloneProject) 2. ##### [Clone Project](#cloneProject)
3. ##### [Run Tests (Optional)](#runTests) 3. ##### [Run Tests (Optional)](#runTests)
4. ##### [Generate Artifact](#generateArtifact) 4. ##### [Prepare BBR](#prepareBBR)
5. ##### [Prepare BBR](#prepareBBR) 5. ##### [Generate Artifact](#generateArtifact)
6. ##### [Generate Validator](#generateValidator) 6. ##### [Generate Validator](#generateValidator)
7. ##### [Generation Validator form UML (Alternative)](#generateValidatorFromUML) 7. ##### [Generation Validator form UML (Alternative)](#generateValidatorFromUML)
8. ##### [Validate CDA](#validateCDA) 8. ##### [Validate CDA](#validateCDA)
9. ##### [Utility Scripts](#utilityScripts) 9. ##### [Utility Scripts](#utilityScripts)
10. ##### [Extras](#extras) 10. ##### [Extras](#extras)
<div id='introduction'/> <div id='introduction'></div>
## 1. Introduction ## 1. Introduction
In this guide, we will show how to retrieve the new version of **Gazelle Objects Cheker**, In this guide, we will show how to retrieve the new version of **Gazelle Objects Cheker**,
...@@ -31,7 +31,7 @@ build it and generate a CDA Validator in a generic case, and client specific cas ...@@ -31,7 +31,7 @@ build it and generate a CDA Validator in a generic case, and client specific cas
- Thanks to maven wrapper, this version is packaged now with GOC, you can find it in `gazelle-objects-checker/hl7templates/hl7templates-packager-jar/src/main/resources/maven-wrapper` - Thanks to maven wrapper, this version is packaged now with GOC, you can find it in `gazelle-objects-checker/hl7templates/hl7templates-packager-jar/src/main/resources/maven-wrapper`
- Git - Git
<div id='cloneProject'/> <div id='cloneProject'></div>
## 2. Clone Project ## 2. Clone Project
the project is not maintained by the _forge_ anymore.<br> the project is not maintained by the _forge_ anymore.<br>
...@@ -92,7 +92,7 @@ You can skip tests if you want, but it's not recommend. ...@@ -92,7 +92,7 @@ You can skip tests if you want, but it's not recommend.
<div id='runTests'/> <div id='runTests'></div>
## 3. Run Tests (Optional) ## 3. Run Tests (Optional)
...@@ -123,7 +123,7 @@ If Something went wrong, make sure you have mentioned in maven logs: ...@@ -123,7 +123,7 @@ If Something went wrong, make sure you have mentioned in maven logs:
If not, try to run the creation resources script `CreateResourcesForTest.java` in: If not, try to run the creation resources script `CreateResourcesForTest.java` in:
- _gazelle-objects-checker/gocmodel-jar/src/main/java/net.ihe.gazelle.goc.script_ - _gazelle-objects-checker/gocmodel-jar/src/main/java/net.ihe.gazelle.goc.script_
<div id='prepareBBR'/> <div id='prepareBBR'></div>
## 4. Prepare BBR ## 4. Prepare BBR
BBR is an abbreviation of Building Block Repository, a large XML file containing all the functional specifications, BBR is an abbreviation of Building Block Repository, a large XML file containing all the functional specifications,
...@@ -149,7 +149,7 @@ then change **ccda-** by **ccda(version)-** for example for version 2.1: ...@@ -149,7 +149,7 @@ then change **ccda-** by **ccda(version)-** for example for version 2.1:
NOTICE: A script could be released for this, due to performance issues NOTICE: A script could be released for this, due to performance issues
<div id='generateArtifacts'/> <div id='generateArtifact'></div>
## 5. Generate Artifact ## 5. Generate Artifact
...@@ -183,7 +183,7 @@ The Artifact is generated at _**gazelle-objects-checker/hl7templates-packager-ja ...@@ -183,7 +183,7 @@ The Artifact is generated at _**gazelle-objects-checker/hl7templates-packager-ja
> here: [GOC Artifact Nexus](https://gazelle.ihe.net/nexus/#nexus-search;quick~hl7templates-packager) > here: [GOC Artifact Nexus](https://gazelle.ihe.net/nexus/#nexus-search;quick~hl7templates-packager)
> Choose the latest version, and download the: **hl7templates-packager-jar-X.X.X-jar-with-dependencies.jar** artifact > Choose the latest version, and download the: **hl7templates-packager-jar-X.X.X-jar-with-dependencies.jar** artifact
<div id='generateValidator'/> <div id='generateValidator'></div>
## 6. Generate Validator ## 6. Generate Validator
This section remains to **run** Gazelle Objects Checker and generate the CDA MBVal validator. This section remains to **run** Gazelle Objects Checker and generate the CDA MBVal validator.
...@@ -304,9 +304,9 @@ Example with SEQUOIA: ...@@ -304,9 +304,9 @@ Example with SEQUOIA:
- **cmdOutput.log:** contains the Standard Output of executed commands during generation (maven command to init project with archetype, generate code from OLC, packaging...) - **cmdOutput.log:** contains the Standard Output of executed commands during generation (maven command to init project with archetype, generate code from OLC, packaging...)
- **cdeModelsErrors.txt:** contains all detected inconsistencies between the provided BBR and pre-defined models used by GOC - **cdeModelsErrors.txt:** contains all detected inconsistencies between the provided BBR and pre-defined models used by GOC
![Logs Conception](media/Improved_Logging_Conception_v2.jpg "LogsConception") ![Logs Conception](Improved_Logging_Conception_v2.jpg "LogsConception")
<div id='generateValidatorFromUML' /> <div id='generateValidatorFromUML'></div>
## 7. Generate Validator from UML (Alternative) ## 7. Generate Validator from UML (Alternative)
...@@ -314,12 +314,12 @@ This section is just an alternative way to regenerate the validator when the fun ...@@ -314,12 +314,12 @@ This section is just an alternative way to regenerate the validator when the fun
without re-running GOC, but just from the generated ```model.uml``` file. without re-running GOC, but just from the generated ```model.uml``` file.
```bash ```bash
> cd /home/mylap/Documents/GOC-OUTPUT/[validator-name]-validator-jar/model/[validator-name].uml > cd /home/mylap/Documents/GOC-OUTPUT/validator/[validator-name]-validator-jar/model/[validator-name].uml
``` ```
for example for epsos5 for example for epsos5
```bash ```bash
> cd /home/mylap/Documents/GOC-OUTPUT/epsos5-validator-jar/model/epsos5.uml > cd /home/mylap/Documents/GOC-OUTPUT/validator/epsos5-validator-jar/model/epsos5.uml
``` ```
Then you can edit it with a Text Editor, or a dedicated modeling tool (ex: TopCased). Then you can edit it with a Text Editor, or a dedicated modeling tool (ex: TopCased).
...@@ -328,7 +328,7 @@ Then you can edit it with a Text Editor, or a dedicated modeling tool (ex: TopCa ...@@ -328,7 +328,7 @@ Then you can edit it with a Text Editor, or a dedicated modeling tool (ex: TopCa
Go to GOC-OUTPUT/epsos5-validator-jar and do the following: Go to GOC-OUTPUT/epsos5-validator-jar and do the following:
```bash ```bash
> cd /home/mylap/Documents/GOC-OUTPUT/epsos5-validator-jar > cd /home/mylap/Documents/GOC-OUTPUT/validator/epsos5-validator-jar
> mvn exec:exec@generateValidator -DmvnPath="/opt/apache-maven-3.5.4/bin/mvn" -DcdaProps="cdaepsos" -DprojectName="epsos5" > mvn exec:exec@generateValidator -DmvnPath="/opt/apache-maven-3.5.4/bin/mvn" -DcdaProps="cdaepsos" -DprojectName="epsos5"
> mvn clean package > mvn clean package
``` ```
...@@ -352,14 +352,13 @@ Now you can refer to [Section 8](#validateCDA) to Validate a CDA document with y ...@@ -352,14 +352,13 @@ Now you can refer to [Section 8](#validateCDA) to Validate a CDA document with y
<div id='validateCDA'/> <div id='validateCDA'></div>
## 8. Validate CDA ## 8. Validate CDA
Now we are going to use the generated validator.<br> Now we are going to use the generated validator.<br>
We will suppose we generated a validator with a BBR containing the following version: epsos5-.<br> We will suppose we generated a validator with a BBR containing the following version: epsos5-.<br>
_We didn't use the SEQUOIA's BBR because the validator needs a hack (access to SVS) before it could be used_
Open the following directory: Open the following directory:
```bash ```bash
...@@ -370,6 +369,23 @@ Open the following directory: ...@@ -370,6 +369,23 @@ Open the following directory:
> ./validator.sh -path <Path_to_CDA.xml> -out <Path_To_output_result.xml> > ./validator.sh -path <Path_to_CDA.xml> -out <Path_To_output_result.xml>
``` ```
For SEQUOIA with version ccda21, you need to adapt it to SVS first, and for that we have a generation script that handle all of that automatically:
```bash
> cd gazelle-objects-checker/hl7templates/hl7templates-packager-jar/target
> ./SEQUOIAGeneration.sh
# or just for adapting SVS you can use the SEQUOIASVSAdaptation.sh
```
Then:
```bash
> cd <Path_To_Output>/ccda21-validator-jar/target/appassembler/bin
> chmod +x validator.sh #if on linux
> ./validator.sh -path <Path_to_CDA.xml> -out <Path_To_output_result.xml>
```
Here is a summary of possible parameters for the validator: Here is a summary of possible parameters for the validator:
<table> <table>
<thead> <thead>
...@@ -437,7 +453,7 @@ Just import it to SoapUI and run the test cases. ...@@ -437,7 +453,7 @@ Just import it to SoapUI and run the test cases.
<div id='utilityScripts'/> <div id='utilityScripts'></div>
## 9. Utility Scripts ## 9. Utility Scripts
...@@ -470,7 +486,7 @@ For SEQUOIA: ...@@ -470,7 +486,7 @@ For SEQUOIA:
``` ```
<div id='extras'/> <div id='extras'></div>
## 10. Extras ## 10. Extras
...@@ -482,6 +498,5 @@ You can find some previous made documentation here _(belong the old GOC, and cou ...@@ -482,6 +498,5 @@ You can find some previous made documentation here _(belong the old GOC, and cou
#### Next released documentation #### Next released documentation
- Functional description of GOC - Functional description of GOC
- Prepare validator for SEQUOIA
- Use interactive scripts for generation
...@@ -109,7 +109,7 @@ public final class DTUtils { ...@@ -109,7 +109,7 @@ public final class DTUtils {
else { else {
return false; return false;
} }
return !realDTConstrained.equals(typeRD) && UMLLoader.verifyTheParentOfType1IsType2(realDTConstrained, typeRD); return !realDTConstrained.equals(typeRD) && (UMLLoader.verifyTheParentOfType1IsType2(typeRD, realDTConstrained) || UMLLoader.verifyTheParentOfType1IsType2(realDTConstrained, typeRD));
} }
public static String cleanDTforIPS(String datatype){ public static String cleanDTforIPS(String datatype){
......
...@@ -206,25 +206,28 @@ if [ ! -f ./SEQUOIASVSAdaptation.sh ]; then ...@@ -206,25 +206,28 @@ if [ ! -f ./SEQUOIASVSAdaptation.sh ]; then
exit 1; exit 1;
fi; fi;
pathToResources='' # adapt only if version is higher than 1.1
if [ "$versionLabel" != "1.1" ]; then
pathToResources=''
if [ ! -d ./classes/sequoia-db-hack ]; then if [ ! -d ./classes/sequoia-db-hack ]; then
echo -e "${RED}Resources for adaptations not found, please provide a path manually" echo -e "${RED}Resources for adaptations not found, please provide a path manually"
read -r $pathToResources read -r $pathToResources
else else
pathToResources=$(realpath ./classes/sequoia-db-hack) pathToResources=$(realpath ./classes/sequoia-db-hack)
fi fi
if [ ! -x ./SEQUOIASVSAdaptation.sh ]; then if [ ! -x ./SEQUOIASVSAdaptation.sh ]; then
chmod +x SEQUOIASVSAdaptation.sh chmod +x SEQUOIASVSAdaptation.sh
fi; fi;
env JAVA_HOME=$JAVA_HOME M2_BIN=$mavenPath ./SEQUOIASVSAdaptation.sh "$workspaceDir/$folderName" $pathToResources env JAVA_HOME=$JAVA_HOME M2_BIN=$mavenPath ./SEQUOIASVSAdaptation.sh "$workspaceDir/$folderName" $pathToResources
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "${RED}Adaptations failed" echo "${RED}Adaptations failed"
exit 1 exit 1
fi fi
fi;
#Zip validator #Zip validator
#move to bin path #move to bin path
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema targetNamespace="urn:hl7-org:v3" xmlns:mif="urn:hl7-org:v3/mif" xmlns="urn:hl7-org:v3" <xs:schema targetNamespace="urn:hl7-org:v3" xmlns:mif="urn:hl7-org:v3/mif" xmlns="urn:hl7-org:v3"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
xmlns:sdtc="urn:hl7-org:sdtc"> xmlns:sdtc="urn:hl7-org:sdtc">
<!-- <!--
***************************************************************************************************************** *****************************************************************************************************************
* XML schema for message type POCD_MT000040. * XML schema for message type POCD_MT000040.
...@@ -35,16 +35,16 @@ ...@@ -35,16 +35,16 @@
--> -->
<xs:annotation> <xs:annotation>
<xs:documentation>Manually edited to add SDTC Schema Extension (authenticator/signatureText, legalAuthenticator/signatureText), 14 July 2013</xs:documentation> <xs:documentation>Manually edited to add SDTC Schema Extension (authenticator/signatureText, legalAuthenticator/signatureText), 14 July 2013</xs:documentation>
<xs:documentation>Manually edited to add SDTC Schema Extensions, July 2012</xs:documentation> <xs:documentation>Manually edited to add SDTC Schema Extensions, July 2012</xs:documentation>
<xs:documentation>Generated using schema builder version 2.0. Stylesheets: <xs:documentation>Generated using schema builder version 2.0. Stylesheets:
RoseTreeToMIFStaticModel.xsl version: 1.1 RoseTreeToMIFStaticModel.xsl version: 1.1
StaticMifToXsd.xsl version 2.0</xs:documentation> StaticMifToXsd.xsl version 2.0</xs:documentation>
</xs:annotation> </xs:annotation>
<xs:include schemaLocation="processable/coreschemas/datatypes.xsd"/> <xs:include schemaLocation="processable/coreschemas/datatypes.xsd"/>
<xs:include schemaLocation="processable/coreschemas/voc.xsd"/> <xs:include schemaLocation="processable/coreschemas/voc.xsd"/>
<xs:include schemaLocation="processable/coreschemas/NarrativeBlock.xsd"/> <xs:include schemaLocation="processable/coreschemas/NarrativeBlock.xsd"/>
<xs:import namespace="urn:hl7-org:sdtc" schemaLocation="SDTC.xsd" /> <xs:import namespace="urn:hl7-org:sdtc" schemaLocation="SDTC.xsd" />
<xs:complexType name="POCD_MT000040.InfrastructureRoot.typeId"> <xs:complexType name="POCD_MT000040.InfrastructureRoot.typeId">
<xs:complexContent> <xs:complexContent>
<xs:restriction base="II"> <xs:restriction base="II">
<xs:attribute name="root" type="uid" use="required" fixed="2.16.840.1.113883.1.3"/> <xs:attribute name="root" type="uid" use="required" fixed="2.16.840.1.113883.1.3"/>
...@@ -916,6 +916,9 @@ StaticMifToXsd.xsl version 2.0</xs:documentation> ...@@ -916,6 +916,9 @@ StaticMifToXsd.xsl version 2.0</xs:documentation>
<xs:element name="realmCode" type="CS" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="realmCode" type="CS" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="typeId" type="POCD_MT000040.InfrastructureRoot.typeId" minOccurs="0"/> <xs:element name="typeId" type="POCD_MT000040.InfrastructureRoot.typeId" minOccurs="0"/>
<xs:element name="templateId" type="II" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="templateId" type="II" minOccurs="0" maxOccurs="unbounded"/>
<!-- Begin Extension: (SDTC) -->
<xs:element ref="sdtc:functionCode" minOccurs="0" />
<!-- End Extension: (SDTC) -->
<xs:element name="time" type="IVL_TS" minOccurs="0"/> <xs:element name="time" type="IVL_TS" minOccurs="0"/>
<xs:element name="awarenessCode" type="CE" minOccurs="0"/> <xs:element name="awarenessCode" type="CE" minOccurs="0"/>
<xs:element name="participantRole" type="POCD_MT000040.ParticipantRole"/> <xs:element name="participantRole" type="POCD_MT000040.ParticipantRole"/>
...@@ -957,9 +960,9 @@ StaticMifToXsd.xsl version 2.0</xs:documentation> ...@@ -957,9 +960,9 @@ StaticMifToXsd.xsl version 2.0</xs:documentation>
<xs:element name="raceCode" type="CE" minOccurs="0"/> <xs:element name="raceCode" type="CE" minOccurs="0"/>
<!-- Begin Extension: (SDTC) --> <!-- Begin Extension: (SDTC) -->
<xs:element ref="sdtc:raceCode" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="sdtc:raceCode" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="sdtc:ethnicGroupCode" minOccurs="0" maxOccurs="unbounded"/>
<!-- End Extension: (SDTC) --> <!-- End Extension: (SDTC) -->
<xs:element name="ethnicGroupCode" type="CE" minOccurs="0"/> <xs:element name="ethnicGroupCode" type="CE" minOccurs="0"/>
<xs:element ref="sdtc:ethnicGroupCode" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="guardian" type="POCD_MT000040.Guardian" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="guardian" type="POCD_MT000040.Guardian" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="birthplace" type="POCD_MT000040.Birthplace" minOccurs="0"/> <xs:element name="birthplace" type="POCD_MT000040.Birthplace" minOccurs="0"/>
<xs:element name="languageCommunication" type="POCD_MT000040.LanguageCommunication" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="languageCommunication" type="POCD_MT000040.LanguageCommunication" minOccurs="0" maxOccurs="unbounded"/>
...@@ -999,6 +1002,9 @@ StaticMifToXsd.xsl version 2.0</xs:documentation> ...@@ -999,6 +1002,9 @@ StaticMifToXsd.xsl version 2.0</xs:documentation>
<xs:element name="realmCode" type="CS" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="realmCode" type="CS" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="typeId" type="POCD_MT000040.InfrastructureRoot.typeId" minOccurs="0"/> <xs:element name="typeId" type="POCD_MT000040.InfrastructureRoot.typeId" minOccurs="0"/>
<xs:element name="templateId" type="II" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="templateId" type="II" minOccurs="0" maxOccurs="unbounded"/>
<!-- Begin Extension: (SDTC) -->
<xs:element ref="sdtc:functionCode" minOccurs="0" />
<!-- End Extension: (SDTC) -->
<xs:element name="time" type="IVL_TS" minOccurs="0"/> <xs:element name="time" type="IVL_TS" minOccurs="0"/>
<xs:element name="modeCode" type="CE" minOccurs="0"/> <xs:element name="modeCode" type="CE" minOccurs="0"/>
<xs:element name="assignedEntity" type="POCD_MT000040.AssignedEntity"/> <xs:element name="assignedEntity" type="POCD_MT000040.AssignedEntity"/>
......
...@@ -53,6 +53,8 @@ ...@@ -53,6 +53,8 @@
<xs:element name="signatureText" type="hl7:ED"/> <xs:element name="signatureText" type="hl7:ED"/>
<xs:element name="functionCode" type="hl7:CE" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment