Skip to main content

๐Ÿ‘ฎ Validation of MS files

Why ?โ€‹

  • Check if XML files are valid KMEHR files ?
  • Check if XML files are valid Medication scheme ?
info

This project does it on each git change : XML Validations ( Source code )

Prerequisitesโ€‹

sudo apt-get update -qq
sudo apt-get install -y libxml2-utils

Stepsโ€‹

  1. Unzip your KMEHR XSD file
  2. Check if XML file is valid KMEHR file, by running a command similar to this one :
xmllint --catalogs --noout --schema ./xsd-kmehr/ehealth-kmehr/XSD/kmehr_elements-1_37.xsd ./path/to/your/file/test-MS.xml
  1. If it is valid, you will receive a status 0 of this command. Otherwise, you have an error somewhere ...
  2. Check if XML file is valid Medication scheme, by running a command similar to this one :
npx xslt3 "-s:path/to/your/file/test-MS.xml" "-xsl:medicationscheme-validation-v2.xslt"
info

This project had automated the validation and parsing of errors within a script