Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML...

59
Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Transcript of Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML...

Page 1: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Data Validation in the NEMSIS XML Standard

Using the XML Schema and Schematron

Joshua Legler

November 2013

Page 2: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Welcome. This is a guide to data validation in the NEMSIS 3 XML standard. The purpose of this guide is to explain how the NEMSIS XML Schema and Schematron are used to validate EMS data. The views expressed are those of the author (Joshua Legler) and do not represent the views of the NEMSIS Technical Assistance Center or any other entity. It’s about a 20-minute read.

2

INTR

O

Page 3: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Here’s what we’ll cover:

• A refresher on XML basics

• Validation using the NEMSIS XML Schema

• Validation using Schematron

• Schematron rule design considerations

• Schematron performance

3

INTR

O

Page 4: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

The NEMSIS standard is XML-based.

XML (eXtensible Markup Language) is a language that defines rules for encoding data using “markup.”

NEMSIS XML data look like this…

4

XM

L

Page 5: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

<?xml version="1.0" encoding="UTF-8"?>

<EMSDataSet xmlns="http://www.nemsis.org"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.nemsis.org http://nems...">

<Header>

<DemographicGroup>

<dAgency.01>9999</dAgency.01>

<dAgency.02>John's Ambulance Service</dAgency.02>

<dAgency.04>10</dAgency.04>

</DemographicGroup>

<PatientCareReport>

...

5

XM

L

Page 6: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Software takes information entered by EMS personnel and transforms it into XML, like this…

6

XM

L

Page 7: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

PCR

Patient’s First Name:

Patient’s Middle Name:

Patient’s Last Name:

7

XM

L

...

<ePatient>

<ePatient.PatientNameGroup>

<ePatient.02>Doe</ePatient.02>

<ePatient.03>John</ePatient.03>

<ePatient.04>V.</ePatient.04>

</ePatient.PatientNameGroup>

...

</ePatient>

...

John

V.

Doe

Page 8: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

XML data can be validated.

NEMSIS 3 data are validated using:

• XML Schema

• Schematron

8

XM

L

Page 9: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Here’s how XML Schema validation works…

9

XM

L SC

HEM

A

Page 10: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

First, software checks an XML document to make sure it is “well-formed.”

“Well-formed” means that it adheres to the basic rules of XML (elements are in markup <tag>s, every opening <tag> has a closing </tag>, etc.).

10

XM

L SC

HEM

A

Page 11: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

This XML document is not well-formed, because <paragraph> needs to have a matching </paragraph>.

<?xml version="1.0" encoding="UTF-8"?>

<document>

<title>XML Sample</title>

<paragraph>This is a sample XML document.

</document>

11

XM

L SC

HEM

A

Page 12: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Second, if it is well-formed, the XML document is checked to make sure it is “valid.”

“Valid” means that it conforms to a Schema.

We often refer to an XML Schema as an “XSD.”

12

XM

L SC

HEM

A

Page 13: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

An XML Schema defines rules for what data an XML document can contain and how the document is to be structured.

An XML Schema is written in XML.

13

XM

L SC

HEM

A

Page 14: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

This XML document claims to conform to a Schema, and it lists the URL where the Schema can be found.

An XML validator can get the Schema from that URL and determine whether the XML document is valid…

<?xml version="1.0" encoding="UTF-8"?>

<EMSDataSet xmlns= "http://www.nemsis.org"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation= "http://www.nemsis.org http://nemsis.org/media/XSD_v3/_nemsis_v3.3.3/3.3.3.130926/XSDs/NEMSIS_XSDs_v3.3.3.130926/EMSDataSet_v3.xsd">

...

14

XM

L SC

HEM

A

Page 15: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

The NEMSIS Schema says this element:

• Can occur 0 or 1 time

• Is named “ePatient.03”

• Can be empty

• Can contain a string

• Can be 1-50 characters long

<xs:element id="ePatient.FirstName" minOccurs="0" name="ePatient.03" nillable="true"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="50"/> </xs:restriction> </xs:simpleType> </xs:element>

15

XM

L SC

HEM

A

Page 16: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

This piece of XML is not valid in the NEMSIS Schema, because the string in <ePatient.03> is longer than 50 characters.

...

<ePatient.03>This Is A Patient First Name That Is 55 Characters Long</ePatient.03>

...

16

XM

L SC

HEM

A

Page 17: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Software developers use the information from the NEMSIS XML Schema to decide how to design their database. They’ll probably make the patient’s first name be a string of up to 50 characters in their database, since that’s what the NEMSIS Schema says.

17

XM

L SC

HEM

A

Page 18: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Software developers also use the information from the NEMSIS XML Schema to build validation routines into their interface at the time of data entry…

18

XM

L SC

HEM

A

Page 19: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

A patient’s first name longer than 50 characters won’t fit in the database, and it won’t be valid in the XML output, so it makes sense to catch the problem as soon as possible…

PCR

Patient’s First Name:

19

XM

L SC

HEM

A

This Is A Patient First Name That Is 55 Characters Long

Oops! Patient’s first name has to be less than 50 characters long.

Page 20: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Other validation checks have to wait until later:

Back in Service Date/Time cannot be empty—but we need to allow the EMT to finish the incident and come back to it at the end.

PCR

Notified:

En route:

On Scene:

Left Scene:

Destination:

Back in Service:

20

XM

L SC

HEM

A

12:00

Oops! Back in Service Date/Time has to be recorded.

12:04

12:09

Page 21: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Even though the software tries to catch errors as early as it can, the Schema is the standard.

When it’s time to finish a patient care report (or later whenever it’s edited), the PCR is transformed into XML and checked to ensure it is both well-formed and valid.

21

XM

L SC

HEM

A

Page 22: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Whenever an XML document is transferred from one system to another, the receiving system checks that the document is both well-formed and valid, to make sure nothing was broken in transit.

This also helps protect the receiving system from bad data that compromises its security.

22

XM

L SC

HEM

A

Page 23: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Let’s recap what can be done with the NEMSIS XML Schema. The following things can be checked in an XML document by using the Schema…

23

XM

L SC

HEM

A

Page 24: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

• Well-formedness (adherence to the basic XML standard)

• Where an element is within a document

• How an element is grouped with others

• How may times an element can occur in a document

• Data types (string, integer, decimal, date, date/time, values from a defined list, etc.)

• Min and max values or lengths

• Pattern matching (using “regular expressions”)

24

XM

L SC

HEM

A

Page 25: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

The Schema does a lot, but it can’t do everything we need. For example, it can’t cross-check the data in one element against the data in another element:

• It can’t say that times (notified, en route, at scene, etc.) have to be in a certain order.

• It can’t say that the patient cannot be pregnant if the patient is male.

25

XM

L SC

HEM

A

Page 26: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Enter Schematron…

26

SCH

EMAT

RO

N

Page 27: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Schematron is the tool for catching what the Schema can’t. The inventor of Schematron called it “a feather duster to reach the parts other schema languages cannot reach.”

Schematron can do everything the Schema can—but it wouldn’t make sense to put something in Schematron that’s already in the Schema.

27

SCH

EMAT

RO

N

Page 28: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Schematron is XML-based.

Once a PCR has been converted to XML to check that it is well-formed and valid according to the Schema, it’s also checked against a Schematron rules file.

28

SCH

EMAT

RO

N

Page 29: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Here’s how Schematron works…

29

SCH

EMAT

RO

N

Page 30: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

A Schematron file mainly contains patterns, rules, and asserts:

30

SCH

EMAT

RO

N

<pattern id="(ID)">

<title>(Subject: What this is about)</title>

<rule context="(Context: Where to look in the document)">

<assert test="(Condition: A true/false statement)">

(Message to show if the test fails [test=false])

</assert>

</rule>

</pattern>

Page 31: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Here’s a Schematron pattern for catching a pregnant male:

31

SCH

EMAT

RO

N

<pattern id="pregnant_male">

<title>Males cannot be pregnant.</title>

<rule context="PatientCareReport[eHistory/eHistory.18 > 3118001]" role="[FATAL]">

<assert test="ePatient/ePatient.13 = '9906003'">

Oops! Pregnant male.

</assert>

</rule>

</pattern>

Page 32: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

As with the NEMSIS XML Schema, software developers can use the information from the Schematron file to build validation routines into their interface at the time of data entry:

32

SCH

EMAT

RO

N

Page 33: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

An EMS unit should not be back in service before the call began, so it makes sense to catch the problem as soon as possible.

PCR

Notified:

En route:

On Scene:

Left Scene:

Destination:

Back in Service:

33

SCH

EMAT

RO

N

12:00

Oops! Back in Service Date/Time is too early.

12:04

12:09

12:23

12:38

11:45

Page 34: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Other validation checks have to wait until later:

Only females can be pregnant—but gender and pregnancy might be collected in different areas of the PCR, so we need to allow the EMT to get to both before we check.

PCR

Pregnancy:

34

SCH

EMAT

RO

N

Yes, Weeks Unknown

Oops! Only females can be pregnant.

Page 35: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Even though the software tries to catch errors as early as it can, the Schematron file is the standard.

When it’s time to complete a patient care report and the PCR is transformed into XML and checked to ensure it is both well-formed and valid, it is also checked against the Schematron file.

35

SCH

EMAT

RO

N

Page 36: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Whenever an XML document is transferred from one system to another, the receiving system checks that the document is not only well-formed and valid, but that it also follows the rules contained in the Schematron file.

36

SCH

EMAT

RO

N

Page 37: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Schematron is more flexible than the Schema…

37

SCH

EMAT

RO

N

Page 38: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Schematron can do “warnings” as well as “errors:”

• With the Schema, if an XML document is not well-formed or not valid, it should be rejected by the receiving system.

• But with Schematron, we may designate some rules as only “warnings” and not reject the document.

38

SCH

EMAT

RO

N

Page 39: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Schematron rule files can be updated more easily:

• Since the NEMSIS XML Schema defines the structure of an XML document, software developers have to reprogram their software whenever the Schema is changed.

• With Schematron, a state can add rules to their file and distribute it to software developers at any time.

39

SCH

EMAT

RO

N

Page 40: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Let’s recap what can be done with Schematron:

• Schematron can do everything the Schema can, but it’s generally used to do what the Schema cannot.

• It’s particularly good for cross-checking combinations of data within an XML document.

• It can do “warnings” as well as “errors.”

• Rules can be updated more easily over time.

40

SCH

EMAT

RO

N

Page 41: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Let’s look at some design considerations for Schematron rules…

41

SCH

EMAT

RO

N D

ESIG

N

Page 42: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

<pattern id="pregnant_male">

<title>Males cannot be pregnant.</title>

<rule context="PatientCareReport[eHistory/eHistory.18 > 3118001]" role="[FATAL]">

<assert test="ePatient/ePatient.13 = '9906003'">

Oops! Pregnant male.

</assert>

</rule>

</pattern>

Both the title and the message shown to the user need to be clear, concise, and actionable.

42

SCH

EMAT

RO

N D

ESIG

N

Page 43: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

The software needs to know which elements the user can fix. It can parse the Schematron file, or we can provide that information in the user message.

43

SCH

EMAT

RO

N D

ESIG

N

<pattern id="pregnant_male">

<title>Males cannot be pregnant.</title>

<rule context="PatientCareReport[eHistory/eHistory.18 > 3118001]" role="[FATAL]">

<assert test="ePatient/ePatient.13 = '9906003'">

Oops! Pregnant male. [ePatient.18] [eHistory.13]

</assert>

</rule>

</pattern>

Page 44: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Patterns, Rules, and Asserts should be designed to avoid the “one mistake triggers a dozen messages” problem.

PCR

Notified:

En route:

On Scene:

At Patient:

Left Scene:

Destination:

Back in Service:

44

SCH

EMAT

RO

N D

ESIG

N

12:00

12:04

21:09

12:23

12:38

12:45

12:58

Unit Arrived on Scene Date/Time (eTimes.06) must be less or equal to Arrived at Patient Date/Time (eTimes.07) . Unit Arrived on Scene Date/Time (eTimes.06) must be less

than or equal to Unit Left Scene Date/Time (eTimes.09). Unit Arrived on Scene (eTimes.06) must be less or equal to Unit Back in Service Date/Time (eTimes.13). Unit Arrived on Scene (eTimes.06) must be less or equal to Unit Back in Service Date/Time (eTimes.13).

Page 45: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Let’s recap Schematron design considerations:

• Text should be well-crafted.

• Software should know which elements the user can fix.

• One mistake shouldn’t trigger multiple error messages.

45

SCH

EMAT

RO

N D

ESIG

N

Page 46: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Lastly, let’s explore Schematron performance…

46

SCH

EMAT

RO

N P

ERFO

RM

AN

CE

Page 47: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

The first performance-related point:

XML is everywhere today, so lots of things are optimized to process it efficiently, including web browsers, mobile devices, and the tools used by software developers.

47

SCH

EMAT

RO

N P

ERFO

RM

AN

CE

Page 48: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

The NEMSIS national Schematron file for PCR data has 166 <pattern>s in it (November 2013).

Here’s how long it takes to process PCRs through that file…

48

SCH

EMAT

RO

N P

ERFO

RM

AN

CE

Page 49: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

166 Schematron patterns

58ms overhead + 89ms per PCR

0

2

4

6

8

10

12

14

16

18

20

0 10 20 30 40 50 60 70 80 90 100

Seco

nd

s

PCRs

Schematron Performance: PCRsSaxon HE 9.5 (Java)

Intel Core i5 @ 2.60GHz

49

SCH

EMAT

RO

N P

ERFO

RM

AN

CE

Page 50: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Let’s double the number of <pattern>s in the Schematron to 332.

Here’s how long it takes to process PCRs through that file…

50

SCH

EMAT

RO

N P

ERFO

RM

AN

CE

Page 51: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

332 Schematron patterns

84ms overhead + 182ms per PCR

0

2

4

6

8

10

12

14

16

18

20

0 10 20 30 40 50 60 70 80 90 100

Seco

nd

s

PCRs

Schematron Performance: PCRsSaxon HE 9.5 (Java)

Intel Core i5 @ 2.60GHz

51

SCH

EMAT

RO

N P

ERFO

RM

AN

CE

Page 52: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Based on these data, the marginal cost of adding one pattern to the Schematron file is:

0.2ms overhead + 0.6ms per PCR

When processing a single PCR, the marginal cost of a pattern is about one millisecond.

52

SCH

EMAT

RO

N P

ERFO

RM

AN

CE

Page 53: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Those stats were produced on a laptop with an Intel Core i5 CPU at 2.60GHz running the Saxon XSLT processor in Java.

What about a smartphone? Roughly, multiply the time by 5–10x. With 332 patterns, a smartphone may need 1.3–2.6 seconds to process one PCR through Schematron.

53

SCH

EMAT

RO

N P

ERFO

RM

AN

CE

Page 54: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Let’s recap Schematron performance:

• A 2013 model laptop requires about a quarter second to process one PCR through a Schematron file with 332 patterns.

• Each new pattern adds about one millisecond to the processing time.

• A smartphone may require 5–10 times as long to process a PCR through Schematron.

54

SCH

EMAT

RO

N P

ERFO

RM

AN

CE

Page 55: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

Let’s summarize this guide…

55

SUM

MA

RY

Page 56: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

• NEMSIS is XML-based. All components of the standard are XML-based.

56

SUM

MA

RY

Page 57: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

• Software developers build validation into their products based on the NEMSIS Schema and Schematron standards.

• When an agency’s demographic data is updated or a PCR is finished (or later changed), the software converts the data to NEMSIS XML and checks for well-formedness, validity, and compliance with the Schematron rules.

57

SUM

MA

RY

Page 58: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

• XML validation and Schematron processing perform quickly on modern computers.

• Smartphones are slower but are capable of performing XML validation and Schematron processing. (However, software developers may choose to do it solely on the server.)

58

SUM

MA

RY

Page 59: Data Validation in the NEMSIS XML Standard Using the … · Data Validation in the NEMSIS XML Standard Using the XML Schema and Schematron Joshua Legler November 2013

The purpose of this guide was to explain how the NEMSIS XML Schema and Schematron are used to validate EMS data.

Thanks for your attention!

Feel free to contact me at [email protected].

59

SUM

MA

RY