Skip to content

Commit

Permalink
Prepare for an alpha release.
Browse files Browse the repository at this point in the history
  • Loading branch information
thefunny42 committed Jun 29, 2016
1 parent 082c587 commit d4b4ebf
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
recursive-include koppeltaal_schema *.py *.xsd
recursive-include tests *.py *.xml
include *.md *.cfg *.py
global-exclude *pyc
30 changes: 17 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
# koppeltaal-schema

XSD schemas for the FHIR messages used by project Koppeltaal. The files are downloaded from [fhir-all-xsd]
XSD schemas for the FHIR messages used by project Koppeltaal. The
files are downloaded from [fhir-all-xsd]

Koppleltaal is using FHIR DSTU1 version (0.0.82). The Validation process is using the following schemas:
Koppleltaal is using FHIR DSTU1 version (0.0.82). The Validation
process is using the following schemas:

"fhir-atom-single.xsd",
- fhir-atom-single.xsd,

"fhir-single.xsd",
- fhir-single.xsd,

"fhir-xhtml.xsd",
- fhir-xhtml.xsd,

"opensearch.xsd",
- opensearch.xsd,

"opensearchscore.xsd",
- opensearchscore.xsd,

"tombstone.xsd",
- tombstone.xsd,

"xml.xsd",
- xml.xsd,

"xmldsig-core-schema.xsd"
- xmldsig-core-schema.xsd

The "goal" of a CarePlanActivity is a "string" instead of "idref", because the FHIR library used by the Koppeltaal server can't handle this for some reason.
The "goal" of a CarePlanActivity is a "string" instead of "idref",
because the FHIR library used by the Koppeltaal server can't handle
this for some reason.


There is one significant difference:
The XSD files are encapsulated in a Python package for easy inclusion in the Python Koppeltaal adapter.
There is one significant difference: The XSD files are encapsulated in
a Python package for easy inclusion in the Python Koppeltaal adapter.

## How to use?

Expand Down
4 changes: 4 additions & 0 deletions tests/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,26 @@ def test_validate_xsd():
'''Element 'frop': No matching global declaration available '''
'''for the validation root.''')


def test_create_or_update_careplan():
xml = here.dirpath() / 'examples/CreateOrUpdateCarePlan.xml'
stanza = lxml.etree.parse(str(xml))
assert validate(stanza) is None


@pytest.mark.xfail(reason='waiting for Bart M to provide more information')
def test_create_or_update_careplan_activity_result():
xml = here.dirpath() / 'examples/CreateOrUpdateCarePlanActivityResult.xml'
stanza = lxml.etree.parse(str(xml))
assert validate(stanza) is None


def test_create_or_update_user_message():
xml = here.dirpath() / 'examples/CreateOrUpdateUserMessage.xml'
stanza = lxml.etree.parse(str(xml))
assert validate(stanza) is None


@pytest.mark.xfail(reason='waiting for Bart M to provide more information')
def test_update_user_care_plan_activity_status():
xml = here.dirpath() / 'examples/UpdateCarePlanActivityStatus.xml'
Expand Down

0 comments on commit d4b4ebf

Please sign in to comment.