Mentions légales du service

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

Add "replacing XSD" feature to eHDSIScript

parent ea02dd02
No related branches found
No related tags found
1 merge request!15Release 3.0.2
Showing
with 10223 additions and 1 deletion
......@@ -15,7 +15,7 @@ if [ -z $jarPath ]; then
else
absJarPath=`realpath $jarPath`
echo -e "${GREEN}A GOC JAR has been detected at: (${jarPath}) want you to use it?${NC}"
printf "hit enter for yes, enter an other path to change it: "
printf "hit enter for yes, provide an other path to change it: "
read -r newJarPath
if [ ! -z $newJarPath ]; then
isAbsPath=`echo "${newJarPath}" | grep ^/.* | wc -l`
......@@ -106,6 +106,45 @@ fi;
echo -e "${GREEN}your validator will be generated in: ${workspaceDir}/${folderName}${NC}"
######## GENERATION COMMAND ########
java -jar $jarPath -bbr $bbrPath -out "${workspaceDir}/${folderName}" -mvn $mavenPath -serviceName $validator -HL7TEMP_CDACONFFOLDERNAME cdaepsos
####################################
#Replacing XSD
pathToResources=""
if [ -d ./classes/eHDSI-resources/xsd ]; then
pathToResources=$(realpath "./classes/eHDSI-resources/xsd")
echo -e "${GREEN}XSD Resources found at $pathToResources${NC}"
else
echo -e "${ORANGE}Could not find resources, please provide the path to the XSD folder manually${NC}"
echo -e "${ORANGE}be careful, the directory should contain correct XSD files for the validator to run. This is not checked by the script!${NC}"
read -r pathToResources
if [ ! -d $pathToResources ]; then
echo -e "${RED} invalid path to directory"
exit 1;
fi;
fi;
pathToXSD=$(realpath $(find "${workspaceDir}/${folderName}" -type d -name "xsd" | grep -e ".*-app/.*"))
echo "$pathToXSD"
XSDDirname=$(dirname "$pathToXSD")
echo "$XSDDirname"
rm -r "$pathToXSD"
cp -r "$pathToResources"/xsd "$XSDDirname"
#Zip validator
#move to app path
appPath=$(realpath $(find $workspaceDir/$folderName -type d -wholename *validator-app))
cd $appPath
#Create bbr folder
mkdir "bbr" || echo "File already exist, that won't affect next steps"
cp $bbrPath bbr
#create documentation folder
documentationPath=$(realpath $(find $workspaceDir/$folderName -type d -wholename "*/documentation"))
cp -r $documentationPath $appPath
#Zipping
zip -r "validator-$_currDate.zip" bbr/ documentation/ repo/ bin/
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Bob Dolin (HL7 CDA TC) -->
<xs:schema targetNamespace="urn:hl7-org:v3" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:hl7-org:v3" xmlns:mif="urn:hl7-org:v3/mif" elementFormDefault="qualified">
<xs:include schemaLocation="POCD_MT000040_extended.xsd"/>
<xs:element name="ClinicalDocument" type="POCD_MT000040.ClinicalDocument"/>
</xs:schema>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Bob Dolin (HL7 CDA TC) -->
<xs:schema targetNamespace="urn:hl7-org:v3" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:hl7-org:v3" xmlns:mif="urn:hl7-org:v3/mif" elementFormDefault="qualified">
<xs:include schemaLocation="POCD_MT000040.xsd"/>
<xs:element name="ClinicalDocument" type="POCD_MT000040.ClinicalDocument"/>
</xs:schema>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:hl7-org:v3" elementFormDefault="qualified" xmlns:mif="urn:hl7-org:v3/mif">
<xs:annotation xmlns="urn:hl7-org:v3">
<xs:documentation>Source Information
Rendered by: RoseTree 3.0.8
Rendered on: 7/30/2005 T24:53:20
This model was rendered into XML using software provided to HL7 by Beeler Consulting LLC.
Transform: $RCSfile: infrastructureRoot.xsd,v $ $Revision: 1.3 $ $Date: 2005/08/24 19:54:59 $
Generated using schema builder version: 2.0
RIM MIF Infrastructure Root to Schema Transform: $Id: infrastructureRoot.xsd,v 1.3 2005/08/24 19:54:59 mcraig Exp $
Static MIF to Schema Transform: $Id: infrastructureRoot.xsd,v 1.3 2005/08/24 19:54:59 mcraig Exp $
Package Id Conversion: $Id: infrastructureRoot.xsd,v 1.3 2005/08/24 19:54:59 mcraig Exp $</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="datatypes.xsd"/>
<xs:include schemaLocation="voc.xsd"/>
<xs:complexType name="all.InfrastructureRoot.typeId" xmlns="urn:hl7-org:v3">
<xs:complexContent>
<xs:restriction base="II">
<xs:attribute name="root" type="uid" fixed="2.16.840.1.113883.1.3" use="required"/>
<xs:attribute name="extension" type="st" use="required"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="all.InfrastructureRoot.templateId" xmlns="urn:hl7-org:v3">
<xs:complexContent>
<xs:extension base="II">
<xs:attribute name="unsorted" type="xs:boolean" default="false"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:group name="InfrastructureRootElements">
<xs:sequence>
<xs:element name="realmCode" type="CS" minOccurs="0" maxOccurs="unbounded" xmlns="urn:hl7-org:v3"/>
<xs:element name="typeId" type="all.InfrastructureRoot.typeId" minOccurs="0" maxOccurs="1" xmlns="urn:hl7-org:v3"/>
<xs:element name="templateId" type="all.InfrastructureRoot.templateId" minOccurs="0" maxOccurs="unbounded" xmlns="urn:hl7-org:v3"/>
</xs:sequence>
</xs:group>
<xs:attributeGroup name="InfrastructureRootAttributes">
<xs:attribute name="nullFlavor" type="NullFlavor" use="optional" xmlns="urn:hl7-org:v3"/>
</xs:attributeGroup>
</xs:schema>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ex="urn:hl7-org/v3-example"
xmlns="urn:hl7-org:v3"
targetNamespace="urn:hl7-org:v3"
elementFormDefault="qualified"><!--
*****************************************************************************************************************
* XML schema for message type COCT_MT440001UV.
* Source information:
* Rendered by: Visio to MIF transform
* Rendered on:
*
*
* Generated by XMLITS version 3.2.4
* MIF to XSD Transform $Id: StaticMifToXsd.xsl 8126 2009-08-06 21:22:20Z wbeeler $
* Package Id Conversion: $Id: TransformPackageIds.xsl 7375 2009-01-26 19:26:53Z wbeeler $
*
* Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Health Level Seven. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Health Level Seven.
* THIS SOFTWARE IS PROVIDED BY HEALTH LEVEL SEVEN, INC. AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
********************************************************************************************************************
--><xs:annotation>
<xs:documentation>Generated using schema builder version 3.2.4. Stylesheets:
StaticMifToXsd.xsl version 2.0</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="../coreschemas/infrastructureRoot.xsd"/>
<xs:complexType name="COCT_MT440001UV.ValuedItem">
<xs:sequence>
<xs:group ref="InfrastructureRootElements"/>
<xs:element name="id" type="II" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="code" type="CD" minOccurs="0" maxOccurs="1"/>
<xs:element name="effectiveTime" type="IVL_TS" minOccurs="0" maxOccurs="1"/>
<xs:element name="unitQuantity" type="RTO_PQ_PQ" minOccurs="0" maxOccurs="1"/>
<xs:element name="unitPriceAmt" type="RTO_MO_PQ" minOccurs="1" maxOccurs="1"/>
<xs:element name="netAmt" type="MO" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attributeGroup ref="InfrastructureRootAttributes"/>
<xs:attribute name="classCode" type="ActClassInvoiceElement" use="required"/>
<xs:attribute name="moodCode" type="x_ActMoodDefEvn" use="required"/>
</xs:complexType>
</xs:schema>
\ No newline at end of file
File added
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