[med-svn] [python-fhirclient] 01/02: New upstream version 3.0.0

Andreas Tille tille at debian.org
Wed Oct 18 16:28:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository python-fhirclient.

commit 53bb698914c837b0540f9847f53b12b9555c5f6d
Author: Andreas Tille <tille at debian.org>
Date:   Wed Oct 18 18:25:49 2017 +0200

    New upstream version 3.0.0
---
 .bumpversion.cfg                                   |    4 +
 .gitignore                                         |   14 +
 .gitmodules                                        |    3 +
 AUTHORS.md                                         |   18 +
 CONTRIBUTING.md                                    |   37 +
 Doxyfile                                           | 2391 ++++++++++++++++++++
 Doxyfilter                                         |    2 +
 Doxystyle.css                                      |   85 +
 LICENSE                                            |   13 +
 MANIFEST.in                                        |    1 +
 README.md                                          |  221 ++
 fhir-parser-resources/fhirabstractbase.py          |  357 +++
 fhir-parser-resources/fhirabstractresource.py      |  197 ++
 fhir-parser-resources/fhircontainedresource.py     |   33 +
 fhir-parser-resources/fhirdate.py                  |   81 +
 fhir-parser-resources/fhirreference.py             |   94 +
 fhir-parser-resources/fhirsearch.py                |  270 +++
 fhir-parser-resources/fhirsearch_tests.py          |   35 +
 fhir-parser-resources/fhirsearchelement.py         |  189 ++
 fhir-parser-resources/settings.py                  |   40 +
 fhir-parser-resources/template-codesystems.py      |    0
 fhir-parser-resources/template-elementfactory.py   |   27 +
 fhir-parser-resources/template-resource.py         |   80 +
 fhir-parser-resources/template-unittest.py         |   57 +
 fhirclient/ValueSet_vs2r.json                      |   33 +
 fhirclient/__init__.py                             |    5 +
 fhirclient/auth.py                                 |  400 ++++
 fhirclient/client.py                               |  229 ++
 fhirclient/fhirreference_tests.py                  |  134 ++
 fhirclient/models/__init__.py                      |    0
 fhirclient/models/account.py                       |  195 ++
 fhirclient/models/account_tests.py                 |  101 +
 fhirclient/models/activitydefinition.py            |  366 +++
 fhirclient/models/activitydefinition_tests.py      |  394 ++++
 fhirclient/models/address.py                       |   94 +
 fhirclient/models/adverseevent.py                  |  205 ++
 fhirclient/models/adverseevent_tests.py            |   49 +
 fhirclient/models/age.py                           |   26 +
 fhirclient/models/allergyintolerance.py            |  227 ++
 fhirclient/models/allergyintolerance_tests.py      |   74 +
 fhirclient/models/annotation.py                    |   64 +
 fhirclient/models/appointment.py                   |  209 ++
 fhirclient/models/appointment_tests.py             |  157 ++
 fhirclient/models/appointmentresponse.py           |   91 +
 fhirclient/models/appointmentresponse_tests.py     |   64 +
 fhirclient/models/attachment.py                    |   79 +
 fhirclient/models/auditevent.py                    |  375 +++
 fhirclient/models/auditevent_tests.py              |  452 ++++
 fhirclient/models/backboneelement.py               |   45 +
 fhirclient/models/basic.py                         |   78 +
 fhirclient/models/basic_tests.py                   |  106 +
 fhirclient/models/binary.py                        |   55 +
 fhirclient/models/binary_tests.py                  |   37 +
 fhirclient/models/bodysite.py                      |   88 +
 fhirclient/models/bodysite_tests.py                |   93 +
 fhirclient/models/bundle.py                        |  315 +++
 fhirclient/models/bundle_tests.py                  |  453 ++++
 fhirclient/models/capabilitystatement.py           |  901 ++++++++
 fhirclient/models/capabilitystatement_tests.py     |  179 ++
 fhirclient/models/careplan.py                      |  343 +++
 fhirclient/models/careplan_tests.py                |  500 ++++
 fhirclient/models/careteam.py                      |  165 ++
 fhirclient/models/careteam_tests.py                |   50 +
 fhirclient/models/chargeitem.py                    |  240 ++
 fhirclient/models/chargeitem_tests.py              |   69 +
 fhirclient/models/claim.py                         |  947 ++++++++
 fhirclient/models/claim_tests.py                   |  844 +++++++
 fhirclient/models/claimresponse.py                 |  682 ++++++
 fhirclient/models/claimresponse_tests.py           |   78 +
 fhirclient/models/clinicalimpression.py            |  248 ++
 fhirclient/models/clinicalimpression_tests.py      |   50 +
 fhirclient/models/codeableconcept.py               |   50 +
 fhirclient/models/codesystem.py                    |  439 ++++
 fhirclient/models/codesystem_tests.py              |  169 ++
 fhirclient/models/coding.py                        |   57 +
 fhirclient/models/communication.py                 |  204 ++
 fhirclient/models/communication_tests.py           |  123 +
 fhirclient/models/communicationrequest.py          |  249 ++
 fhirclient/models/communicationrequest_tests.py    |   73 +
 fhirclient/models/compartmentdefinition.py         |  170 ++
 fhirclient/models/compartmentdefinition_tests.py   |   67 +
 fhirclient/models/composition.py                   |  330 +++
 fhirclient/models/composition_tests.py             |   82 +
 fhirclient/models/conceptmap.py                    |  407 ++++
 fhirclient/models/conceptmap_tests.py              |  189 ++
 fhirclient/models/condition.py                     |  268 +++
 fhirclient/models/condition_tests.py               |  354 +++
 fhirclient/models/consent.py                       |  425 ++++
 fhirclient/models/consent_tests.py                 |  341 +++
 fhirclient/models/contactdetail.py                 |   49 +
 fhirclient/models/contactpoint.py                  |   65 +
 fhirclient/models/contract.py                      |  655 ++++++
 fhirclient/models/contract_tests.py                |  256 +++
 fhirclient/models/contributor.py                   |   55 +
 fhirclient/models/count.py                         |   30 +
 fhirclient/models/coverage.py                      |  220 ++
 fhirclient/models/coverage_tests.py                |  147 ++
 fhirclient/models/dataelement.py                   |  189 ++
 fhirclient/models/dataelement_tests.py             |  110 +
 fhirclient/models/datarequirement.py               |  188 ++
 fhirclient/models/detectedissue.py                 |  154 ++
 fhirclient/models/detectedissue_tests.py           |  107 +
 fhirclient/models/device.py                        |  213 ++
 fhirclient/models/device_tests.py                  |  265 +++
 fhirclient/models/devicecomponent.py               |  150 ++
 fhirclient/models/devicecomponent_tests.py         |   88 +
 fhirclient/models/devicemetric.py                  |  148 ++
 fhirclient/models/devicemetric_tests.py            |   55 +
 fhirclient/models/devicerequest.py                 |  225 ++
 fhirclient/models/devicerequest_tests.py           |   69 +
 fhirclient/models/deviceusestatement.py            |  129 ++
 fhirclient/models/deviceusestatement_tests.py      |   40 +
 fhirclient/models/diagnosticreport.py              |  229 ++
 fhirclient/models/diagnosticreport_tests.py        |  324 +++
 fhirclient/models/distance.py                      |   26 +
 fhirclient/models/documentmanifest.py              |  188 ++
 fhirclient/models/documentmanifest_tests.py        |   51 +
 fhirclient/models/documentreference.py             |  316 +++
 fhirclient/models/documentreference_tests.py       |   82 +
 fhirclient/models/domainresource.py                |   63 +
 fhirclient/models/dosage.py                        |  146 ++
 fhirclient/models/duration.py                      |   26 +
 fhirclient/models/element.py                       |   45 +
 fhirclient/models/elementdefinition.py             | 1483 ++++++++++++
 fhirclient/models/eligibilityrequest.py            |  138 ++
 fhirclient/models/eligibilityrequest_tests.py      |   73 +
 fhirclient/models/eligibilityresponse.py           |  319 +++
 fhirclient/models/eligibilityresponse_tests.py     |  271 +++
 fhirclient/models/encounter.py                     |  438 ++++
 fhirclient/models/encounter_tests.py               |  432 ++++
 fhirclient/models/endpoint.py                      |  120 +
 fhirclient/models/endpoint_tests.py                |   94 +
 fhirclient/models/enrollmentrequest.py             |   88 +
 fhirclient/models/enrollmentrequest_tests.py       |   43 +
 fhirclient/models/enrollmentresponse.py            |   97 +
 fhirclient/models/enrollmentresponse_tests.py      |   46 +
 fhirclient/models/episodeofcare.py                 |  198 ++
 fhirclient/models/episodeofcare_tests.py           |   67 +
 fhirclient/models/expansionprofile.py              |  418 ++++
 fhirclient/models/expansionprofile_tests.py        |   56 +
 fhirclient/models/explanationofbenefit.py          | 1408 ++++++++++++
 fhirclient/models/explanationofbenefit_tests.py    |   79 +
 fhirclient/models/extension.py                     |  322 +++
 fhirclient/models/familymemberhistory.py           |  263 +++
 fhirclient/models/familymemberhistory_tests.py     |   83 +
 fhirclient/models/fhirabstractbase.py              |  357 +++
 fhirclient/models/fhirabstractresource.py          |  197 ++
 fhirclient/models/fhirdate.py                      |   81 +
 fhirclient/models/fhirelementfactory.py            | 1491 ++++++++++++
 fhirclient/models/fhirreference.py                 |   94 +
 fhirclient/models/fhirsearch.py                    |  270 +++
 fhirclient/models/flag.py                          |   92 +
 fhirclient/models/flag_tests.py                    |   74 +
 fhirclient/models/goal.py                          |  209 ++
 fhirclient/models/goal_tests.py                    |   87 +
 fhirclient/models/graphdefinition.py               |  269 +++
 fhirclient/models/graphdefinition_tests.py         |   57 +
 fhirclient/models/group.py                         |  209 ++
 fhirclient/models/group_tests.py                   |   75 +
 fhirclient/models/guidanceresponse.py              |  137 ++
 fhirclient/models/guidanceresponse_tests.py        |   45 +
 fhirclient/models/healthcareservice.py             |  267 +++
 fhirclient/models/healthcareservice_tests.py       |  105 +
 fhirclient/models/humanname.py                     |   74 +
 fhirclient/models/identifier.py                    |   77 +
 fhirclient/models/imagingmanifest.py               |  202 ++
 fhirclient/models/imagingmanifest_tests.py         |   51 +
 fhirclient/models/imagingstudy.py                  |  288 +++
 fhirclient/models/imagingstudy_tests.py            |  115 +
 fhirclient/models/immunization.py                  |  346 +++
 fhirclient/models/immunization_tests.py            |  134 ++
 fhirclient/models/immunizationrecommendation.py    |  220 ++
 .../models/immunizationrecommendation_tests.py     |  106 +
 fhirclient/models/implementationguide.py           |  389 ++++
 fhirclient/models/implementationguide_tests.py     |   75 +
 fhirclient/models/library.py                       |  213 ++
 fhirclient/models/library_tests.py                 |  180 ++
 fhirclient/models/linkage.py                       |   94 +
 fhirclient/models/linkage_tests.py                 |   39 +
 fhirclient/models/list.py                          |  167 ++
 fhirclient/models/list_tests.py                    |  253 +++
 fhirclient/models/location.py                      |  183 ++
 fhirclient/models/location_tests.py                |  217 ++
 fhirclient/models/measure.py                       |  453 ++++
 fhirclient/models/measure_tests.py                 |  238 ++
 fhirclient/models/measurereport.py                 |  327 +++
 fhirclient/models/measurereport_tests.py           |  341 +++
 fhirclient/models/media.py                         |  157 ++
 fhirclient/models/media_tests.py                   |  137 ++
 fhirclient/models/medication.py                    |  268 +++
 fhirclient/models/medicationadministration.py      |  282 +++
 fhirclient/models/medicationdispense.py            |  287 +++
 fhirclient/models/medicationrequest.py             |  334 +++
 fhirclient/models/medicationstatement.py           |  189 ++
 fhirclient/models/messagedefinition.py             |  266 +++
 fhirclient/models/messagedefinition_tests.py       |   53 +
 fhirclient/models/messageheader.py                 |  252 +++
 fhirclient/models/messageheader_tests.py           |   53 +
 fhirclient/models/meta.py                          |   70 +
 fhirclient/models/metadataresource.py              |  112 +
 fhirclient/models/money.py                         |   26 +
 fhirclient/models/namingsystem.py                  |  184 ++
 fhirclient/models/namingsystem_tests.py            |  115 +
 fhirclient/models/narrative.py                     |   42 +
 fhirclient/models/nutritionorder.py                |  429 ++++
 fhirclient/models/nutritionorder_tests.py          |  494 ++++
 fhirclient/models/observation.py                   |  430 ++++
 fhirclient/models/observation_tests.py             |  746 ++++++
 fhirclient/models/operationdefinition.py           |  328 +++
 fhirclient/models/operationdefinition_tests.py     |   85 +
 fhirclient/models/operationoutcome.py              |  102 +
 fhirclient/models/operationoutcome_tests.py        |  134 ++
 fhirclient/models/organization.py                  |  159 ++
 fhirclient/models/organization_tests.py            |  315 +++
 fhirclient/models/parameterdefinition.py           |   77 +
 fhirclient/models/parameters.py                    |  366 +++
 fhirclient/models/parameters_tests.py              |   40 +
 fhirclient/models/patient.py                       |  344 +++
 fhirclient/models/patient_tests.py                 |  393 ++++
 fhirclient/models/paymentnotice.py                 |  102 +
 fhirclient/models/paymentnotice_tests.py           |   47 +
 fhirclient/models/paymentreconciliation.py         |  227 ++
 fhirclient/models/paymentreconciliation_tests.py   |   79 +
 fhirclient/models/period.py                        |   49 +
 fhirclient/models/person.py                        |  149 ++
 fhirclient/models/person_tests.py                  |   90 +
 fhirclient/models/plandefinition.py                |  696 ++++++
 fhirclient/models/plandefinition_tests.py          |  399 ++++
 fhirclient/models/practitioner.py                  |  169 ++
 fhirclient/models/practitioner_tests.py            |  436 ++++
 fhirclient/models/practitionerrole.py              |  217 ++
 fhirclient/models/practitionerrole_tests.py        |   74 +
 fhirclient/models/procedure.py                     |  276 +++
 fhirclient/models/procedure_tests.py               |  305 +++
 fhirclient/models/procedurerequest.py              |  248 ++
 fhirclient/models/procedurerequest_tests.py        |  267 +++
 fhirclient/models/processrequest.py                |  160 ++
 fhirclient/models/processrequest_tests.py          |  224 ++
 fhirclient/models/processresponse.py               |  155 ++
 fhirclient/models/processresponse_tests.py         |  100 +
 fhirclient/models/provenance.py                    |  228 ++
 fhirclient/models/provenance_tests.py              |  141 ++
 fhirclient/models/quantity.py                      |   61 +
 fhirclient/models/questionnaire.py                 |  488 ++++
 fhirclient/models/questionnaire_tests.py           |  254 +++
 fhirclient/models/questionnaireresponse.py         |  264 +++
 fhirclient/models/questionnaireresponse_tests.py   |  759 +++++++
 fhirclient/models/range.py                         |   49 +
 fhirclient/models/ratio.py                         |   50 +
 fhirclient/models/reference.py                     |   52 +
 fhirclient/models/referralrequest.py               |  222 ++
 fhirclient/models/referralrequest_tests.py         |   60 +
 fhirclient/models/relatedartifact.py               |   75 +
 fhirclient/models/relatedperson.py                 |  129 ++
 fhirclient/models/relatedperson_tests.py           |  146 ++
 fhirclient/models/requestgroup.py                  |  392 ++++
 fhirclient/models/requestgroup_tests.py            |  117 +
 fhirclient/models/researchstudy.py                 |  213 ++
 fhirclient/models/researchstudy_tests.py           |   39 +
 fhirclient/models/researchsubject.py               |   92 +
 fhirclient/models/researchsubject_tests.py         |   42 +
 fhirclient/models/resource.py                      |   59 +
 fhirclient/models/riskassessment.py                |  217 ++
 fhirclient/models/riskassessment_tests.py          |  186 ++
 fhirclient/models/sampleddata.py                   |   75 +
 fhirclient/models/schedule.py                      |  101 +
 fhirclient/models/schedule_tests.py                |  110 +
 fhirclient/models/searchparameter.py               |  215 ++
 fhirclient/models/searchparameter_tests.py         |  129 ++
 fhirclient/models/sequence.py                      |  414 ++++
 fhirclient/models/sequence_tests.py                |  368 +++
 fhirclient/models/servicedefinition.py             |  206 ++
 fhirclient/models/servicedefinition_tests.py       |   47 +
 fhirclient/models/signature.py                     |   90 +
 fhirclient/models/slot.py                          |  113 +
 fhirclient/models/slot_tests.py                    |  121 +
 fhirclient/models/specimen.py                      |  292 +++
 fhirclient/models/specimen_tests.py                |  152 ++
 fhirclient/models/structuredefinition.py           |  315 +++
 fhirclient/models/structuredefinition_tests.py     |  211 ++
 fhirclient/models/structuremap.py                  |  830 +++++++
 fhirclient/models/structuremap_tests.py            |   67 +
 fhirclient/models/subscription.py                  |  139 ++
 fhirclient/models/subscription_tests.py            |   80 +
 fhirclient/models/substance.py                     |  175 ++
 fhirclient/models/substance_tests.py               |  170 ++
 fhirclient/models/supplydelivery.py                |  170 ++
 fhirclient/models/supplydelivery_tests.py          |   64 +
 fhirclient/models/supplyrequest.py                 |  215 ++
 fhirclient/models/supplyrequest_tests.py           |   51 +
 fhirclient/models/task.py                          |  785 +++++++
 fhirclient/models/task_tests.py                    |  248 ++
 fhirclient/models/testreport.py                    |  431 ++++
 fhirclient/models/testreport_tests.py              |  100 +
 fhirclient/models/testscript.py                    | 1353 +++++++++++
 fhirclient/models/testscript_tests.py              |  817 +++++++
 fhirclient/models/timing.py                        |  184 ++
 fhirclient/models/triggerdefinition.py             |   87 +
 fhirclient/models/usagecontext.py                  |   74 +
 fhirclient/models/valueset.py                      |  562 +++++
 fhirclient/models/valueset_tests.py                |  294 +++
 fhirclient/models/visionprescription.py            |  207 ++
 fhirclient/models/visionprescription_tests.py      |  112 +
 fhirclient/server.py                               |  309 +++
 fhirclient/server_tests.py                         |   73 +
 fhirclient/test_bundle.json                        |   78 +
 fhirclient/test_contained_resource.json            |  181 ++
 fhirclient/test_metadata_invalid.json              |   57 +
 fhirclient/test_metadata_valid.json                |   70 +
 fhirclient/test_relative_reference.json            |   64 +
 flask_app.py                                       |  114 +
 flaskbeaker.py                                     |   31 +
 generate_models.sh                                 |    9 +
 requirements.txt                                   |    6 +
 requirements_flask_app.txt                         |    8 +
 setup.cfg                                          |    8 +
 setup.py                                           |   56 +
 test_models.sh                                     |   30 +
 tox.ini                                            |   24 +
 319 files changed, 66737 insertions(+)

diff --git a/.bumpversion.cfg b/.bumpversion.cfg
new file mode 100644
index 0000000..dcdaabe
--- /dev/null
+++ b/.bumpversion.cfg
@@ -0,0 +1,4 @@
+[bumpversion]
+current_version = 3.0.0
+files = fhirclient/client.py
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8ccf673
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+*.pyc
+__pycache__
+session_data
+
+# docs
+/docs
+
+# virtualenv
+/env
+/env2
+
+# IDE files
+*.sublime-*
+
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..073348c
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "fhir-parser"]
+	path = fhir-parser
+	url = https://github.com/smart-on-fhir/fhir-parser.git
diff --git a/AUTHORS.md b/AUTHORS.md
new file mode 100644
index 0000000..33b333f
--- /dev/null
+++ b/AUTHORS.md
@@ -0,0 +1,18 @@
+Credits
+=======
+
+“fhirclient” is written and maintained by the SMART Platforms Team / Boston Children's Hospital.
+
+
+Contributors
+------------
+
+The following wonderful people contributed directly or indirectly to this project:
+
+- Erik Wiffin <https://github.com/erikwiffin>
+- Josh Mandel <https://github.com/jmandel>
+- Nikolai Schwertner <https://github.com/nschwertner>
+- Pascal Pfiffner <https://github.com/p2>
+- Trinadh Baranika <https://github.com/bktrinadh>
+
+Please add yourself here alphabetically when you submit your first pull request.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..9f014cc
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,37 @@
+How To Contribute
+=================
+
+Every open source project lives from the generous help by contributors and fhirclient is no different.
+
+To make participation as pleasant as possible, this project adheres to the [Code of Conduct][] by the Python Software Foundation.
+
+Here are a few hints and rules to get you started:
+
+- Add yourself to the [`AUTHORS.md`][AUTHORS.md] file in an alphabetical fashion.
+  Every contribution is valuable and shall be credited.
+- No contribution is too small; please submit as many fixes for typos and grammar bloopers as you can!
+- Don’t **ever** break backward compatibility.
+  If it ever **has** to happen for higher reasons, fhirclient will follow the proven [procedures][] of the Twisted project.
+- **Always** add tests and docs for your code.
+  This is a hard rule; patches with missing tests or documentation won’t be merged.
+  If a feature is not tested or documented, it doesn’t exist.
+- Obey [_PEP 8_][pep8] and [_PEP 257_][pep257].
+- Write [good commit messages][].
+- Ideally, [squash][] your commits, i.e. make your pull requests just one commit.
+
+If you have something great but aren’t sure whether it adheres -- or even can adhere -- to the rules above: **please submit a pull request anyway**!
+In the best case, we can mold it into something, in the worst case the pull request gets politely closed.
+There’s absolutely nothing to fear.
+
+Thank you for considering to contribute to fhirclient!
+If you have any question or concerns, feel free to reach out to us at
+<https://groups.google.com/forum/#!forum/smart-on-fhir>
+
+
+[Code of Conduct]: http://www.python.org/psf/codeofconduct/
+[pep8]: http://www.python.org/dev/peps/pep-0008/
+[pep257]: http://www.python.org/dev/peps/pep-0257/
+[good commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
+[squash]: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
+[AUTHORS.md]: https://github.com/smart-on-fhir/client-py/blob/master/AUTHORS.md
+[procedures]: http://twistedmatrix.com/trac/wiki/CompatibilityPolicy
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 0000000..282a03e
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,2391 @@
+# Doxyfile 1.8.8
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "SMART on FHIR Python Client"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         = 3.0.0
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          = 
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO           = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = ./docs
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES    = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                = 
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            = 
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES         = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  = fhirclient fhirclient/models README.md AUTHORS.md CONTRIBUTING.md
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.d \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.f90 \
+                         *.f \
+                         *.for \
+                         *.vhd \
+                         *.vhdl
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        = *.py=Doxyfilter
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS = 
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE = README.md
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = NO
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
+# cost of reduced performance. This can be particularly helpful with template
+# rich C++ code for which doxygen's built-in parser lacks the necessary type
+# information.
+# Note: The availability of this option depends on whether or not doxygen was
+# compiled with the --with-libclang option.
+# The default value is: NO.
+
+CLANG_ASSISTED_PARSING = NO
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_OPTIONS          = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        = 
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra stylesheet files is of importance (e.g. the last
+# stylesheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  = Doxystyle.css
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       = 
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 200
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 140
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 78
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               = 
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           = 
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     = 
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           = 
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = YES
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = YES
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     = 
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       = 
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       = 
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     = 
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string,
+# for the replacement values of the other commands the user is refered to
+# HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           = 
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           = 
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR             = 
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            = 
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               = 
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT               = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           = 
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           = 
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           = 
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+PLANTUML_JAR_PATH      = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES
diff --git a/Doxyfilter b/Doxyfilter
new file mode 100755
index 0000000..34a803e
--- /dev/null
+++ b/Doxyfilter
@@ -0,0 +1,2 @@
+#!/bin/bash
+python -m doxypypy.doxypypy -a -c $1
diff --git a/Doxystyle.css b/Doxystyle.css
new file mode 100644
index 0000000..83c70d4
--- /dev/null
+++ b/Doxystyle.css
@@ -0,0 +1,85 @@
+/* Style overrides for our docs. */
+
+body, table, div, p, dl {
+	font: 12pt/15pt "Open Sans", Calibri, Candara, Arial, sans-serif;
+}
+
+pre, pre.fragment {
+	font-size: 11pt;
+}
+
+hr {
+	margin-top: 2em; padding-top: 1em;
+	border-top: 1px solid #B9B9B9;
+}
+
+/* Header */
+#titlearea {
+	padding: 0.5em 1em;
+	color: white;
+	border: none;
+	background: #6bb1d3;
+}
+#projectname {
+	font: inherit; font-size: 2em;
+}
+#MSearchBox {
+	right: 1em; top: 2em;
+}
+#MSearchField {
+	font: inherit;
+}
+
+/* Sidebar */
+#nav-tree .selected {
+	text-shadow: none;
+	background: #6bb1d3;
+}
+#nav-tree .label {
+	font: inherit;
+}
+.ui-resizable-e {
+	background: #6bb1d3;
+}
+
+/* Main */
+div.header {
+	background-image: none;
+}
+div.ah {
+	margin: 0; padding: 0;
+	color: black; font-size: 1.2em;
+	border: none;
+	background: transparent;
+	box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;
+}
+
+h2.groupheader {
+	padding: inherit;
+	border: none;
+}
+.memproto {
+	background: #F8FBFD;
+	text-shadow: none;
+	box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;
+}
+.memdoc {
+	border-top: 1px solid #B9B9B9;
+	background: white;
+	box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;
+}
+span.mlabel {
+	font-size: 0.85em;
+	border: none;
+}
+
+/* Footer */
+.navpath ul {
+	padding: 1.5em 0;
+	color: white; font-size: small;
+	border: none;
+	background: #230a39;
+}
+.navpath li.navelem a, .navpath li.footer {
+	color: white; font: inherit; font-size: inherit; text-shadow: none;
+}
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..2169c47
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,13 @@
+Copyright 2015 Boston Children's Hospital
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..8bd3bb6
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1 @@
+include *.md LICENSE
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7aecf3b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,221 @@
+SMART FHIR Client
+=================
+
+This is _fhirclient_, a flexible Python client for [FHIR][] servers supporting the [SMART on FHIR][smart] protocol.
+The client is compatible with Python 2.7.10 and Python 3.
+
+Client versioning is not identical to FHIR versioning.
+The `master` branch is usually on the latest version of the client as shown below, possibly on bugfix releases thereof.
+The `develop` branch should be on recent freezes, and the `feature/latest-ci` branch is periodically updated to the latest FHIR continuous integration builds.
+
+   Version |          FHIR |  
+-----------|---------------|---------
+ **3.0.0** |       `3.0.0` | (STU-3)
+   **x.x** |       `1.8.0` | (STU-3 Ballot, Jan 2017)
+   **x.x** |       `1.6.0` | (STU-3 Ballot, Sep 2016)
+ **1.0.3** |       `1.0.2` | (DSTU 2)
+   **1.0** |       `1.0.1` | (DSTU 2)
+   **0.5** |  `0.5.0.5149` | (DSTU 2 Ballot, May 2015)
+ **0.0.4** | `0.0.82.2943` | (DSTU 1)
+ **0.0.3** | `0.0.82.2943` | (DSTU 1)
+ **0.0.2** | `0.0.82.2943` | (DSTU 1)
+
+
+Installation
+------------
+
+    pip install fhirclient
+
+
+Documentation
+-------------
+
+Technical documentation is available at [docs.smarthealthit.org/client-py/][docs].
+
+### Client Use
+
+To connect to a SMART on FHIR server (or any open FHIR server), you can use the `FHIRClient` class.
+It will initialize and handle a `FHIRServer` instance, your actual handle to the FHIR server you'd like to access.
+
+##### Read Data from Server
+
+To read a given patient from an open FHIR server, you can use:
+
+```python
+from fhirclient import client
+settings = {
+    'app_id': 'my_web_app',
+    'api_base': 'https://fhir-open-api-dstu2.smarthealthit.org'
+}
+smart = client.FHIRClient(settings=settings)
+
+import fhirclient.models.patient as p
+patient = p.Patient.read('hca-pat-1', smart.server)
+patient.birthDate.isostring
+# '1963-06-12'
+smart.human_name(patient.name[0])
+# 'Christy Ebert'
+```
+
+If this is a protected server, you will first have to send your user to the authorize endpoint to log in.
+Just call `smart.authorize_url` to obtain the correct URL.
+You can use `smart.prepare()`, which will return `False` if the server is protected and you need to authorize.
+The `smart.ready` property has the same purpose, it will however not retrieve the server's _CapabilityStatement_ resource and hence is only useful as a quick check whether the server instance is ready.
+
+```python
+smart = client.FHIRClient(settings=settings)
+smart.ready
+# prints `False`
+smart.prepare()
+# prints `True` after fetching CapabilityStatement
+smart.ready
+# prints `True`
+smart.prepare()
+# prints `True` immediately
+smart.authorize_url
+# is `None`
+```
+
+You can work with the `FHIRServer` class directly, without using `FHIRClient`, but this is not recommended:
+
+```python
+smart = server.FHIRServer(None, 'https://fhir-open-api-dstu2.smarthealthit.org')
+import fhirclient.models.patient as p
+patient = p.Patient.read('hca-pat-1', smart)
+patient.name[0].given
+# ['Christy']
+```
+
+##### Search Records on Server
+
+You can also search for resources matching a particular set of criteria:
+
+```python
+smart = client.FHIRClient(settings=settings)
+import fhirclient.models.procedure as p
+search = p.Procedure.where(struct={'subject': 'hca-pat-1', 'status': 'completed'})
+procedures = search.perform_resources(smart.server)
+for procedure in procedures:
+    procedure.as_json()
+    # {'status': u'completed', 'code': {'text': u'Lumpectomy w/ SN', ...
+
+# to get the raw Bundle instead of resources only, you can use:
+bundle = search.perform(smart.server)
+```
+
+### Data Model Use
+
+The client contains data model classes, built using [fhir-parser][], that handle (de)serialization and allow to work with FHIR data in a Pythonic way.
+Starting with version 1.0.5, data model validity are enforced to a certain degree.
+
+#### Initialize Data Model
+
+```python
+import fhirclient.models.patient as p
+import fhirclient.models.humanname as hn
+patient = p.Patient({'id': 'patient-1'})
+patient.id
+# prints `patient-1`
+
+name = hn.HumanName()
+name.given = ['Peter']
+name.family = ['Parker']
+patient.name = [name]
+patient.as_json()
+# prints patient's JSON representation, now with id and name
+
+name.given = 'Peter'
+patient.as_json()
+# throws FHIRValidationError:
+# {root}:
+#   name:
+#     given:
+#       Expecting property "given" on <class 'fhirclient.models.humanname.HumanName'> to be list, but is <class 'str'>
+```
+
+#### Initialize from JSON file
+
+```python
+import json
+import fhirclient.models.patient as p
+with open('path/to/patient.json', 'r') as h:
+    pjs = json.load(h)
+patient = p.Patient(pjs)
+patient.name[0].given
+# prints patient's given name array in the first `name` property
+```
+
+### Flask App
+
+Take a look at [`flask_app.py`][flask_app] to see how you can use the client in a simple (Flask) app.
+This app starts a webserver, listening on [_localhost:8000_](http://localhost:8000), and prompts you to login to our sandbox server and select a patient.
+It then goes on to retrieve the selected patient's demographics and med prescriptions and lists them in a simple HTML page.
+
+The Flask demo app has separate requirements.
+Clone the _client-py_ repository, then best create a virtual environment and install the needed packages like so:
+
+    git clone https://github.com/smart-on-fhir/client-py.git
+    cd client-py
+    virtualenv -p python3 env
+    . env/bin/activate
+    pip install -r requirements_flask_app.txt
+    python flask_app.py
+
+
+Building Distribution
+---------------------
+
+    pip install -r requirements.txt
+    python setup.py sdist
+    python setup.py bdist_wheel
+
+
+### Incrementing the lib version
+
+    bumpversion patch
+    bumpversion minor
+    bumpversion major
+
+
+Docs Generation
+---------------
+
+Docs are generated with [Doxygen][] and [doxypypy][].
+You can install doxypypy via pip: `pip install doxypypy`.
+Then you can just run Doxygen, configuration is stored in the `Doxyfile`.
+
+Running Doxygen will put the generated documentation into `docs`, the HTML files into `docs/html`.
+Those files make up the content of the `gh-pages` branch.
+I usually perform a second checkout of the _gh-pages_ branch and copy the html files over, with:
+
+    doxygen
+    rsync -a docs/html/ ../client-py-web/
+
+
+PyPi Publishing (notes for SMART team)
+--------------------------------------
+
+Using setuptools (*Note*: Alternatively, you can use twine https://pypi.python.org/pypi/twine/):
+
+### Make sure that you have the PyPi account credentials in your account
+
+    copy server.smarthealthit.org:/home/fhir/.pypirc to ~/.pypirc
+
+### Test the build
+
+    python setup.py sdist
+    python setup.py bdist_wheel
+
+### Upload the packages to PyPi
+
+    python setup.py sdist upload -r pypi
+    python setup.py bdist_wheel upload -r pypi
+
+
+[fhir]: http://www.hl7.org/implement/standards/fhir/
+[smart]: http://docs.smarthealthit.org
+[fhir-parser]: https://github.com/smart-on-fhir/fhir-parser
+[docs]: https://smart-on-fhir.github.io/client-py
+[flask_app]: https://github.com/smart-on-fhir/client-py/blob/master/flask_app.py
+[doxygen]: http://www.stack.nl/~dimitri/doxygen
+[doxypypy]: https://github.com/Feneric/doxypypy
diff --git a/fhir-parser-resources/fhirabstractbase.py b/fhir-parser-resources/fhirabstractbase.py
new file mode 100644
index 0000000..27ce44f
--- /dev/null
+++ b/fhir-parser-resources/fhirabstractbase.py
@@ -0,0 +1,357 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Base class for all FHIR elements.
+
+import sys
+import logging
+
+logger = logging.getLogger(__name__)
+
+
+class FHIRValidationError(Exception):
+    """ Exception raised when one or more errors occurred during model
+    validation.
+    """
+    
+    def __init__(self, errors, path=None):
+        """ Initializer.
+        
+        :param errors: List of Exception instances. Also accepts a string,
+            which is converted to a TypeError.
+        :param str path: The property path on the object where errors occurred
+        """
+        if not isinstance(errors, list):
+            errors = [TypeError(errors)]
+        msgs = "\n  ".join([str(e).replace("\n", "\n  ") for e in errors])
+        message = "{}:\n  {}".format(path or "{root}", msgs)
+        
+        super(FHIRValidationError, self).__init__(message)
+        
+        self.errors = errors
+        """ A list of validation errors encountered. Typically contains
+        TypeError, KeyError, possibly AttributeError and others. """
+        
+        self.path = path
+        """ The path on the object where the errors occurred. """
+    
+    def prefixed(self, path_prefix):
+        """ Creates a new instance of the receiver, with the given path prefix
+        applied. """
+        path = '{}.{}'.format(path_prefix, self.path) if self.path is not None else path_prefix
+        return self.__class__(self.errors, path)
+
+
+class FHIRAbstractBase(object):
+    """ Abstract base class for all FHIR elements.
+    """
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initializer. If strict is true, raises on errors, otherwise uses
+        `logger.warning()`.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self._resolved = None
+        """ Dictionary of resolved resources. """
+        
+        self._owner = None
+        """ Points to the parent resource, if there is one. """
+        
+        if jsondict is not None:
+            if strict:
+                self.update_with_json(jsondict)
+            else:
+                try:
+                    self.update_with_json(jsondict)
+                except FHIRValidationError as e:
+                    for err in e.errors:
+                        logger.warning(err)
+    
+    
+    # MARK: Instantiation from JSON
+    
+    @classmethod
+    def with_json(cls, jsonobj):
+        """ Initialize an element from a JSON dictionary or array.
+        
+        If the JSON dictionary has a "resourceType" entry and the specified
+        resource type is not the receiving classes type, uses
+        `FHIRElementFactory` to return a correct class instance.
+        
+        :raises: TypeError on anything but dict or list of dicts
+        :raises: FHIRValidationError if instantiation fails
+        :param jsonobj: A dict or list of dicts to instantiate from
+        :returns: An instance or a list of instances created from JSON data
+        """
+        if isinstance(jsonobj, dict):
+            return cls._with_json_dict(jsonobj)
+        
+        if isinstance(jsonobj, list):
+            arr = []
+            for jsondict in jsonobj:
+                try:
+                    arr.append(cls._with_json_dict(jsondict))
+                except FHIRValidationError as e:
+                    raise e.prefixed(str(len(arr)))
+            return arr
+        
+        raise TypeError("`with_json()` on {} only takes dict or list of dict, but you provided {}"
+            .format(cls, type(jsonobj)))
+    
+    @classmethod
+    def _with_json_dict(cls, jsondict):
+        """ Internal method to instantiate from JSON dictionary.
+        
+        :raises: TypeError on anything but dict
+        :raises: FHIRValidationError if instantiation fails
+        :returns: An instance created from dictionary data
+        """
+        if not isinstance(jsondict, dict):
+            raise TypeError("Can only use `_with_json_dict()` on {} with a dictionary, got {}"
+                .format(type(self), type(jsondict)))
+        return cls(jsondict)
+    
+    @classmethod
+    def with_json_and_owner(cls, jsonobj, owner):
+        """ Instantiates by forwarding to `with_json()`, then remembers the
+        "owner" of the instantiated elements. The "owner" is the resource
+        containing the receiver and is used to resolve contained resources.
+        
+        :raises: TypeError on anything but dict or list of dicts
+        :raises: FHIRValidationError if instantiation fails
+        :param dict jsonobj: Decoded JSON dictionary (or list thereof)
+        :param FHIRElement owner: The owning parent
+        :returns: An instance or a list of instances created from JSON data
+        """
+        instance = cls.with_json(jsonobj)
+        if isinstance(instance, list):
+            for inst in instance:
+                inst._owner = owner
+        else:
+            instance._owner = owner
+        
+        return instance
+    
+    
+    # MARK: (De)Serialization
+    
+    def elementProperties(self):
+        """ Returns a list of tuples, one tuple for each property that should
+        be serialized, as: ("name", "json_name", type, is_list, "of_many", not_optional)
+        """
+        return []
+    
+    def update_with_json(self, jsondict):
+        """ Update the receiver with data in a JSON dictionary.
+        
+        :raises: FHIRValidationError on validation errors
+        :param dict jsondict: The JSON dictionary to use to update the receiver
+        :returns: None on success, a list of errors if there were errors
+        """
+        if jsondict is None:
+            return
+        
+        if not isinstance(jsondict, dict):
+            raise FHIRValidationError("Non-dict type {} fed to `update_with_json` on {}"
+                .format(type(jsondict), type(self)))
+        
+        # loop all registered properties and instantiate
+        errs = []
+        valid = set(['resourceType'])   # used to also contain `fhir_comments` until STU-3
+        found = set()
+        nonoptionals = set()
+        for name, jsname, typ, is_list, of_many, not_optional in self.elementProperties():
+            valid.add(jsname)
+            if of_many is not None:
+                valid.add(of_many)
+            
+            # bring the value in shape
+            err = None
+            value = jsondict.get(jsname)
+            if value is not None and hasattr(typ, 'with_json_and_owner'):
+                try:
+                    value = typ.with_json_and_owner(value, self)
+                except Exception as e:
+                    value = None
+                    err = e
+            
+            # got a value, test if it is of required type and assign
+            if value is not None:
+                testval = value
+                if is_list:
+                    if not isinstance(value, list):
+                        err = TypeError("Wrong type {} for list property \"{}\" on {}, expecting a list of {}"
+                            .format(type(value), name, type(self), typ))
+                        testval = None
+                    else:
+                        testval = value[0] if value and len(value) > 0 else None
+                
+                if testval is not None and not self._matches_type(testval, typ):
+                    err = TypeError("Wrong type {} for property \"{}\" on {}, expecting {}"
+                        .format(type(testval), name, type(self), typ))
+                else:
+                    setattr(self, name, value)
+                
+                found.add(jsname)
+                if of_many is not None:
+                    found.add(of_many)
+            
+            # not optional and missing, report (we clean `of_many` later on)
+            elif not_optional:
+                nonoptionals.add(of_many or jsname)
+            
+            # TODO: look at `_name` only if this is a primitive!
+            _jsname = '_'+jsname
+            _value = jsondict.get(_jsname)
+            if _value is not None:
+                valid.add(_jsname)
+                found.add(_jsname)
+            
+            # report errors
+            if err is not None:
+                errs.append(err.prefixed(name) if isinstance(err, FHIRValidationError) else FHIRValidationError([err], name))
+        
+        # were there missing non-optional entries?
+        if len(nonoptionals) > 0:
+            for miss in nonoptionals - found:
+                errs.append(KeyError("Non-optional property \"{}\" on {} is missing"
+                    .format(miss, self)))
+        
+        # were there superfluous dictionary keys?
+        if len(set(jsondict.keys()) - valid) > 0:
+            for supflu in set(jsondict.keys()) - valid:
+                errs.append(AttributeError("Superfluous entry \"{}\" in data for {}"
+                    .format(supflu, self)))
+        
+        if len(errs) > 0:
+            raise FHIRValidationError(errs)
+    
+    def as_json(self):
+        """ Serializes to JSON by inspecting `elementProperties()` and creating
+        a JSON dictionary of all registered properties. Checks:
+        
+        - whether required properties are not None (and lists not empty)
+        - whether not-None properties are of the correct type
+        
+        :raises: FHIRValidationError if properties have the wrong type or if
+            required properties are empty
+        :returns: A validated dict object that can be JSON serialized
+        """
+        js = {}
+        errs = []
+        
+        # JSONify all registered properties
+        found = set()
+        nonoptionals = set()
+        for name, jsname, typ, is_list, of_many, not_optional in self.elementProperties():
+            if not_optional:
+                nonoptionals.add(of_many or jsname)
+            
+            err = None
+            value = getattr(self, name)
+            if value is None:
+                continue
+            
+            if is_list:
+                if not isinstance(value, list):
+                   err = TypeError("Expecting property \"{}\" on {} to be list, but is {}"
+                       .format(name, type(self), type(value)))
+                elif len(value) > 0:
+                    if not self._matches_type(value[0], typ):
+                        err = TypeError("Expecting property \"{}\" on {} to be {}, but is {}"
+                            .format(name, type(self), typ, type(value[0])))
+                    else:
+                        lst = []
+                        for v in value:
+                            try:
+                                lst.append(v.as_json() if hasattr(v, 'as_json') else v)
+                            except FHIRValidationError as e:
+                                err = e.prefixed(str(len(lst))).prefixed(name)
+                        found.add(of_many or jsname)
+                        js[jsname] = lst
+            else:
+                if not self._matches_type(value, typ):
+                    err = TypeError("Expecting property \"{}\" on {} to be {}, but is {}"
+                        .format(name, type(self), typ, type(value)))
+                else:
+                    try:
+                        found.add(of_many or jsname)
+                        js[jsname] = value.as_json() if hasattr(value, 'as_json') else value
+                    except FHIRValidationError as e:
+                        err = e.prefixed(name)
+            
+            if err is not None:
+                errs.append(err if isinstance(err, FHIRValidationError) else FHIRValidationError([err], name))
+        
+        # any missing non-optionals?
+        if len(nonoptionals - found) > 0:
+            for nonop in nonoptionals - found:
+                errs.append(KeyError("Property \"{}\" on {} is not optional, you must provide a value for it"
+                    .format(nonop, self)))
+        
+        if len(errs) > 0:
+            raise FHIRValidationError(errs)
+        return js
+    
+    def _matches_type(self, value, typ):
+        if value is None:
+            return True
+        if isinstance(value, typ):
+            return True
+        if int == typ or float == typ:
+            return (isinstance(value, int) or isinstance(value, float))
+        if (sys.version_info < (3, 0)) and (str == typ or unicode == typ):
+            return (isinstance(value, str) or isinstance(value, unicode))
+        return False
+    
+    
+    # MARK: Handling References
+    
+    def owningResource(self):
+        """ Walks the owner hierarchy and returns the next parent that is a
+        `DomainResource` instance.
+        """
+        owner = self._owner
+        while owner is not None and not hasattr(owner, "contained"):
+            owner = owner._owner
+        return owner
+    
+    def owningBundle(self):
+        """ Walks the owner hierarchy and returns the next parent that is a
+        `Bundle` instance.
+        """
+        owner = self._owner
+        while owner is not None and not 'Bundle' == owner.resource_type:
+            owner = owner._owner
+        return owner
+    
+    def resolvedReference(self, refid):
+        """ Returns the resolved reference with the given id, if it has been
+        resolved already. If it hasn't, forwards the call to its owner if it
+        has one.
+        
+        You should probably use `resolve()` on the `FHIRReference` itself.
+        
+        :param refid: The id of the resource to resolve
+        :returns: An instance of `Resource`, if it was found
+        """
+        if self._resolved and refid in self._resolved:
+            return self._resolved[refid]
+        return self._owner.resolvedReference(refid) if self._owner is not None else None
+    
+    def didResolveReference(self, refid, resolved):
+        """ Called by `FHIRResource` when it resolves a reference. Stores the
+        resolved reference into the `_resolved` dictionary.
+        
+        :param refid: The id of the resource that was resolved
+        :param refid: The resolved resource, ready to be cached
+        """
+        if self._resolved is not None:
+            self._resolved[refid] = resolved
+        else:
+            self._resolved = {refid: resolved}
+
diff --git a/fhir-parser-resources/fhirabstractresource.py b/fhir-parser-resources/fhirabstractresource.py
new file mode 100644
index 0000000..e6fc1a6
--- /dev/null
+++ b/fhir-parser-resources/fhirabstractresource.py
@@ -0,0 +1,197 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Base class for FHIR resources.
+#  2014, SMART Health IT.
+
+from . import fhirabstractbase
+
+
+class FHIRAbstractResource(fhirabstractbase.FHIRAbstractBase):
+    """ Extends the FHIRAbstractBase with server talking capabilities.
+    """
+    resource_type = 'FHIRAbstractResource'
+    
+    def __init__(self, jsondict=None, strict=True):
+        self._server = None
+        """ The server the instance was read from. """
+        
+        # raise if "resourceType" does not match
+        if jsondict is not None and 'resourceType' in jsondict \
+            and jsondict['resourceType'] != self.resource_type:
+            raise Exception("Attempting to instantiate {} with resource data that defines a resourceType of \"{}\""
+                .format(self.__class__, jsondict['resourceType']))
+        
+        super(FHIRAbstractResource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    @classmethod
+    def _with_json_dict(cls, jsondict):
+        """ Overridden to use a factory if called when "resourceType" is
+        defined in the JSON but does not match the receiver's resource_type.
+        """
+        if not isinstance(jsondict, dict):
+            raise Exception("Cannot use this method with anything but a JSON dictionary, got {}"
+                .format(jsondict))
+        
+        res_type = jsondict.get('resourceType')
+        if res_type and res_type != cls.resource_type:
+            return fhirelementfactory.FHIRElementFactory.instantiate(res_type, jsondict)
+        return super(FHIRAbstractResource, cls)._with_json_dict(jsondict)
+    
+    def as_json(self):
+        js = super(FHIRAbstractResource, self).as_json()
+        js['resourceType'] = self.resource_type
+        return js
+    
+    
+    # MARK: Handling Paths
+    
+    def relativeBase(self):
+        return self.__class__.resource_type
+    
+    def relativePath(self):
+        if self.id is None:
+            return self.relativeBase()
+        return "{}/{}".format(self.relativeBase(), self.id)
+    
+    
+    # MARK: - Server Connection
+    
+    @property
+    def server(self):
+        """ Walks the owner hierarchy until it finds an owner with a server.
+        """
+        if self._server is None:
+            owningRes = self.owningResource()
+            self._server = owningRes.server if owningRes is not None else None
+        return self._server
+    
+    @classmethod
+    def read(cls, rem_id, server):
+        """ Read the resource with the given id from the given server. The
+        passed-in server instance must support a `request_json()` method call,
+        taking a relative path as first (and only mandatory) argument.
+        
+        :param str rem_id: The id of the resource on the remote server
+        :param FHIRServer server: An instance of a FHIR server or compatible class
+        :returns: An instance of the receiving class
+        """
+        if not rem_id:
+            raise Exception("Cannot read resource without remote id")
+        
+        path = '{}/{}'.format(cls.resource_type, rem_id)
+        instance = cls.read_from(path, server)
+        instance._local_id = rem_id
+        
+        return instance
+    
+    @classmethod
+    def read_from(cls, path, server):
+        """ Requests data from the given REST path on the server and creates
+        an instance of the receiving class.
+        
+        :param str path: The REST path to read from
+        :param FHIRServer server: An instance of a FHIR server or compatible class
+        :returns: An instance of the receiving class
+        """
+        if not path:
+            raise Exception("Cannot read resource without REST path")
+        if server is None:
+            raise Exception("Cannot read resource without server instance")
+        
+        ret = server.request_json(path)
+        instance = cls(jsondict=ret)
+        instance._server = server
+        return instance
+    
+    def create(self, server):
+        """ Attempt to create the receiver on the given server, using a POST
+        command.
+        
+        :param FHIRServer server: The server to create the receiver on
+        :returns: None or the response JSON on success
+        """
+        srv = server or self.server
+        if srv is None:
+            raise Exception("Cannot create a resource without a server")
+        if self.id:
+            raise Exception("This resource already has an id, cannot create")
+        
+        ret = srv.post_json(self.relativeBase(), self.as_json())
+        if len(ret.text) > 0:
+            return ret.json()
+        return None
+    
+    def update(self, server=None):
+        """ Update the receiver's representation on the given server, issuing
+        a PUT command.
+        
+        :param FHIRServer server: The server to update the receiver on;
+            optional, will use the instance's `server` if needed.
+        :returns: None or the response JSON on success
+        """
+        srv = server or self.server
+        if srv is None:
+            raise Exception("Cannot update a resource that does not have a server")
+        if not self.id:
+            raise Exception("Cannot update a resource that does not have an id")
+        
+        ret = srv.put_json(self.relativePath(), self.as_json())
+        if len(ret.text) > 0:
+            return ret.json()
+        return None
+    
+    def delete(self, server=None):
+        """ Delete the receiver from the given server with a DELETE command.
+        
+        :param FHIRServer server: The server to update the receiver on;
+            optional, will use the instance's `server` if needed.
+        :returns: None or the response JSON on success
+        """
+        srv = server or self.server
+        if srv is None:
+            raise Exception("Cannot delete a resource that does not have a server")
+        if not self.id:
+            raise Exception("Cannot delete a resource that does not have an id")
+        
+        ret = srv.delete_json(self.relativePath())
+        if len(ret.text) > 0:
+            return ret.json()
+        return None
+    
+    
+    # MARK: - Search
+    
+    def search(self, struct=None):
+        """ Search can be started via a dictionary containing a search
+        construct.
+        
+        Calling this method with a search struct will return a `FHIRSearch`
+        object representing the search struct, with "$type" and "id" added.
+        
+        :param dict struct: An optional search structure
+        :returns: A FHIRSearch instance
+        """
+        if struct is None:
+            struct = {'$type': self.__class__.resource_type}
+        if self._local_id is not None or self.id is not None:
+            struct['id'] = self._local_id or self.id
+        return self.__class__.where(struct)
+    
+    @classmethod
+    def where(cls, struct):
+        """ Search can be started via a dictionary containing a search
+        construct.
+        
+        Calling this method with a search struct will return a `FHIRSearch`
+        object representing the search struct
+        
+        :param dict struct: A search structure
+        :returns: A FHIRSearch instance
+        """
+        return fhirsearch.FHIRSearch(cls, struct)
+
+
+from . import fhirdate
+from . import fhirsearch
+from . import fhirelementfactory
diff --git a/fhir-parser-resources/fhircontainedresource.py b/fhir-parser-resources/fhircontainedresource.py
new file mode 100644
index 0000000..cf67b5c
--- /dev/null
+++ b/fhir-parser-resources/fhircontainedresource.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Class to hold contained resources until they are resolved.
+
+
+class FHIRContainedResource(object):
+    """ Class to hold contained resources until they are resolved.
+    
+    The id of contained resources will be referenced from their parents as URL
+    fragment, meaning "med1" will be referenced as "#med1". FHIRReference
+    handles id normalization.
+    
+    http://hl7.org/implement/standards/fhir/references.html#contained
+    """
+    
+    def __init__(self, jsondict=None, owner=None):
+        self.id = None
+        self.type = None
+        self.json = None
+        self.owner = owner
+        
+        if jsondict is not None:
+            self.update_with_json(jsondict)
+    
+    def update_with_json(self, jsondict):
+        if jsondict is not None:
+            self.id = jsondict.get('id')
+            self.type = jsondict.get('resourceType')
+            self.json = jsondict
+    
+    def as_json(self):
+        return self.json
diff --git a/fhir-parser-resources/fhirdate.py b/fhir-parser-resources/fhirdate.py
new file mode 100644
index 0000000..1ac29e8
--- /dev/null
+++ b/fhir-parser-resources/fhirdate.py
@@ -0,0 +1,81 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Facilitate working with dates.
+#  2014, SMART Health IT.
+
+import sys
+import logging
+import isodate
+import datetime
+
+logger = logging.getLogger(__name__)
+
+
+class FHIRDate(object):
+    """ Facilitate working with dates.
+    
+    - `date`: datetime object representing the receiver's date-time
+    """
+    
+    def __init__(self, jsonval=None):
+        self.date = None
+        if jsonval is not None:
+            isstr = isinstance(jsonval, str)
+            if not isstr and sys.version_info[0] < 3:       # Python 2.x has 'str' and 'unicode'
+                isstr = isinstance(jsonval, basestring)
+            if not isstr:
+                raise TypeError("Expecting string when initializing {}, but got {}"
+                    .format(type(self), type(jsonval)))
+            try:
+                if 'T' in jsonval:
+                    self.date = isodate.parse_datetime(jsonval)
+                else:
+                    self.date = isodate.parse_date(jsonval)
+            except Exception as e:
+                logger.warning("Failed to initialize FHIRDate from \"{}\": {}"
+                    .format(jsonval, e))
+        
+        self.origval = jsonval
+    
+    def __setattr__(self, prop, value):
+        if 'date' == prop:
+            self.origval = None
+        object.__setattr__(self, prop, value)
+    
+    @property
+    def isostring(self):
+        if self.date is None:
+            return None
+        if isinstance(self.date, datetime.datetime):
+            return isodate.datetime_isoformat(self.date)
+        return isodate.date_isoformat(self.date)
+    
+    @classmethod
+    def with_json(cls, jsonobj):
+        """ Initialize a date from an ISO date string.
+        """
+        isstr = isinstance(jsonobj, str)
+        if not isstr and sys.version_info[0] < 3:       # Python 2.x has 'str' and 'unicode'
+            isstr = isinstance(jsonobj, basestring)
+        if isstr:
+            return cls(jsonobj)
+        
+        if isinstance(jsonobj, list):
+            return [cls(jsonval) for jsonval in jsonobj]
+        
+        raise TypeError("`cls.with_json()` only takes string or list of strings, but you provided {}"
+            .format(type(jsonobj)))
+    
+    @classmethod
+    def with_json_and_owner(cls, jsonobj, owner):
+        """ Added for compatibility reasons to FHIRElement; "owner" is
+        discarded.
+        """
+        return cls.with_json(jsonobj)
+    
+    def as_json(self):
+        if self.origval is not None:
+            return self.origval
+        return self.isostring
+    
diff --git a/fhir-parser-resources/fhirreference.py b/fhir-parser-resources/fhirreference.py
new file mode 100644
index 0000000..d389bdc
--- /dev/null
+++ b/fhir-parser-resources/fhirreference.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Subclassing FHIR's reference to add resolving capabilities
+
+import logging
+from . import reference
+
+logger = logging.getLogger(__name__)
+
+
+class FHIRReference(reference.Reference):
+    """ Subclassing FHIR's `Reference` resource to add resolving capabilities.
+    """
+    
+    def resolved(self, klass):
+        """ Resolves the reference and caches the result, returning instance(s)
+        of the referenced classes.
+        
+        :param klass: The expected class of the resource
+        :returns: An instance (or list thereof) of the resolved reference if
+            dereferencing was successful, `None` otherwise
+        """
+        owning_resource = self.owningResource()
+        if owning_resource is None:
+            raise Exception("Cannot resolve reference without having an owner (which must be a `DomainResource`)")
+        if klass is None:
+            raise Exception("Cannot resolve reference without knowing the class")
+        
+        refid = self.processedReferenceIdentifier()
+        if not refid:
+            logger.warning("No `reference` set, cannot resolve")
+            return None
+        
+        # already resolved and cached?
+        resolved = owning_resource.resolvedReference(refid)
+        if resolved is not None:
+            if isinstance(resolved, klass):
+                return resolved
+            logger.warning("Referenced resource {} is not a {} but a {}".format(refid, klass, resolved.__class__))
+            return None
+        
+        # not yet resolved, see if it's a contained resource
+        if owning_resource.contained is not None:
+            for contained in owning_resource.contained:
+                if contained.id == refid:
+                    owning_resource.didResolveReference(refid, contained)
+                    if isinstance(contained, klass):
+                        return contained
+                    logger.warning("Contained resource {} is not a {} but a {}".format(refid, klass, contained.__class__))
+                    return None
+        
+        # are we in a bundle?
+        ref_is_relative = '://' not in self.reference and 'urn:' != self.reference[:4]
+        bundle = self.owningBundle()
+        while bundle is not None:
+            if bundle.entry is not None:
+                fullUrl = self.reference
+                if ref_is_relative:
+                    base = bundle.server.base_uri if bundle.server else ''
+                    fullUrl = base + self.reference
+                
+                for entry in bundle.entry:
+                    if entry.fullUrl == fullUrl:
+                        found = entry.resource
+                        if isinstance(found, klass):
+                            return found
+                        logger.warning("Bundled resource {} is not a {} but a {}".format(refid, klass, found.__class__))
+                        return None
+            bundle = bundle.owningBundle()
+        
+        # relative references, use the same server
+        server = None
+        if ref_is_relative:
+            server = owning_resource.server if owning_resource else None
+        
+        # TODO: instantiate server for absolute resource
+        if server is None:
+            logger.warning("Not implemented: resolving absolute reference to resource {}"
+                .format(self.reference))
+            return None
+        
+        # fetch remote resource; unable to verify klass since we use klass.read_from()
+        relative = klass.read_from(self.reference, server)
+        owning_resource.didResolveReference(refid, relative)
+        return relative
+    
+    def processedReferenceIdentifier(self):
+        """ Normalizes the reference-id.
+        """
+        if self.reference and '#' == self.reference[0]:
+            return self.reference[1:]
+        return self.reference
+
diff --git a/fhir-parser-resources/fhirsearch.py b/fhir-parser-resources/fhirsearch.py
new file mode 100644
index 0000000..1fc5108
--- /dev/null
+++ b/fhir-parser-resources/fhirsearch.py
@@ -0,0 +1,270 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Create FHIR search params from NoSQL-like query structures.
+#  2014, SMART Health IT.
+
+try:
+    from urllib import quote_plus
+except Exception as e:
+    from urllib.parse import quote_plus
+
+
+class FHIRSearch(object):
+    """ Create a FHIR search from NoSQL-like query structures.
+    """
+    
+    def __init__(self, resource_type, struct=None):
+        self.resource_type = resource_type
+        """ The resource type class. """
+        
+        self.params = []
+        """ FHIRSearchParam instances. """
+        
+        self.wants_expand = False
+        """ Used internally; whether or not `params` must be expanded first. """
+        
+        if struct is not None:
+            if dict != type(struct):
+                raise Exception("Must pass a Python dictionary, but got a {}".format(type(struct)))
+            self.wants_expand = True
+            for key, val in struct.items():
+                self.params.append(FHIRSearchParam(key, val))
+    
+    
+    # MARK: Execution
+    
+    def construct(self):
+        """ Constructs the URL with query string from the receiver's params.
+        """
+        if self.resource_type is None:
+            raise Exception("Need resource_type set to construct a search query")
+        
+        parts = []
+        if self.params is not None:
+            for param in self.params:
+                if self.wants_expand:
+                    for expanded in param.handle():
+                        parts.append(expanded.as_parameter())
+                else:
+                    parts.append(param.as_parameter())
+        
+        return '{}?{}'.format(self.resource_type.resource_type, '&'.join(parts))
+    
+    def perform(self, server):
+        """ Construct the search URL and execute it against the given server.
+        
+        :param server: The server against which to perform the search
+        :returns: A Bundle resource
+        """
+        if server is None:
+            raise Exception("Need a server to perform search")
+        
+        from . import bundle
+        res = server.request_json(self.construct())
+        bundle = bundle.Bundle(res)
+        bundle._server = server
+        return bundle
+    
+    def perform_resources(self, server):
+        """ Performs the search by calling `perform`, then extracts all Bundle
+        entries and returns a list of Resource instances.
+        
+        :param server: The server against which to perform the search
+        :returns: A list of Resource instances
+        """
+        bundle = self.perform(server)
+        resources = []
+        if bundle is not None and bundle.entry is not None:
+            for entry in bundle.entry:
+                resources.append(entry.resource)
+            
+        return resources
+
+
+class FHIRSearchParam(object):
+    """ Holds one search parameter.
+    
+    The instance's `value` can either be a string value or a search construct
+    dictionary. In the latter case the class's `handle` method must be called
+    to arrive at search parameter instances that can be converted into a URL
+    query.
+    """
+    
+    def __init__(self, name, value):
+        self.name = name
+        self.value = value
+    
+    def copy(self):
+        clone = object.__new__(self.__class__)
+        clone.__dict__ = self.__dict__.copy()
+        return clone
+    
+    def handle(self):
+        """ Parses the receiver's value and returns a list of FHIRSearchParam
+        instances. Needs only be called if the param needs to be handled, i.e.
+        its value is a query structure.
+        
+        :returns: A list with one or more FHIRSearchParam instances, not
+        altering the receiver
+        """
+        handler = FHIRSearchParamHandler.handler_for(self.name)(None, self.value)
+        return handler.handle(self.copy())
+    
+    def as_parameter(self):
+        """ Return a string that represents the reciever as "key=value".
+        """
+        return '{}={}'.format(self.name, quote_plus(self.value, safe=',<=>'))
+
+
+class FHIRSearchParamHandler(object):
+    handles = None
+    handlers = []
+    
+    @classmethod
+    def announce_handler(cls, handler):
+        cls.handlers.append(handler)
+    
+    @classmethod
+    def handler_for(cls, key):
+        for handler in cls.handlers:
+            if handler.can_handle(key):
+                return handler
+        return cls
+    
+    @classmethod
+    def can_handle(cls, key):
+        if cls.handles is not None:
+            return key in cls.handles
+        return True         # base class handles everything else, so be sure to test it last!
+    
+    
+    def __init__(self, key, value):
+        self.key = key
+        self.value = value
+        self.modifier = []
+        self.multiplier = []
+    
+    def handle(self, param):
+        """ Applies all handlers to the given search parameter.
+        :returns: A list of one or more new `FHIRSearchParam` instances
+        """
+        self.prepare()
+        return self.expand(param)
+    
+    def prepare(self, parent=None):
+        """ Creates sub-handlers as needed, then prepares the receiver.
+        """
+        if dict == type(self.value):
+            for key, val in self.value.items():
+                handler = FHIRSearchParamHandler.handler_for(key)(key, val)
+                handler.prepare(self)
+        
+        if parent is not None:
+            parent.multiplier.append(self)
+    
+    def expand(self, param):
+        """ Executes the receiver's modifier and multiplier on itself, applying
+        changes to the given search param instance.
+        
+        :returns: A list of one or more FHIRSearchParam instances
+        """
+        for handler in self.modifier:
+            handler.expand(param)
+        
+        self.apply(param)
+        
+        # if we have multiplier, expand sequentially
+        if len(self.multiplier) > 0:
+            expanded = []
+            for handler in self.multiplier:
+                clone = param.copy()
+                expanded.extend(handler.expand(clone))
+            
+            return expanded
+        
+        # no multiplier, just return the passed-in paramater
+        return [param]
+    
+    def apply(self, param):
+        if self.key is not None:
+            param.name = '{}.{}'.format(param.name, self.key)
+        if 0 == len(self.multiplier):
+            param.value = self.value
+
+
+class FHIRSearchParamModifierHandler(FHIRSearchParamHandler):
+    modifiers = {
+        '$asc': ':asc',
+        '$desc': ':desc',
+        '$exact': ':exact',
+        '$missing': ':missing',
+        '$null': ':missing',
+        '$text': ':text',
+    }
+    handles = modifiers.keys()
+    
+    def apply(self, param):
+        if self.key not in self.__class__.modifiers:
+            raise Exception('Unknown modifier "{}" for "{}"'.format(self.key, param.name))
+        param.name += self.__class__.modifiers[self.key]
+        param.value = self.value
+
+
+class FHIRSearchParamOperatorHandler(FHIRSearchParamHandler):
+    operators = {
+        '$gt': '>',
+        '$lt': '<',
+        '$lte': '<=',
+        '$gte': '>=',
+    }
+    handles = operators.keys()
+    
+    def apply(self, param):
+        if self.key not in self.__class__.operators:
+            raise Exception('Unknown operator "{}" for "{}"'.format(self.key, parent.name))
+        param.value = self.__class__.operators[self.key] + self.value
+
+
+class FHIRSearchParamMultiHandler(FHIRSearchParamHandler):
+    handles = ['$and', '$or']
+    
+    def prepare(self, parent):
+        if list != type(self.value):
+            raise Exception('Expecting a list argument for "{}" but got {}'.format(parent.key, self.value))
+        
+        handlers = []
+        for val in self.value:
+            if dict == type(val):
+                for kkey, vval in val.items():
+                    handlers.append(FHIRSearchParamHandler.handler_for(kkey)(kkey, vval))
+            else:
+                handlers.append(FHIRSearchParamHandler.handler_for(parent.key)(None, val))
+        
+        if '$and' == self.key:
+            for handler in handlers:
+                handler.prepare(parent)
+        elif '$or' == self.key:
+            ors = [h.value for h in handlers]
+            handler = FHIRSearchParamHandler.handler_for(parent.key)(None, ','.join(ors))
+            handler.prepare(parent)
+        else:
+            raise Exception('I cannot handle "{}"'.format(self.key))
+
+
+class FHIRSearchParamTypeHandler(FHIRSearchParamHandler):
+    handles = ['$type']
+    
+    def prepare(self, parent):
+        parent.modifier.append(self)
+    
+    def apply(self, param):
+        param.name = '{}:{}'.format(param.name, self.value)
+    
+
+# announce all handlers
+FHIRSearchParamHandler.announce_handler(FHIRSearchParamModifierHandler)
+FHIRSearchParamHandler.announce_handler(FHIRSearchParamOperatorHandler)
+FHIRSearchParamHandler.announce_handler(FHIRSearchParamMultiHandler)
+FHIRSearchParamHandler.announce_handler(FHIRSearchParamTypeHandler)
+
diff --git a/fhir-parser-resources/fhirsearch_tests.py b/fhir-parser-resources/fhirsearch_tests.py
new file mode 100644
index 0000000..57b0f15
--- /dev/null
+++ b/fhir-parser-resources/fhirsearch_tests.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from models.fhirsearch import FHIRSearch
+
+if '__main__' == __name__:
+    from models.patient import Patient
+    print('1 '+FHIRSearch(Patient, {'name': 'Willis'}).construct())
+    print('1 '+Patient.where({'name': 'Willis'}).construct())
+    # print('1 '+Patient.where().name('Willis').construct())
+    print('= Patient?name=Willis')
+    print('')
+    print('2 '+FHIRSearch(Patient, {'name': {'$exact': 'Willis'}}).construct())
+    print('= Patient?name:exact=Willis')
+    print('')
+    print('3 '+FHIRSearch(Patient, {'name': {'$or': ['Willis', 'Wayne', 'Bruce']}}).construct())
+    print('= Patient?name=Willis,Wayne,Bruce')
+    print('')
+    print('4 '+FHIRSearch(Patient, {'name': {'$and': ['Willis', {'$exact': 'Bruce'}]}}).construct())
+    print('= Patient?name=Willis&name:exact=Bruce')
+    print('')
+    print('5 '+FHIRSearch(Patient, {'birthDate': {'$gt': '1950', '$lte': '1970'}}).construct())
+    print('= Patient?birthDate=>1950&birthDate=<=1970')
+    print('')
+    print('6 '+FHIRSearch(Patient, {'subject.name': {'$exact': 'Willis'}}).construct())
+    print('= Patient?subject.name:exact=Willis')
+    print('')
+    srch = FHIRSearch(Patient, {'subject': {'$type': 'Patient', 'name': 'Willis', 'birthDate': {'$gt': '1950', '$lte': '1970'}}})
+    print('7 '+srch.construct())
+    srch = Patient.where({'subject': {'$type': 'Patient', 'name': 'Willis', 'birthDate': {'$gt': '1950', '$lte': '1970'}}})
+    print('7 '+srch.construct())
+    print('= Patient?subject:Patient.name=Willis&subject:Patient.birthDate=>1950&subject:Patient.birthDate=<=1970')
+    print('')
+    print('8 '+FHIRSearch(Patient, {"name": {"$and": ["Willis", {"$exact": "Bruce"}]}, "birthDay": {"$and": [{"$lt": "1970", "$gte": "1950"}]}}).construct())
+    print('= Patient?name=Willis&name:exact=Bruce&birthDay=>=1950&birthDay=<1970')
diff --git a/fhir-parser-resources/fhirsearchelement.py b/fhir-parser-resources/fhirsearchelement.py
new file mode 100644
index 0000000..6f1a8f6
--- /dev/null
+++ b/fhir-parser-resources/fhirsearchelement.py
@@ -0,0 +1,189 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Construct server search parameters.
+#  2014, SMART Health IT.
+
+from . import fhirsearch
+
+
+class FHIRSearchElement(object):
+    """ This class enables pythonic creation of search URL strings.
+    
+    Search elements are designed to be chained together. The first parameter
+    instance in the chain must define `resource_type`, all subsequent params
+    must have their `subject` set to be useful. Upon calling `construct()` on
+    the last item in a chain, all instances are constructed into a URL query:
+    
+    qry = Patient.where().address("Boston").gender('male').given_exact("Willis")
+    
+    Then qry.construct() will create the string:
+    
+    "Patient?address=Boston&gender=male&given:exact=Willis"
+    """
+    
+    def __init__(self, subject):
+        self._previous = None
+        self._next = None
+        
+        self.subject = subject
+        """ The name of the search parameter. """
+        
+        self.resource_type = None
+        """ The first search parameter in a list must define a resource type to
+        which the search is applied. """
+        
+        self.supported_profiles = None
+        """ On which profiles the receiver's subject is supported; can be used
+        for validation. """
+        
+        self.string = None
+        """ The param's value is a string.
+        http://www.hl7.org/implement/standards/fhir/search.html#string """
+        
+        self.token = None
+        """ The param's value is a token. Can be modified with `token_as_text`.
+        http://www.hl7.org/implement/standards/fhir/search.html#token """
+        
+        self.number = None
+        """ The param describes a numerical value.
+        http://www.hl7.org/implement/standards/fhir/search.html#number """
+        
+        self.date = None
+        """ The param's value is a date string.
+        http://www.hl7.org/implement/standards/fhir/search.html#date """
+        
+        self.quantity = None
+        """ The param describes a numerical quantity.
+        http://www.hl7.org/implement/standards/fhir/search.html#quantity """
+        
+        self.reference = None
+        """ The param's value is a reference.
+        http://www.hl7.org/implement/standards/fhir/search.html#reference """
+        
+        self.composite = None
+        """ A composite search parameter.
+        http://www.hl7.org/implement/standards/fhir/search.html#combining """
+        
+        # Modifiers: http://www.hl7.org/implement/standards/fhir/search.html#modifiers
+        
+        self.missing = None
+        """ If `true` we're looking for a missing parameter. """
+        
+        self.string_exact = False
+        """ Only needed for strings; if `true` the match must be exact. """
+        
+        self.token_as_text = False
+        """ Only needed for tokens; if `true` the token should be queried like text. """
+        
+        self.reference_type = None
+        """ Only needed for references: the type of the reference. """
+    
+    
+    # MARK: Construction
+    
+    def as_param(self):
+        """ Returns a FHIRSearchParam instance representing the receiver.
+        """
+        if self.subject:
+            if self.missing is not None:
+                return fhirsearch.FHIRSearchParam('{}:missing'.format(self.subject), 'true' if self.missing else 'false')
+            
+            if self.string and self.string_exact:
+                return fhirsearch.FHIRSearchParam('{}:exact'.format(self.subject), self.param_value())
+            
+            if self.token and self.token_as_text:
+                return fhirsearch.FHIRSearchParam('{}:text'.format(self.subject), self.param_value())
+            
+        return fhirsearch.FHIRSearchParam(self.subject, self.param_value())
+    
+    def param_value(self):
+        """ The value of the parameter. """
+        if self.string:
+            return self.string
+        if self.token:
+            return self.token
+        if self.number:
+            return self.number
+        if self.date:
+            return self.date
+        if self.quantity:
+            return self.quantity
+        if self.reference:
+            return self.reference
+        return ''
+    
+    
+    # MARK: Execution
+    
+    def as_search(self):
+        """ Create a `FHIRSearch` representation of the chain up to the
+        receiver. This is internally used for the `construct` and `perform`
+        calls, which are executed on the FHIRSearch instance created here.
+        """
+        params = []
+        prev = self
+        while prev.previous is not None:
+            params.insert(0, prev.as_param())
+            prev = prev.previous
+        
+        if not prev.resource_type:
+            raise Exception("The first search parameter needs to have \"resource_type\" set")
+        
+        srch = fhirsearch.FHIRSearch(prev.resource_type)
+        srch.params = params
+        return srch
+    
+    def construct(self):
+        """ Construct and return the search query string.
+        
+        Use the `last` method to get the last param of a chain if needed, then
+        call this method to create the parameter string of the whole chain.
+        """
+        return self.as_search().construct()
+    
+    def perform(self, server):
+        """ Construct the search URL, execute it against the given server and
+        return a list of instances created from returned data.
+        """
+        return self.as_search().perform(server)
+    
+    
+    # MARK: Chaning
+    
+    @property
+    def previous(self):
+        return self._previous
+    
+    @previous.setter
+    def previous(self, prev):
+        if self._previous == prev:
+            return
+        if self._previous is not None and self == self._previous.next:
+            self._previous.next = None
+        self._previous = prev
+        prev.next = self
+    
+    @property
+    def next(self):
+        return self._next
+    
+    @next.setter
+    def next(self, nxt):
+        if self._next == nxt:
+            return
+        if self._next is not None and self == self._next.previous:
+            self._next.previous = None
+        self._next = nxt
+        nxt.previous = self
+    
+    def first(self):
+        if self._previous is not None:
+            return self._previous.first()
+        return self
+    
+    def last(self):
+        if self._next is not None:
+            return self._next.last()
+        return self
+    
diff --git a/fhir-parser-resources/settings.py b/fhir-parser-resources/settings.py
new file mode 100644
index 0000000..785b045
--- /dev/null
+++ b/fhir-parser-resources/settings.py
@@ -0,0 +1,40 @@
+# These are settings for the FHIR class generator.
+# All paths are relative to the `fhir-parser` directory. You may want to use
+# os.path.join() if the generator should work on Windows, too.
+
+from Default.settings import *
+
+# Base URL for where to load specification data from
+specification_url = 'http://hl7.org/fhir/STU3'
+
+# In which directory to find the templates. See below for settings that start with `tpl_`: these are the template names.
+tpl_base = '../fhir-parser-resources'
+
+# classes/resources
+write_resources = True
+tpl_resource_target = '../fhirclient/models'    # target directory to write the generated class files to
+tpl_codesystems_source = None                   # the template to use as source when writing enums for CodeSystems; can be `None`
+
+# factory methods
+write_factory = True
+tpl_factory_target = '../fhirclient/models/fhirelementfactory.py'    # where to write the generated factory to
+
+# unit tests
+write_unittests = True
+tpl_unittest_target = '../fhirclient/models'    # target directory to write the generated unit test files to
+
+
+# all these files should be copied to dirname(`tpl_resource_target_ptrn`): tuples of (path/to/file, module, array-of-class-names)
+manual_profiles = [
+    ('../fhir-parser-resources/fhirabstractbase.py', 'fhirabstractbase', [
+        'boolean',
+        'string', 'base64Binary', 'code', 'id',
+        'decimal', 'integer', 'unsignedInt', 'positiveInt',
+        'uri', 'oid', 'uuid',
+        'FHIRAbstractBase',
+    ]),
+    ('../fhir-parser-resources/fhirabstractresource.py', 'fhirabstractresource', ['FHIRAbstractResource']),
+    ('../fhir-parser-resources/fhirreference.py', 'fhirreference', ['FHIRReference']),
+    ('../fhir-parser-resources/fhirdate.py', 'fhirdate', ['date', 'dateTime', 'instant', 'time']),
+    ('../fhir-parser-resources/fhirsearch.py', 'fhirsearch', ['FHIRSearch']),
+]
diff --git a/fhir-parser-resources/template-codesystems.py b/fhir-parser-resources/template-codesystems.py
new file mode 100644
index 0000000..e69de29
diff --git a/fhir-parser-resources/template-elementfactory.py b/fhir-parser-resources/template-elementfactory.py
new file mode 100644
index 0000000..d04a4d2
--- /dev/null
+++ b/fhir-parser-resources/template-elementfactory.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR {{ info.version }} on {{ info.date }}.
+#  {{ info.year }}, SMART Health IT.
+
+
+class FHIRElementFactory(object):
+    """ Factory class to instantiate resources by resource name.
+    """
+    
+    @classmethod
+    def instantiate(cls, resource_type, jsondict):
+        """ Instantiate a resource of the type correlating to "resource_type".
+        
+        :param str resource_type: The name/type of the resource to instantiate
+        :param dict jsondict: The JSON dictionary to use for data
+        :returns: A resource of the respective type or `Element`
+        """
+        {%- for klass in classes %}{% if klass.resource_type %}
+        if "{{ klass.resource_type }}" == resource_type:
+            from . import {{ klass.module }}
+            return {{ klass.module }}.{{ klass.name }}(jsondict)
+        {%- endif %}{% endfor %}
+        from . import element
+        return element.Element(jsondict)
+
diff --git a/fhir-parser-resources/template-resource.py b/fhir-parser-resources/template-resource.py
new file mode 100644
index 0000000..cfc1647
--- /dev/null
+++ b/fhir-parser-resources/template-resource.py
@@ -0,0 +1,80 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR {{ info.version }} ({{ profile.url }}) on {{ info.date }}.
+#  {{ info.year }}, SMART Health IT.
+
+{%- set imported = {} %}
+{%- for klass in classes %}
+
+
+{% if klass.superclass in imports and klass.superclass.module not in imported -%}
+from . import {{ klass.superclass.module }}
+{% set _ = imported.update({klass.superclass.module: True}) %}
+{% endif -%}
+
+class {{ klass.name }}({% if klass.superclass in imports %}{{ klass.superclass.module }}.{% endif -%}
+    {{ klass.superclass.name|default('object')}}):
+    """ {{ klass.short|wordwrap(width=75, wrapstring="\n    ") }}.
+{%- if klass.formal %}
+    
+    {{ klass.formal|wordwrap(width=75, wrapstring="\n    ") }}
+{%- endif %}
+    """
+{%- if klass.resource_type %}
+    
+    resource_type = "{{ klass.resource_type }}"
+{%- endif %}
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+    {%- for prop in klass.properties %}
+        
+        self.{{ prop.name }} = None
+        """ {{ prop.short|wordwrap(67, wrapstring="\n        ") }}.
+        {% if prop.is_array %}List of{% else %}Type{% endif %} `{{ prop.class_name }}`{% if prop.is_array %} items{% endif %}
+        {%- if prop.reference_to_names|length > 0 %} referencing `{{ prop.reference_to_names|join(', ') }}`{% endif %}
+        {%- if prop.json_class != prop.class_name %} (represented as `{{ prop.json_class }}` in JSON){% endif %}. """
+    {%- endfor %}
+        
+        super({{ klass.name }}, self).__init__(jsondict=jsondict, strict=strict)
+    
+{%- if klass.properties %}
+    
+    def elementProperties(self):
+        js = super({{ klass.name }}, self).elementProperties()
+        {%- if 'element' == klass.module and 'Element' == klass.name %}
+        {%- for imp in imports %}{% if imp.module not in imported %}
+        from . import {{ imp.module }}
+        {%- set _ = imported.update({imp.module: True}) %}
+        {%- endif %}{% endfor %}
+        {%- endif %}
+        js.extend([
+        {%- for prop in klass.properties %}
+            ("{{ prop.name }}", "{{ prop.orig_name }}",
+            {%- if prop.module_name %} {{ prop.module_name }}.{% else %} {% endif %}{{ prop.class_name }}, {# #}
+            {{- prop.is_array }},
+            {%- if prop.one_of_many %} "{{ prop.one_of_many }}"{% else %} None{% endif %}, {# #}
+            {{- prop.nonoptional }}),
+        {%- endfor %}
+        ])
+        return js
+    
+{%- endif %}
+{%- endfor %}
+
+{% if imports|length > 0 and imported|length != imports|length %}
+import sys
+{%- endif %}
+{%- for imp in imports %}{% if imp.module not in imported %}
+try:
+    from . import {{ imp.module }}
+except ImportError:
+    {{ imp.module }} = sys.modules[__package__ + '.{{ imp.module }}']
+{%- endif %}{% endfor %}
+
diff --git a/fhir-parser-resources/template-unittest.py b/fhir-parser-resources/template-unittest.py
new file mode 100644
index 0000000..69740f2
--- /dev/null
+++ b/fhir-parser-resources/template-unittest.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR {{ info.version }} on {{ info.date }}.
+#  {{ info.year }}, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import {{ class.module }}
+from .fhirdate import FHIRDate
+
+
+class {{ class.name }}Tests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("{{ class.name }}", js["resourceType"])
+        return {{ class.module }}.{{ class.name }}(js)
+    
+{%- for tcase in tests %}
+    
+    def test{{ class.name }}{{ loop.index }}(self):
+        inst = self.instantiate_from("{{ tcase.filename }}")
+        self.assertIsNotNone(inst, "Must have instantiated a {{ class.name }} instance")
+        self.impl{{ class.name }}{{ loop.index }}(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("{{ class.name }}", js["resourceType"])
+        inst2 = {{ class.module }}.{{ class.name }}(js)
+        self.impl{{ class.name }}{{ loop.index }}(inst2)
+    
+    def impl{{ class.name }}{{ loop.index }}(self, inst):
+    {%- for onetest in tcase.tests %}
+    {%- if "str" == onetest.klass.name %}
+        self.assertEqual(inst.{{ onetest.path }}, "{{ onetest.value|replace('"', '\\"') }}")
+    {%- else %}{% if "int" == onetest.klass.name or "float" == onetest.klass.name or "NSDecimalNumber" == onetest.klass.name %}
+        self.assertEqual(inst.{{ onetest.path }}, {{ onetest.value }})
+    {%- else %}{% if "bool" == onetest.klass.name %}
+        {%- if onetest.value %}
+        self.assertTrue(inst.{{ onetest.path }})
+        {%- else %}
+        self.assertFalse(inst.{{ onetest.path }})
+        {%- endif %}
+    {%- else %}{% if "FHIRDate" == onetest.klass.name %}
+        self.assertEqual(inst.{{ onetest.path }}.date, FHIRDate("{{ onetest.value }}").date)
+        self.assertEqual(inst.{{ onetest.path }}.as_json(), "{{ onetest.value }}")
+    {%- else %}
+        # Don't know how to create unit test for "{{ onetest.path }}", which is a {{ onetest.klass.name }}
+    {%- endif %}{% endif %}{% endif %}{% endif %}
+    {%- endfor %}
+{%- endfor %}
+
+
diff --git a/fhirclient/ValueSet_vs2r.json b/fhirclient/ValueSet_vs2r.json
new file mode 100644
index 0000000..be26973
--- /dev/null
+++ b/fhirclient/ValueSet_vs2r.json
@@ -0,0 +1,33 @@
+{
+  "resourceType": "ValueSet",
+  "id": "vs2r",
+  "name": "Type options for Observation.subject",
+  "status": "active",
+  "description": "Type options for Observation.subject",
+  "expansion": {
+    "identifier": "urn:uuid:5200236f-20ea-40b1-9a6b-b22301238b9c",
+    "timestamp": "2015-10-24T07:43:40+11:00",
+    "contains": [
+      {
+        "system": "http://hl7.org/fhir/resource-types",
+        "code": "Patient",
+        "display": "Patient"
+      },
+      {
+        "system": "http://hl7.org/fhir/resource-types",
+        "code": "Group",
+        "display": "Group"
+      },
+      {
+        "system": "http://hl7.org/fhir/resource-types",
+        "code": "Device",
+        "display": "Device"
+      },
+      {
+        "system": "http://hl7.org/fhir/resource-types",
+        "code": "Location",
+        "display": "Location"
+      }
+    ]
+  }
+}
diff --git a/fhirclient/__init__.py b/fhirclient/__init__.py
new file mode 100644
index 0000000..7b45e76
--- /dev/null
+++ b/fhirclient/__init__.py
@@ -0,0 +1,5 @@
+import sys
+import os.path
+abspath = os.path.abspath(os.path.dirname(__file__))
+if abspath not in sys.path:
+    sys.path.insert(0, abspath)
diff --git a/fhirclient/auth.py b/fhirclient/auth.py
new file mode 100644
index 0000000..8fe6399
--- /dev/null
+++ b/fhirclient/auth.py
@@ -0,0 +1,400 @@
+# -*- coding: utf-8 -*-
+
+import uuid
+import logging
+try:                                # Python 2.x
+    import urlparse
+    from urllib import urlencode
+except Exception as e:              # Python 3
+    import urllib.parse as urlparse
+    from urllib.parse import urlencode
+
+logger = logging.getLogger(__name__)
+
+class FHIRAuth(object):
+    """ Superclass to handle authorization flow and state.
+    """
+    auth_type = 'none'
+    auth_classes = {}
+    
+    @classmethod
+    def register(cls):
+        """ Register this class to handle authorization types of the given
+        type. """
+        if not cls.auth_type:
+            raise Exception('Class {0} does not specify the auth_type it supports'.format(cls))
+        if cls.auth_type not in FHIRAuth.auth_classes:
+            FHIRAuth.auth_classes[cls.auth_type] = cls
+        elif FHIRAuth.auth_classes[cls.auth_type] != cls:
+            raise Exception('Class {0} is already registered for authorization type "{1}"'.format(FHIRAuth.auth_classes[cls.auth_type], cls.auth_type))
+    
+    @classmethod
+    def from_capability_security(cls, security, state=None):
+        """ Supply a capabilitystatement.rest.security statement and this
+        method will figure out which type of security should be instantiated.
+        
+        :param security: A CapabilityStatementRestSecurity instance
+        :param state: A settings/state dictionary
+        :returns: A FHIRAuth instance or subclass thereof
+        """
+        auth_type = None
+        
+        # look for OAuth2 URLs in SMART security extensions
+        if security is not None and security.extension is not None:
+            for e in security.extension:
+                if "http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris" == e.url:
+                    if e.extension is not None:
+                        for ee in e.extension:
+                            if 'token' == ee.url:
+                                state['token_uri'] = ee.valueUri
+                            elif 'authorize' == ee.url:
+                                state['authorize_uri'] = ee.valueUri
+                                auth_type = 'oauth2'
+                            elif 'register' == ee.url:
+                                state['registration_uri'] = ee.valueUri
+                        break
+                    else:
+                        logger.warning("SMART AUTH: invalid `http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris` extension: needs to include sub-extensions to define OAuth2 endpoints but there are none")
+                
+                # fallback to old extension URLs  
+                elif "http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris#register" == e.url:
+                    state['registration_uri'] = e.valueUri
+                elif "http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris#authorize" == e.url:
+                    state['authorize_uri'] = e.valueUri
+                    auth_type = 'oauth2'
+                elif "http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris#token" == e.url:
+                    state['token_uri'] = e.valueUri
+        
+        return cls.create(auth_type, state=state)
+    
+    @classmethod
+    def create(cls, auth_type, state=None):
+        """ Factory method to create the correct subclass for the given
+        authorization type. """
+        if not auth_type:
+            auth_type = 'none'
+        if auth_type in FHIRAuth.auth_classes:
+            klass = FHIRAuth.auth_classes[auth_type]
+            return klass(state=state)
+        raise Exception('No class registered for authorization type "{0}"'.format(auth_type))
+    
+    
+    def __init__(self, state=None):
+        self.app_id = None
+        if state is not None:
+            self.from_state(state)
+    
+    @property
+    def ready(self):
+        """ Indicates whether the authorization part is ready to make
+        resource requests. """
+        return True
+    
+    def reset(self):
+        pass
+    
+    def can_sign_headers(self):
+        return False
+    
+    def authorize_uri(self, server):
+        """ Return the authorize URL to use, if any. """
+        return None
+    
+    def handle_callback(self, url, server):
+        """ Return the launch context. """
+        raise Exception("{0} cannot handle callback URL".format(self))
+    
+    def reauthorize(self):
+        """ Perform a re-authorization of some form.
+        
+        :returns: The launch context dictionary or None on failure
+        """
+        return None
+    
+    
+    # MARK: State
+    
+    @property
+    def state(self):
+        return {
+            'app_id': self.app_id,
+        }
+    
+    def from_state(self, state):
+        """ Update ivars from given state information.
+        """
+        assert state
+        self.app_id = state.get('app_id') or self.app_id
+
+
+class FHIROAuth2Auth(FHIRAuth):
+    """ OAuth2 handling class for FHIR servers.
+    """
+    auth_type = 'oauth2'
+    
+    def __init__(self, state=None):
+        self.aud = None
+        self._registration_uri = None
+        self._authorize_uri = None
+        self._redirect_uri = None
+        self._token_uri = None
+        
+        self.auth_state = None
+        self.app_secret = None
+        self.access_token = None
+        self.refresh_token = None
+        
+        super(FHIROAuth2Auth, self).__init__(state=state)
+    
+    @property
+    def ready(self):
+        return True if self.access_token else False
+    
+    def reset(self):
+        super(FHIROAuth2Auth, self).reset()
+        self.access_token = None
+        self.auth_state = None
+    
+    
+    # MARK: Signing/Authorizing Request Headers
+    
+    def can_sign_headers(self):
+        return True if self.access_token is not None else False
+    
+    def signed_headers(self, headers):
+        """ Returns updated HTTP request headers, if possible, raises if there
+        is no access_token.
+        """
+        if not self.can_sign_headers():
+            raise Exception("Cannot sign headers since I have no access token")
+        
+        if headers is None:
+            headers = {}
+        headers['Authorization'] = "Bearer {0}".format(self.access_token)
+        
+        return headers
+    
+    
+    # MARK: OAuth2 Flow
+    
+    def authorize_uri(self, server):
+        """ The URL to authorize against. The `server` param is supplied so
+        that the server can be informed of state changes that need to be
+        stored.
+        """
+        auth_params = self._authorize_params(server)
+        logger.debug("SMART AUTH: Will use parameters for `authorize_uri`: {0}".format(auth_params))
+        
+        # the authorize uri may have params, make sure to not lose them
+        parts = list(urlparse.urlsplit(self._authorize_uri))
+        if len(parts[3]) > 0:
+            args = urlparse.parse_qs(parts[3])
+            args.update(auth_params)
+            auth_params = args
+        parts[3] = urlencode(auth_params, doseq=True)
+        
+        return urlparse.urlunsplit(parts)
+    
+    def _authorize_params(self, server):
+        """ The URL parameters to use when requesting a token code.
+        """
+        if server is None:
+            raise Exception("Cannot create an authorize-uri without server instance")
+        if self.auth_state is None:
+            self.auth_state = str(uuid.uuid4())[:8]
+            server.should_save_state()
+        
+        params = {
+            'response_type': 'code',
+            'client_id': self.app_id,
+            'redirect_uri': self._redirect_uri,
+            'scope': server.desired_scope,
+            'aud': self.aud,
+            'state': self.auth_state,
+        }
+        if server.launch_token is not None:
+            params['launch'] = server.launch_token
+        return params
+    
+    def handle_callback(self, url, server):
+        """ Verify OAuth2 callback URL and exchange the code, if everything
+        goes well, for an access token.
+        
+        :param str url: The callback/redirect URL to handle
+        :param server: The Server instance to use
+        :returns: The launch context dictionary
+        """
+        logger.debug("SMART AUTH: Handling callback URL")
+        if url is None:
+            raise Exception("No callback URL received")
+        try:
+            args = dict(urlparse.parse_qsl(urlparse.urlsplit(url)[3]))
+        except Exception as e:
+            raise Exception("Invalid callback URL: {0}".format(e))
+        
+        # verify response
+        err = self.extract_oauth_error(args)
+        if err is not None:
+            raise Exception(err)
+        
+        stt = args.get('state')
+        if stt is None or self.auth_state != stt:
+            raise Exception("Invalid state, will not use this code. Have: {0}, want: {1}".format(stt, self.auth_state))
+        
+        code = args.get('code')
+        if code is None:
+            raise Exception("Did not receive a code, only have: {0}".format(', '.join(args.keys())))
+        
+        # exchange code for token
+        exchange = self._code_exchange_params(code)
+        return self._request_access_token(server, exchange)
+    
+    def _code_exchange_params(self, code):
+        """ These parameters are used by to exchange the given code for an
+        access token.
+        """
+        return {
+            'client_id': self.app_id,
+            'code': code,
+            'grant_type': 'authorization_code',
+            'redirect_uri': self._redirect_uri,
+            'state': self.auth_state,
+        }
+    
+    def _request_access_token(self, server, params):
+        """ Requests an access token from the instance's server via a form POST
+        request, remembers the token (and patient id if there is one) or
+        raises an Exception.
+        
+        :returns: A dictionary with launch params
+        """
+        if server is None:
+            raise Exception("I need a server to request an access token")
+        
+        logger.debug("SMART AUTH: Requesting access token from {0}".format(self._token_uri))
+        auth = None
+        if self.app_secret:
+            auth = (self.app_id, self.app_secret)
+        ret_params = server.post_as_form(self._token_uri, params, auth).json()
+        
+        self.access_token = ret_params.get('access_token')
+        if self.access_token is None:
+            raise Exception("No access token received")
+        del ret_params['access_token']
+        
+        if 'expires_in' in ret_params:
+            del ret_params['expires_in']
+        
+        # The refresh token issued by the authorization server. If present, the
+        # app should discard any previous refresh_token associated with this
+        # launch, replacing it with this new value.
+        refresh_token = ret_params.get('refresh_token')
+        if refresh_token is not None:
+            self.refresh_token = refresh_token
+            del ret_params['refresh_token']
+        
+        logger.debug("SMART AUTH: Received access token: {0}, refresh token: {1}"
+            .format(self.access_token is not None, self.refresh_token is not None))
+        return ret_params
+    
+    
+    # MARK: Reauthorization
+    
+    def reauthorize(self, server):
+        """ Perform reauthorization.
+        
+        :param server: The Server instance to use
+        :returns: The launch context dictionary, or None on failure
+        """
+        if self.refresh_token is None:
+            logger.debug("SMART AUTH: Cannot reauthorize without refresh token")
+            return None
+        
+        logger.debug("SMART AUTH: Refreshing token")
+        reauth = self._reauthorize_params()
+        return self._request_access_token(server, reauth)
+    
+    def _reauthorize_params(self):
+        """ Parameters to be used in a reauthorize request.
+        """
+        if self.refresh_token is None:
+            raise Exception("Cannot produce reauthorize parameters without refresh token")
+        return {
+            'client_id': self.app_id,
+            #'client_secret': None,             # we don't use it
+            'grant_type': 'refresh_token',
+            'refresh_token': self.refresh_token,
+        }
+    
+    
+    # MARK: State
+    
+    @property
+    def state(self):
+        s = super(FHIROAuth2Auth, self).state
+        s['aud'] = self.aud
+        s['registration_uri'] = self._registration_uri
+        s['authorize_uri'] = self._authorize_uri
+        s['redirect_uri'] = self._redirect_uri
+        s['token_uri'] = self._token_uri
+        if self.auth_state is not None:
+            s['auth_state'] = self.auth_state
+        if self.app_secret is not None:
+            s['app_secret'] = self.app_secret
+        if self.access_token is not None:
+            s['access_token'] = self.access_token
+        if self.refresh_token is not None:
+            s['refresh_token'] = self.refresh_token
+        
+        return s
+    
+    def from_state(self, state):
+        """ Update ivars from given state information.
+        """
+        super(FHIROAuth2Auth, self).from_state(state)
+        self.aud = state.get('aud') or self.aud
+        self._registration_uri = state.get('registration_uri') or self._registration_uri
+        self._authorize_uri = state.get('authorize_uri') or self._authorize_uri
+        self._redirect_uri = state.get('redirect_uri') or self._redirect_uri
+        self._token_uri = state.get('token_uri') or self._token_uri
+        self.auth_state = state.get('auth_state') or self.auth_state
+        self.app_secret = state.get('app_secret') or self.app_secret
+        
+        self.access_token = state.get('access_token') or self.access_token
+        self.refresh_token = state.get('refresh_token') or self.refresh_token
+    
+
+    # MARK: Utilities    
+    
+    def extract_oauth_error(self, args):
+        """ Check if an argument dictionary contains OAuth error information.
+        """
+        # "error_description" is optional, we prefer it if it's present
+        if 'error_description' in args:
+            return args['error_description'].replace('+', ' ')
+        
+        # the "error" response is required if there are errors, look for it
+        if 'error' in args:
+            err_code = args['error']
+            if 'invalid_request' == err_code:
+                return "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."
+            if 'unauthorized_client' == err_code:
+                return "The client is not authorized to request an access token using this method."
+            if 'access_denied' == err_code:
+                return "The resource owner or authorization server denied the request."
+            if 'unsupported_response_type' == err_code:
+                return "The authorization server does not support obtaining an access token using this method."
+            if 'invalid_scope' == err_code:
+                return "The requested scope is invalid, unknown, or malformed."
+            if 'server_error' == err_code:
+                return "The authorization server encountered an unexpected condition that prevented it from fulfilling the request."
+            if 'temporarily_unavailable' == err_code:
+                return "The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server."
+            return "Authorization error: {0}.".format(err_code)
+        
+        return None
+    
+
+# register classes
+FHIRAuth.register()
+FHIROAuth2Auth.register()
diff --git a/fhirclient/client.py b/fhirclient/client.py
new file mode 100644
index 0000000..a50879e
--- /dev/null
+++ b/fhirclient/client.py
@@ -0,0 +1,229 @@
+# -*- coding: utf-8 -*-
+
+import logging
+
+from server import FHIRServer, FHIRUnauthorizedException, FHIRNotFoundException
+
+__version__ = '3.0.0'
+__author__ = 'SMART Platforms Team'
+__license__ = 'APACHE2'
+__copyright__ = "Copyright 2017 Boston Children's Hospital"
+
+scope_default = 'user/*.* patient/*.read openid profile'
+scope_haslaunch = 'launch'
+scope_patientlaunch = 'launch/patient'
+
+logger = logging.getLogger(__name__)
+
+
+class FHIRClient(object):
+    """ Instances of this class handle authorizing and talking to SMART on FHIR
+    servers.
+    
+    The settings dictionary supports:
+    
+        - `app_id`*: Your app/client-id, e.g. 'my_web_app'
+        - `app_secret`*: Your app/client-secret
+        - `api_base`*: The FHIR service to connect to, e.g. 'https://fhir-api-dstu2.smarthealthit.org'
+        - `redirect_uri`: The callback/redirect URL for your app, e.g. 'http://localhost:8000/fhir-app/' when testing locally
+        - `patient_id`: The patient id against which to operate, if already known
+        - `scope`: Space-separated list of scopes to request, if other than default
+        - `launch_token`: The launch token
+    """
+    
+    def __init__(self, settings=None, state=None, save_func=lambda x:x):
+        self.app_id = None
+        self.app_secret = None
+        """ The app-id for the app this client is used in. """
+        
+        self.server = None
+        self.scope = scope_default
+        self.redirect = None
+        """ The redirect-uri that will be used to redirect after authorization. """
+        
+        self.launch_token = None
+        """ The token/id provided at launch, if any. """
+        
+        self.launch_context = None
+        """ Context parameters supplied by the server during launch. """
+        
+        self.wants_patient = True
+        """ If true and launched without patient, will add the correct scope
+        to indicate that the server should prompt for a patient after login. """
+        
+        self.patient_id = None
+        self._patient = None
+        
+        if save_func is None:
+            raise Exception("Must supply a save_func when initializing the SMART client")
+        self._save_func = save_func
+        
+        # init from state
+        if state is not None:
+            self.from_state(state)
+        
+        # init from settings dict
+        elif settings is not None:
+            if not 'app_id' in settings:
+                raise Exception("Must provide 'app_id' in settings dictionary")
+            if not 'api_base' in settings:
+                raise Exception("Must provide 'api_base' in settings dictionary")
+            
+            self.app_id = settings['app_id']
+            self.app_secret = settings.get('app_secret')
+            self.redirect = settings.get('redirect_uri')
+            self.patient_id = settings.get('patient_id')
+            self.scope = settings.get('scope', self.scope)
+            self.launch_token = settings.get('launch_token')
+            self.server = FHIRServer(self, base_uri=settings['api_base'])
+        else:
+            raise Exception("Must either supply settings or a state upon client initialization")
+    
+    
+    # MARK: Authorization
+    
+    @property
+    def desired_scope(self):
+        """ Ensures `self.scope` is completed with launch scopes, according to
+        current client settings.
+        """
+        scope = self.scope
+        if self.launch_token is not None:
+            scope = ' '.join([scope_haslaunch, scope])
+        elif self.patient_id is None and self.wants_patient:
+            scope = ' '.join([scope_patientlaunch, scope])
+        return scope
+    
+    @property
+    def ready(self):
+        """ Returns True if the client is ready to make API calls (e.g. there
+        is an access token or this is an open server).
+        
+        :returns: True if the server can make authenticated calls
+        """
+        return self.server.ready if self.server is not None else False
+    
+    def prepare(self):
+        """ Returns True if the client is ready to make API calls (e.g. there
+        is an access token or this is an open server). In contrast to the
+        `ready` property, this method will fetch the server's capability
+        statement if it hasn't yet been fetched.
+        
+        :returns: True if the server can make authenticated calls
+        """
+        if self.server:
+            if self.server.ready:
+                return True
+            return self.server.prepare()
+        return False
+    
+    @property
+    def authorize_url(self):
+        """ The URL to use to receive an authorization token.
+        """
+        return self.server.authorize_uri if self.server is not None else None
+    
+    def handle_callback(self, url):
+        """ You can call this to have the client automatically handle the
+        auth callback after the user has logged in.
+        
+        :param str url: The complete callback URL
+        """
+        ctx = self.server.handle_callback(url) if self.server is not None else None
+        self._handle_launch_context(ctx)
+    
+    def reauthorize(self):
+        """ Try to reauthorize with the server.
+        
+        :returns: A bool indicating reauthorization success
+        """
+        ctx = self.server.reauthorize() if self.server is not None else None
+        self._handle_launch_context(ctx)
+        return self.launch_context is not None
+    
+    def _handle_launch_context(self, ctx):
+        logger.debug("SMART: Handling launch context: {0}".format(ctx))
+        if 'patient' in ctx:
+            #print('Patient id was {0}, row context is {1}'.format(self.patient_id, ctx))
+            self.patient_id = ctx['patient']        # TODO: TEST THIS!
+        if 'id_token' in ctx:
+            logger.warning("SMART: Received an id_token, ignoring")
+        self.launch_context = ctx
+        self.save_state()
+    
+    
+    # MARK: Current Patient
+    
+    @property
+    def patient(self):
+        if self._patient is None and self.patient_id is not None and self.ready:
+            import models.patient
+            try:
+                logger.debug("SMART: Attempting to read Patient {0}".format(self.patient_id))
+                self._patient = models.patient.Patient.read(self.patient_id, self.server)
+            except FHIRUnauthorizedException as e:
+                if self.reauthorize():
+                    logger.debug("SMART: Attempting to read Patient {0} after reauthorizing"
+                        .format(self.patient_id))
+                    self._patient = models.patient.Patient.read(self.patient_id, self.server)
+            except FHIRNotFoundException as e:
+                logger.warning("SMART: Patient with id {0} not found".format(self.patient_id))
+                self.patient_id = None
+            self.save_state()
+        
+        return self._patient
+    
+    def human_name(self, human_name_instance):
+        """ Formats a `HumanName` instance into a string.
+        """
+        if human_name_instance is None:
+            return 'Unknown'
+        
+        parts = []
+        for n in [human_name_instance.prefix, human_name_instance.given, human_name_instance.family]:
+            if n is not None:
+                parts.extend(n)
+        if len(human_name_instance.suffix) > 0:
+            if len(parts) > 0:
+                parts[len(parts)-1] = parts[len(parts)-1]+','
+            parts.extend(human_name_instance.suffix)
+        
+        return ' '.join(parts) if len(parts) > 0 else 'Unnamed'
+    
+    
+    # MARK: State
+    
+    def reset_patient(self):
+        self.launch_token = None
+        self.launch_context = None
+        self.patient_id = None
+        self._patient = None
+        self.save_state()
+    
+    @property
+    def state(self):
+        return {
+            'app_id': self.app_id,
+            'app_secret': self.app_secret,
+            'scope': self.scope,
+            'redirect': self.redirect,
+            'patient_id': self.patient_id,
+            'server': self.server.state,
+            'launch_token': self.launch_token,
+            'launch_context': self.launch_context,
+        }
+    
+    def from_state(self, state):
+        assert state
+        self.app_id = state.get('app_id') or self.app_id
+        self.app_secret = state.get('app_secret') or self.app_secret
+        self.scope = state.get('scope') or self.scope
+        self.redirect = state.get('redirect') or self.redirect
+        self.patient_id = state.get('patient_id') or self.patient_id
+        self.launch_token = state.get('launch_token') or self.launch_token
+        self.launch_context = state.get('launch_context') or self.launch_context
+        self.server = FHIRServer(self, state=state.get('server'))
+    
+    def save_state (self):
+        self._save_func(self.state)
+
diff --git a/fhirclient/fhirreference_tests.py b/fhirclient/fhirreference_tests.py
new file mode 100644
index 0000000..57b8b1b
--- /dev/null
+++ b/fhirclient/fhirreference_tests.py
@@ -0,0 +1,134 @@
+# -*- coding: utf-8 -*-
+
+import io
+import json
+import os.path
+import logging
+import unittest
+import models.questionnaire as questionnaire
+import models.medication as medication
+import models.resource as resource
+import models.valueset as valueset
+import models.patient as patient
+import models.bundle as bundle
+import server
+
+
+logging.basicConfig(level=logging.CRITICAL)
+
+
+class TestResourceReference(unittest.TestCase):
+    
+    def testContainedResourceDetection(self):
+        with io.open('test_contained_resource.json', 'r', encoding='utf-8') as h:
+            data = json.load(h)
+        q = questionnaire.Questionnaire(data)
+        self.assertIsNotNone(q, "Must instantiate Questionnaire")
+        self.assertEqual('Questionnaire', q.resource_type)
+        
+        group = q.item[0].item[3]
+        self.assertEqual('Observation.subject', group.linkId)
+        question = group.item[0]
+        self.assertEqual('Observation.subject._type', question.linkId)
+        self.assertIsNotNone(question.options)
+        with self.assertRaises(Exception):
+            question.options.resolved()
+        
+        # 1st resolve, extracting from contained resources
+        contained = question.options.resolved(medication.Medication)
+        self.assertIsNone(contained, "Must not resolve on resource type mismatch")
+        contained = question.options.resolved(valueset.ValueSet)
+        self.assertIsNotNone(contained, "Must resolve contained ValueSet")
+        self.assertEqual('ValueSet', contained.resource_type)
+        self.assertEqual('Type options for Observation.subject', contained.name)
+        
+        # 2nd resolve, should pull from cache
+        contained = question.options.resolved(medication.Medication)
+        self.assertIsNone(contained, "Must not resolve on resource type mismatch")
+        contained = question.options.resolved(resource.Resource)
+        self.assertIsNotNone(contained, "Must resolve contained ValueSet even if requesting `Resource`")
+        contained = question.options.resolved(valueset.ValueSet)
+        self.assertIsNotNone(contained, "Must resolve contained ValueSet")
+        self.assertEqual('ValueSet', contained.resource_type)
+    
+    def testRelativeReference(self):
+        with io.open('test_relative_reference.json', 'r', encoding='utf-8') as h:
+            data = json.load(h)
+        q = questionnaire.Questionnaire(data)
+        self.assertIsNotNone(q, "Must instantiate Questionnaire")
+        self.assertEqual('Questionnaire', q.resource_type)
+        q._server = MockServer()
+        
+        group = q.item[0].item[0]
+        self.assertEqual('Observation.subject', group.linkId)
+        question = group.item[0]
+        self.assertEqual('Observation.subject._type', question.linkId)
+        self.assertIsNotNone(question.options)
+        with self.assertRaises(Exception):
+            question.options.resolved()
+        
+        # resolve relative resource
+        relative = question.options.resolved(valueset.ValueSet)
+        self.assertIsNotNone(relative, "Must resolve relative ValueSet")
+        self.assertEqual('ValueSet', relative.resource_type)
+        self.assertEqual('Type options for Observation.subject', relative.name)
+        
+        # 2nd resolve, should pull from cache
+        relative = question.options.resolved(medication.Medication)
+        self.assertIsNone(relative, "Must not resolve on resource type mismatch")
+        relative = question.options.resolved(resource.Resource)
+        self.assertIsNotNone(relative, "Must resolve relative ValueSet even if requesting `Resource`")
+    
+    def testBundleReferences(self):
+        with io.open('test_bundle.json', 'r', encoding='utf-8') as h:
+            data = json.load(h)
+        b = bundle.Bundle(data)
+        self.assertIsNotNone(b, "Must instantiate Bundle")
+        self.assertEqual('Bundle', b.resource_type)
+        #b._server = MockServer()
+        
+        # get resources
+        pat23 = b.entry[0].resource
+        self.assertEqual('Patient', pat23.resource_type)
+        self.assertEqual('Darth', pat23.name[0].given[0])
+        patURN = b.entry[1].resource
+        self.assertEqual('Patient', patURN.resource_type)
+        self.assertEqual('Ben', patURN.name[0].given[0])
+        obs123 = b.entry[2].resource
+        self.assertEqual('Observation', obs123.resource_type)
+        obs56 = b.entry[3].resource
+        self.assertEqual('Observation', obs56.resource_type)
+        obs34 = b.entry[4].resource
+        self.assertEqual('Observation', obs34.resource_type)
+        
+        # test resolving w/o server (won't work)
+        res = obs123.subject.resolved(patient.Patient)
+        self.assertIsNone(res)
+        
+        # test resolving with server
+        b._server = MockServer()
+        res = obs123.subject.resolved(patient.Patient)
+        self.assertEqual(res, pat23)
+        res = obs123.subject.resolved(medication.Medication)
+        self.assertIsNone(res, "Must not resolve on type mismatch")
+        res = obs56.subject.resolved(patient.Patient)
+        self.assertEqual(res, patURN)
+        res = obs34.subject.resolved(patient.Patient)
+        self.assertIsNone(res, "Must not resolve Patient on same server but different endpoint")
+
+
+class MockServer(server.FHIRServer):
+    """ Reads local files.
+    """
+    
+    def __init__(self):
+        super().__init__(None, base_uri='https://fhir.smarthealthit.org')
+    
+    def request_json(self, path, nosign=False):
+        assert path
+        parts = os.path.split(path)
+        filename = '_'.join(parts) + '.json'
+        with io.open(filename, 'r', encoding='utf-8') as handle:
+            return json.load(handle)
+        return None
+
diff --git a/fhirclient/models/__init__.py b/fhirclient/models/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/fhirclient/models/account.py b/fhirclient/models/account.py
new file mode 100644
index 0000000..58b0036
--- /dev/null
+++ b/fhirclient/models/account.py
@@ -0,0 +1,195 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Account) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Account(domainresource.DomainResource):
+    """ Tracks balance, charges, for patient or cost center.
+    
+    A financial tool for tracking value accrued for a particular purpose.  In
+    the healthcare field, used to track charges for a patient, cost centers,
+    etc.
+    """
+    
+    resource_type = "Account"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Time window that transactions may be posted to this account.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.balance = None
+        """ How much is in account?.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.coverage = None
+        """ The party(s) that are responsible for covering the payment of this
+        account, and what order should they be applied to the account.
+        List of `AccountCoverage` items (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Explanation of purpose/use.
+        Type `str`. """
+        
+        self.guarantor = None
+        """ Responsible for the account.
+        List of `AccountGuarantor` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Account number.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Human-readable label.
+        Type `str`. """
+        
+        self.owner = None
+        """ Who is responsible?.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Transaction window.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | inactive | entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ What is account tied to?.
+        Type `FHIRReference` referencing `Patient, Device, Practitioner, Location, HealthcareService, Organization` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ E.g. patient, expense, depreciation.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(Account, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Account, self).elementProperties()
+        js.extend([
+            ("active", "active", period.Period, False, None, False),
+            ("balance", "balance", money.Money, False, None, False),
+            ("coverage", "coverage", AccountCoverage, True, None, False),
+            ("description", "description", str, False, None, False),
+            ("guarantor", "guarantor", AccountGuarantor, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("owner", "owner", fhirreference.FHIRReference, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class AccountCoverage(backboneelement.BackboneElement):
+    """ The party(s) that are responsible for covering the payment of this account,
+    and what order should they be applied to the account.
+    """
+    
+    resource_type = "AccountCoverage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.coverage = None
+        """ The party(s) that are responsible for covering the payment of this
+        account.
+        Type `FHIRReference` referencing `Coverage` (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ The priority of the coverage in the context of this account.
+        Type `int`. """
+        
+        super(AccountCoverage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AccountCoverage, self).elementProperties()
+        js.extend([
+            ("coverage", "coverage", fhirreference.FHIRReference, False, None, True),
+            ("priority", "priority", int, False, None, False),
+        ])
+        return js
+
+
+class AccountGuarantor(backboneelement.BackboneElement):
+    """ Responsible for the account.
+    
+    Parties financially responsible for the account.
+    """
+    
+    resource_type = "AccountGuarantor"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.onHold = None
+        """ Credit or other hold applied.
+        Type `bool`. """
+        
+        self.party = None
+        """ Responsible entity.
+        Type `FHIRReference` referencing `Patient, RelatedPerson, Organization` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Guarrantee account during.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(AccountGuarantor, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AccountGuarantor, self).elementProperties()
+        js.extend([
+            ("onHold", "onHold", bool, False, None, False),
+            ("party", "party", fhirreference.FHIRReference, False, None, True),
+            ("period", "period", period.Period, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/account_tests.py b/fhirclient/models/account_tests.py
new file mode 100644
index 0000000..6b2fad7
--- /dev/null
+++ b/fhirclient/models/account_tests.py
@@ -0,0 +1,101 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import account
+from .fhirdate import FHIRDate
+
+
+class AccountTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Account", js["resourceType"])
+        return account.Account(js)
+    
+    def testAccount1(self):
+        inst = self.instantiate_from("account-example-with-guarantor.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Account instance")
+        self.implAccount1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Account", js["resourceType"])
+        inst2 = account.Account(js)
+        self.implAccount1(inst2)
+    
+    def implAccount1(self, inst):
+        self.assertEqual(inst.active.end.date, FHIRDate("2016-06-30").date)
+        self.assertEqual(inst.active.end.as_json(), "2016-06-30")
+        self.assertEqual(inst.active.start.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.active.start.as_json(), "2016-01-01")
+        self.assertEqual(inst.balance.code, "USD")
+        self.assertEqual(inst.balance.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.balance.unit, "USD")
+        self.assertEqual(inst.balance.value, -1200)
+        self.assertEqual(inst.coverage[0].priority, 1)
+        self.assertEqual(inst.coverage[1].priority, 2)
+        self.assertEqual(inst.description, "Hospital charges")
+        self.assertFalse(inst.guarantor[0].onHold)
+        self.assertEqual(inst.guarantor[0].period.start.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.guarantor[0].period.start.as_json(), "2016-01-01")
+        self.assertEqual(inst.id, "ewg")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:0.1.2.3.4.5.6.7")
+        self.assertEqual(inst.identifier[0].value, "654321")
+        self.assertEqual(inst.name, "Inpatient: Peter James Chalmers")
+        self.assertEqual(inst.period.end.date, FHIRDate("2016-06-30").date)
+        self.assertEqual(inst.period.end.as_json(), "2016-06-30")
+        self.assertEqual(inst.period.start.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.period.start.as_json(), "2016-01-01")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Inpatient Admission for Peter James Chalmers Account</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "PBILLACCT")
+        self.assertEqual(inst.type.coding[0].display, "patient billing account")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.type.text, "patient")
+    
+    def testAccount2(self):
+        inst = self.instantiate_from("account-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Account instance")
+        self.implAccount2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Account", js["resourceType"])
+        inst2 = account.Account(js)
+        self.implAccount2(inst2)
+    
+    def implAccount2(self, inst):
+        self.assertEqual(inst.active.end.date, FHIRDate("2016-06-30").date)
+        self.assertEqual(inst.active.end.as_json(), "2016-06-30")
+        self.assertEqual(inst.active.start.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.active.start.as_json(), "2016-01-01")
+        self.assertEqual(inst.balance.code, "USD")
+        self.assertEqual(inst.balance.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.balance.unit, "USD")
+        self.assertEqual(inst.balance.value, -1200)
+        self.assertEqual(inst.coverage[0].priority, 1)
+        self.assertEqual(inst.description, "Hospital charges")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:0.1.2.3.4.5.6.7")
+        self.assertEqual(inst.identifier[0].value, "654321")
+        self.assertEqual(inst.name, "HACC Funded Billing for Peter James Chalmers")
+        self.assertEqual(inst.period.end.date, FHIRDate("2016-06-30").date)
+        self.assertEqual(inst.period.end.as_json(), "2016-06-30")
+        self.assertEqual(inst.period.start.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.period.start.as_json(), "2016-01-01")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">HACC Funded Billing for Peter James Chalmers</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "PBILLACCT")
+        self.assertEqual(inst.type.coding[0].display, "patient billing account")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.type.text, "patient")
+
diff --git a/fhirclient/models/activitydefinition.py b/fhirclient/models/activitydefinition.py
new file mode 100644
index 0000000..50056bb
--- /dev/null
+++ b/fhirclient/models/activitydefinition.py
@@ -0,0 +1,366 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ActivityDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ActivityDefinition(domainresource.DomainResource):
+    """ The definition of a specific activity to be taken, independent of any
+    particular patient or context.
+    
+    This resource allows for the definition of some activity to be performed,
+    independent of a particular patient, practitioner, or other performance
+    context.
+    """
+    
+    resource_type = "ActivityDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.approvalDate = None
+        """ When the activity definition was approved by publisher.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.bodySite = None
+        """ What part of body to perform on.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Detail type of activity.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.contributor = None
+        """ A content contributor.
+        List of `Contributor` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the activity definition.
+        Type `str`. """
+        
+        self.dosage = None
+        """ Detailed dosage instructions.
+        List of `Dosage` items (represented as `dict` in JSON). """
+        
+        self.dynamicValue = None
+        """ Dynamic aspects of the definition.
+        List of `ActivityDefinitionDynamicValue` items (represented as `dict` in JSON). """
+        
+        self.effectivePeriod = None
+        """ When the activity definition is expected to be used.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.identifier = None
+        """ Additional identifier for the activity definition.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for activity definition (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.kind = None
+        """ Kind of resource.
+        Type `str`. """
+        
+        self.lastReviewDate = None
+        """ When the activity definition was last reviewed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.library = None
+        """ Logic used by the asset.
+        List of `FHIRReference` items referencing `Library` (represented as `dict` in JSON). """
+        
+        self.location = None
+        """ Where it should happen.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this activity definition (computer friendly).
+        Type `str`. """
+        
+        self.participant = None
+        """ Who should participate in the action.
+        List of `ActivityDefinitionParticipant` items (represented as `dict` in JSON). """
+        
+        self.productCodeableConcept = None
+        """ What's administered/supplied.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.productReference = None
+        """ What's administered/supplied.
+        Type `FHIRReference` referencing `Medication, Substance` (represented as `dict` in JSON). """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this activity definition is defined.
+        Type `str`. """
+        
+        self.quantity = None
+        """ How much is administered/consumed/supplied.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.relatedArtifact = None
+        """ Additional documentation, citations, etc.
+        List of `RelatedArtifact` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.timingDateTime = None
+        """ When activity is to occur.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.timingPeriod = None
+        """ When activity is to occur.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.timingRange = None
+        """ When activity is to occur.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.timingTiming = None
+        """ When activity is to occur.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.title = None
+        """ Name for this activity definition (human friendly).
+        Type `str`. """
+        
+        self.topic = None
+        """ E.g. Education, Treatment, Assessment, etc.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.transform = None
+        """ Transform to apply the template.
+        Type `FHIRReference` referencing `StructureMap` (represented as `dict` in JSON). """
+        
+        self.url = None
+        """ Logical URI to reference this activity definition (globally unique).
+        Type `str`. """
+        
+        self.usage = None
+        """ Describes the clinical usage of the asset.
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the activity definition.
+        Type `str`. """
+        
+        super(ActivityDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ActivityDefinition, self).elementProperties()
+        js.extend([
+            ("approvalDate", "approvalDate", fhirdate.FHIRDate, False, None, False),
+            ("bodySite", "bodySite", codeableconcept.CodeableConcept, True, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("contributor", "contributor", contributor.Contributor, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("dosage", "dosage", dosage.Dosage, True, None, False),
+            ("dynamicValue", "dynamicValue", ActivityDefinitionDynamicValue, True, None, False),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("kind", "kind", str, False, None, False),
+            ("lastReviewDate", "lastReviewDate", fhirdate.FHIRDate, False, None, False),
+            ("library", "library", fhirreference.FHIRReference, True, None, False),
+            ("location", "location", fhirreference.FHIRReference, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("participant", "participant", ActivityDefinitionParticipant, True, None, False),
+            ("productCodeableConcept", "productCodeableConcept", codeableconcept.CodeableConcept, False, "product", False),
+            ("productReference", "productReference", fhirreference.FHIRReference, False, "product", False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("relatedArtifact", "relatedArtifact", relatedartifact.RelatedArtifact, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("timingDateTime", "timingDateTime", fhirdate.FHIRDate, False, "timing", False),
+            ("timingPeriod", "timingPeriod", period.Period, False, "timing", False),
+            ("timingRange", "timingRange", range.Range, False, "timing", False),
+            ("timingTiming", "timingTiming", timing.Timing, False, "timing", False),
+            ("title", "title", str, False, None, False),
+            ("topic", "topic", codeableconcept.CodeableConcept, True, None, False),
+            ("transform", "transform", fhirreference.FHIRReference, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("usage", "usage", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ActivityDefinitionDynamicValue(backboneelement.BackboneElement):
+    """ Dynamic aspects of the definition.
+    
+    Dynamic values that will be evaluated to produce values for elements of the
+    resulting resource. For example, if the dosage of a medication must be
+    computed based on the patient's weight, a dynamic value would be used to
+    specify an expression that calculated the weight, and the path on the
+    intent resource that would contain the result.
+    """
+    
+    resource_type = "ActivityDefinitionDynamicValue"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Natural language description of the dynamic value.
+        Type `str`. """
+        
+        self.expression = None
+        """ An expression that provides the dynamic value for the customization.
+        Type `str`. """
+        
+        self.language = None
+        """ Language of the expression.
+        Type `str`. """
+        
+        self.path = None
+        """ The path to the element to be set dynamically.
+        Type `str`. """
+        
+        super(ActivityDefinitionDynamicValue, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ActivityDefinitionDynamicValue, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("expression", "expression", str, False, None, False),
+            ("language", "language", str, False, None, False),
+            ("path", "path", str, False, None, False),
+        ])
+        return js
+
+
+class ActivityDefinitionParticipant(backboneelement.BackboneElement):
+    """ Who should participate in the action.
+    
+    Indicates who should participate in performing the action described.
+    """
+    
+    resource_type = "ActivityDefinitionParticipant"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.role = None
+        """ E.g. Nurse, Surgeon, Parent, etc.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ patient | practitioner | related-person.
+        Type `str`. """
+        
+        super(ActivityDefinitionParticipant, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ActivityDefinitionParticipant, self).elementProperties()
+        js.extend([
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import contributor
+except ImportError:
+    contributor = sys.modules[__package__ + '.contributor']
+try:
+    from . import dosage
+except ImportError:
+    dosage = sys.modules[__package__ + '.dosage']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
+try:
+    from . import relatedartifact
+except ImportError:
+    relatedartifact = sys.modules[__package__ + '.relatedartifact']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/activitydefinition_tests.py b/fhirclient/models/activitydefinition_tests.py
new file mode 100644
index 0000000..229718e
--- /dev/null
+++ b/fhirclient/models/activitydefinition_tests.py
@@ -0,0 +1,394 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import activitydefinition
+from .fhirdate import FHIRDate
+
+
+class ActivityDefinitionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ActivityDefinition", js["resourceType"])
+        return activitydefinition.ActivityDefinition(js)
+    
+    def testActivityDefinition1(self):
+        inst = self.instantiate_from("activitydefinition-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ActivityDefinition instance")
+        self.implActivityDefinition1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ActivityDefinition", js["resourceType"])
+        inst2 = activitydefinition.ActivityDefinition(js)
+        self.implActivityDefinition1(inst2)
+    
+    def implActivityDefinition1(self, inst):
+        self.assertEqual(inst.approvalDate.date, FHIRDate("2017-03-01").date)
+        self.assertEqual(inst.approvalDate.as_json(), "2017-03-01")
+        self.assertEqual(inst.code.coding[0].code, "306206005")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Referral to service (procedure)")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "415-362-4007")
+        self.assertEqual(inst.contact[0].telecom[1].system, "email")
+        self.assertEqual(inst.contact[0].telecom[1].use, "work")
+        self.assertEqual(inst.contact[0].telecom[1].value, "info at motivemi.com")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].value, "415-362-4007")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].system, "email")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].use, "work")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].value, "info at motivemi.com")
+        self.assertEqual(inst.contributor[0].name, "Motive Medical Intelligence")
+        self.assertEqual(inst.contributor[0].type, "author")
+        self.assertEqual(inst.copyright, "© Copyright 2016 Motive Medical Intelligence. All rights reserved.")
+        self.assertEqual(inst.date.date, FHIRDate("2017-03-03T14:06:00Z").date)
+        self.assertEqual(inst.date.as_json(), "2017-03-03T14:06:00Z")
+        self.assertEqual(inst.description, "refer to primary care mental-health integrated care program for evaluation and treatment of mental health conditions now")
+        self.assertEqual(inst.effectivePeriod.end.date, FHIRDate("2017-12-31").date)
+        self.assertEqual(inst.effectivePeriod.end.as_json(), "2017-12-31")
+        self.assertEqual(inst.effectivePeriod.start.date, FHIRDate("2017-03-01").date)
+        self.assertEqual(inst.effectivePeriod.start.as_json(), "2017-03-01")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "referralPrimaryCareMentalHealth")
+        self.assertEqual(inst.identifier[0].system, "http://motivemi.com/artifacts")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "referralPrimaryCareMentalHealth")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.kind, "ReferralRequest")
+        self.assertEqual(inst.lastReviewDate.date, FHIRDate("2017-03-01").date)
+        self.assertEqual(inst.lastReviewDate.as_json(), "2017-03-01")
+        self.assertEqual(inst.name, "ReferralPrimaryCareMentalHealth")
+        self.assertEqual(inst.participant[0].type, "practitioner")
+        self.assertEqual(inst.publisher, "Motive Medical Intelligence")
+        self.assertEqual(inst.relatedArtifact[0].display, "Practice Guideline for the Treatment of Patients with Major Depressive Disorder")
+        self.assertEqual(inst.relatedArtifact[0].type, "citation")
+        self.assertEqual(inst.relatedArtifact[0].url, "http://psychiatryonline.org/pb/assets/raw/sitewide/practice_guidelines/guidelines/mdd.pdf")
+        self.assertEqual(inst.relatedArtifact[1].type, "predecessor")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Referral to Primary Care Mental Health")
+        self.assertEqual(inst.topic[0].text, "Mental Health Referral")
+        self.assertEqual(inst.url, "http://motivemi.com/artifacts/ActivityDefinition/referralPrimaryCareMentalHealth")
+        self.assertEqual(inst.useContext[0].code.code, "age")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "D000328")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].display, "Adult")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "https://meshb.nlm.nih.gov")
+        self.assertEqual(inst.useContext[1].code.code, "focus")
+        self.assertEqual(inst.useContext[1].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].code, "87512008")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].display, "Mild major depression")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[2].code.code, "focus")
+        self.assertEqual(inst.useContext[2].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].code, "40379007")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].display, "Major depression, recurrent, mild")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[3].code.code, "focus")
+        self.assertEqual(inst.useContext[3].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].code, "225444004")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].display, "At risk for suicide (finding)")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[4].code.code, "focus")
+        self.assertEqual(inst.useContext[4].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].code, "306206005")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].display, "Referral to service (procedure)")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[5].code.code, "user")
+        self.assertEqual(inst.useContext[5].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].code, "309343006")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].display, "Physician")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[6].code.code, "venue")
+        self.assertEqual(inst.useContext[6].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].code, "440655000")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].display, "Outpatient environment")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.version, "1.1.0")
+    
+    def testActivityDefinition2(self):
+        inst = self.instantiate_from("activitydefinition-medicationorder-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ActivityDefinition instance")
+        self.implActivityDefinition2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ActivityDefinition", js["resourceType"])
+        inst2 = activitydefinition.ActivityDefinition(js)
+        self.implActivityDefinition2(inst2)
+    
+    def implActivityDefinition2(self, inst):
+        self.assertEqual(inst.approvalDate.date, FHIRDate("2016-03-12").date)
+        self.assertEqual(inst.approvalDate.as_json(), "2016-03-12")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "415-362-4007")
+        self.assertEqual(inst.contact[0].telecom[1].system, "email")
+        self.assertEqual(inst.contact[0].telecom[1].use, "work")
+        self.assertEqual(inst.contact[0].telecom[1].value, "info at motivemi.com")
+        self.assertEqual(inst.contained[0].id, "citalopramMedication")
+        self.assertEqual(inst.contained[1].id, "citalopramSubstance")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].value, "415-362-4007")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].system, "email")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].use, "work")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].value, "info at motivemi.com")
+        self.assertEqual(inst.contributor[0].name, "Motive Medical Intelligence")
+        self.assertEqual(inst.contributor[0].type, "author")
+        self.assertEqual(inst.copyright, "© Copyright 2016 Motive Medical Intelligence. All rights reserved.")
+        self.assertEqual(inst.date.date, FHIRDate("2015-08-15").date)
+        self.assertEqual(inst.date.as_json(), "2015-08-15")
+        self.assertEqual(inst.description, "Citalopram 20 mg tablet 1 tablet oral 1 time daily now (30 table; 3 refills")
+        self.assertEqual(inst.dosage[0].doseQuantity.unit, "{tbl}")
+        self.assertEqual(inst.dosage[0].doseQuantity.value, 1)
+        self.assertEqual(inst.dosage[0].route.coding[0].code, "26643006")
+        self.assertEqual(inst.dosage[0].route.coding[0].display, "Oral route (qualifier value)")
+        self.assertEqual(inst.dosage[0].route.text, "Oral route (qualifier value)")
+        self.assertEqual(inst.dosage[0].text, "1 tablet oral 1 time daily")
+        self.assertEqual(inst.dosage[0].timing.repeat.frequency, 1)
+        self.assertEqual(inst.dosage[0].timing.repeat.period, 1)
+        self.assertEqual(inst.dosage[0].timing.repeat.periodUnit, "d")
+        self.assertEqual(inst.dynamicValue[0].description, "dispenseRequest.numberOfRepeatsAllowed is three (3)")
+        self.assertEqual(inst.dynamicValue[0].expression, "3")
+        self.assertEqual(inst.dynamicValue[0].language, "text/cql")
+        self.assertEqual(inst.dynamicValue[0].path, "dispenseRequest.numberOfRepeatsAllowed")
+        self.assertEqual(inst.dynamicValue[1].description, "dispenseRequest.quantity is thirty (30) tablets")
+        self.assertEqual(inst.dynamicValue[1].expression, "30 '{tbl}'")
+        self.assertEqual(inst.dynamicValue[1].language, "text/cql")
+        self.assertEqual(inst.dynamicValue[1].path, "dispenseRequest.quantity")
+        self.assertEqual(inst.effectivePeriod.end.date, FHIRDate("2017-12-31").date)
+        self.assertEqual(inst.effectivePeriod.end.as_json(), "2017-12-31")
+        self.assertEqual(inst.effectivePeriod.start.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.effectivePeriod.start.as_json(), "2016-01-01")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "citalopramPrescription")
+        self.assertEqual(inst.identifier[0].system, "http://motivemi.com")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "citalopramPrescription")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.kind, "MedicationRequest")
+        self.assertEqual(inst.lastReviewDate.date, FHIRDate("2016-08-15").date)
+        self.assertEqual(inst.lastReviewDate.as_json(), "2016-08-15")
+        self.assertEqual(inst.name, "CitalopramPrescription")
+        self.assertEqual(inst.publisher, "Motive Medical Intelligence")
+        self.assertEqual(inst.purpose, "Defines a guideline supported prescription for the treatment of depressive disorders")
+        self.assertEqual(inst.relatedArtifact[0].display, "Practice Guideline for the Treatment of Patients with Major Depressive Disorder")
+        self.assertEqual(inst.relatedArtifact[0].type, "citation")
+        self.assertEqual(inst.relatedArtifact[0].url, "http://psychiatryonline.org/pb/assets/raw/sitewide/practice_guidelines/guidelines/mdd.pdf")
+        self.assertEqual(inst.relatedArtifact[1].type, "composed-of")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Citalopram Prescription")
+        self.assertEqual(inst.topic[0].text, "Mental Health Treatment")
+        self.assertEqual(inst.url, "http://motivemi.com/artifacts/ActivityDefinition/citalopramPrescription")
+        self.assertEqual(inst.usage, "This activity definition is used as part of various suicide risk order sets")
+        self.assertEqual(inst.useContext[0].code.code, "age")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "D000328")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].display, "Adult")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "https://meshb.nlm.nih.gov")
+        self.assertEqual(inst.useContext[1].code.code, "focus")
+        self.assertEqual(inst.useContext[1].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].code, "87512008")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].display, "Mild major depression")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[2].code.code, "focus")
+        self.assertEqual(inst.useContext[2].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].code, "40379007")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].display, "Major depression, recurrent, mild")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[3].code.code, "focus")
+        self.assertEqual(inst.useContext[3].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].code, "225444004")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].display, "At risk for suicide (finding)")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[4].code.code, "focus")
+        self.assertEqual(inst.useContext[4].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].code, "306206005")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].display, "Referral to service (procedure)")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[5].code.code, "user")
+        self.assertEqual(inst.useContext[5].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].code, "309343006")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].display, "Physician")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[6].code.code, "venue")
+        self.assertEqual(inst.useContext[6].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].code, "440655000")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].display, "Outpatient environment")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.version, "1.0.0")
+    
+    def testActivityDefinition3(self):
+        inst = self.instantiate_from("activitydefinition-predecessor-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ActivityDefinition instance")
+        self.implActivityDefinition3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ActivityDefinition", js["resourceType"])
+        inst2 = activitydefinition.ActivityDefinition(js)
+        self.implActivityDefinition3(inst2)
+    
+    def implActivityDefinition3(self, inst):
+        self.assertEqual(inst.approvalDate.date, FHIRDate("2016-03-12").date)
+        self.assertEqual(inst.approvalDate.as_json(), "2016-03-12")
+        self.assertEqual(inst.code.coding[0].code, "306206005")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Referral to service (procedure)")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "415-362-4007")
+        self.assertEqual(inst.contact[0].telecom[1].system, "email")
+        self.assertEqual(inst.contact[0].telecom[1].use, "work")
+        self.assertEqual(inst.contact[0].telecom[1].value, "info at motivemi.com")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].value, "415-362-4007")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].system, "email")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].use, "work")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].value, "info at motivemi.com")
+        self.assertEqual(inst.contributor[0].name, "Motive Medical Intelligence")
+        self.assertEqual(inst.contributor[0].type, "author")
+        self.assertEqual(inst.copyright, "© Copyright 2016 Motive Medical Intelligence. All rights reserved.")
+        self.assertEqual(inst.date.date, FHIRDate("2017-03-03T14:06:00Z").date)
+        self.assertEqual(inst.date.as_json(), "2017-03-03T14:06:00Z")
+        self.assertEqual(inst.description, "refer to primary care mental-health integrated care program for evaluation and treatment of mental health conditions now")
+        self.assertEqual(inst.effectivePeriod.end.date, FHIRDate("2017-12-31").date)
+        self.assertEqual(inst.effectivePeriod.end.as_json(), "2017-12-31")
+        self.assertEqual(inst.effectivePeriod.start.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.effectivePeriod.start.as_json(), "2016-01-01")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "referralPrimaryCareMentalHealth-initial")
+        self.assertEqual(inst.identifier[0].system, "http://motivemi.com/artifacts")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "referralPrimaryCareMentalHealth")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.kind, "ReferralRequest")
+        self.assertEqual(inst.lastReviewDate.date, FHIRDate("2016-08-15").date)
+        self.assertEqual(inst.lastReviewDate.as_json(), "2016-08-15")
+        self.assertEqual(inst.name, "ReferralPrimaryCareMentalHealth")
+        self.assertEqual(inst.participant[0].type, "practitioner")
+        self.assertEqual(inst.publisher, "Motive Medical Intelligence")
+        self.assertEqual(inst.relatedArtifact[0].display, "Practice Guideline for the Treatment of Patients with Major Depressive Disorder")
+        self.assertEqual(inst.relatedArtifact[0].type, "citation")
+        self.assertEqual(inst.relatedArtifact[0].url, "http://psychiatryonline.org/pb/assets/raw/sitewide/practice_guidelines/guidelines/mdd.pdf")
+        self.assertEqual(inst.relatedArtifact[1].type, "successor")
+        self.assertEqual(inst.status, "retired")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Referral to Primary Care Mental Health")
+        self.assertEqual(inst.topic[0].text, "Mental Health Referral")
+        self.assertEqual(inst.url, "http://motivemi.com/artifacts/ActivityDefinition/referralPrimaryCareMentalHealth")
+        self.assertEqual(inst.useContext[0].code.code, "age")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "D000328")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].display, "Adult")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "https://meshb.nlm.nih.gov")
+        self.assertEqual(inst.useContext[1].code.code, "focus")
+        self.assertEqual(inst.useContext[1].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].code, "87512008")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].display, "Mild major depression")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[2].code.code, "focus")
+        self.assertEqual(inst.useContext[2].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].code, "40379007")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].display, "Major depression, recurrent, mild")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[3].code.code, "focus")
+        self.assertEqual(inst.useContext[3].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].code, "225444004")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].display, "At risk for suicide (finding)")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[4].code.code, "focus")
+        self.assertEqual(inst.useContext[4].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].code, "306206005")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].display, "Referral to service (procedure)")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[5].code.code, "user")
+        self.assertEqual(inst.useContext[5].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].code, "309343006")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].display, "Physician")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[6].code.code, "venue")
+        self.assertEqual(inst.useContext[6].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].code, "440655000")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].display, "Outpatient environment")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.version, "1.0.0")
+    
+    def testActivityDefinition4(self):
+        inst = self.instantiate_from("activitydefinition-procedurerequest-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ActivityDefinition instance")
+        self.implActivityDefinition4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ActivityDefinition", js["resourceType"])
+        inst2 = activitydefinition.ActivityDefinition(js)
+        self.implActivityDefinition4(inst2)
+    
+    def implActivityDefinition4(self, inst):
+        self.assertEqual(inst.bodySite[0].coding[0].code, "17401000")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Heart valve structure")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.coding[0].code, "34068001")
+        self.assertEqual(inst.code.coding[0].display, "Heart valve replacement")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.description, "Heart valve replacement")
+        self.assertEqual(inst.id, "heart-valve-replacement")
+        self.assertEqual(inst.kind, "ProcedureRequest")
+        self.assertEqual(inst.participant[0].role.coding[0].code, "207RI0011X")
+        self.assertEqual(inst.participant[0].role.coding[0].display, "Interventional Cardiology")
+        self.assertEqual(inst.participant[0].role.coding[0].system, "http://nucc.org/provider-taxonomy")
+        self.assertEqual(inst.participant[0].role.text, "Interventional Cardiology")
+        self.assertEqual(inst.participant[0].type, "practitioner")
+        self.assertEqual(inst.purpose, "Describes the proposal to perform a Heart Valve replacement.")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.topic[0].coding[0].code, "34068001")
+        self.assertEqual(inst.topic[0].coding[0].display, "Heart valve replacement")
+        self.assertEqual(inst.topic[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[0].code.code, "age")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "D000328")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].display, "Adult")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "https://meshb.nlm.nih.gov")
+        self.assertEqual(inst.useContext[1].code.code, "user")
+        self.assertEqual(inst.useContext[1].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].code, "309343006")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].display, "Physician")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+    
+    def testActivityDefinition5(self):
+        inst = self.instantiate_from("activitydefinition-supplyrequest-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ActivityDefinition instance")
+        self.implActivityDefinition5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ActivityDefinition", js["resourceType"])
+        inst2 = activitydefinition.ActivityDefinition(js)
+        self.implActivityDefinition5(inst2)
+    
+    def implActivityDefinition5(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "BlueTubes")
+        self.assertEqual(inst.code.coding[0].display, "Blood collect tubes blue cap")
+        self.assertEqual(inst.description, "10 Blood collect tubes blue cap")
+        self.assertEqual(inst.id, "blood-tubes-supply")
+        self.assertEqual(inst.kind, "SupplyRequest")
+        self.assertEqual(inst.purpose, "Describes a request for 10 Blood collection tubes with blue caps.")
+        self.assertEqual(inst.quantity.value, 10)
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/address.py b/fhirclient/models/address.py
new file mode 100644
index 0000000..5469fda
--- /dev/null
+++ b/fhirclient/models/address.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Address) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Address(element.Element):
+    """ An address expressed using postal conventions (as opposed to GPS or other
+    location definition formats).
+    
+    An address expressed using postal conventions (as opposed to GPS or other
+    location definition formats).  This data type may be used to convey
+    addresses for use in delivering mail as well as for visiting locations
+    which might not be valid for mail delivery.  There are a variety of postal
+    address formats defined around the world.
+    """
+    
+    resource_type = "Address"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.city = None
+        """ Name of city, town etc..
+        Type `str`. """
+        
+        self.country = None
+        """ Country (e.g. can be ISO 3166 2 or 3 letter code).
+        Type `str`. """
+        
+        self.district = None
+        """ District name (aka county).
+        Type `str`. """
+        
+        self.line = None
+        """ Street name, number, direction & P.O. Box etc..
+        List of `str` items. """
+        
+        self.period = None
+        """ Time period when address was/is in use.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.postalCode = None
+        """ Postal code for area.
+        Type `str`. """
+        
+        self.state = None
+        """ Sub-unit of country (abbreviations ok).
+        Type `str`. """
+        
+        self.text = None
+        """ Text representation of the address.
+        Type `str`. """
+        
+        self.type = None
+        """ postal | physical | both.
+        Type `str`. """
+        
+        self.use = None
+        """ home | work | temp | old - purpose of this address.
+        Type `str`. """
+        
+        super(Address, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Address, self).elementProperties()
+        js.extend([
+            ("city", "city", str, False, None, False),
+            ("country", "country", str, False, None, False),
+            ("district", "district", str, False, None, False),
+            ("line", "line", str, True, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("postalCode", "postalCode", str, False, None, False),
+            ("state", "state", str, False, None, False),
+            ("text", "text", str, False, None, False),
+            ("type", "type", str, False, None, False),
+            ("use", "use", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/adverseevent.py b/fhirclient/models/adverseevent.py
new file mode 100644
index 0000000..ecd2be1
--- /dev/null
+++ b/fhirclient/models/adverseevent.py
@@ -0,0 +1,205 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/AdverseEvent) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class AdverseEvent(domainresource.DomainResource):
+    """ Medical care, research study or other healthcare event causing physical
+    injury.
+    
+    Actual or  potential/avoided event causing unintended physical injury
+    resulting from or contributed to by medical care, a research study or other
+    healthcare setting factors that requires additional monitoring, treatment,
+    or hospitalization, or that results in death.
+    """
+    
+    resource_type = "AdverseEvent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ AE | PAE
+        An adverse event is an event that caused harm to a patient,  an
+        adverse reaction is a something that is a subject-specific event
+        that is a result of an exposure to a medication, food, device or
+        environmental substance, a potential adverse event is something
+        that occurred and that could have caused harm to a patient but did
+        not.
+        Type `str`. """
+        
+        self.date = None
+        """ When the event occurred.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Description of the adverse event.
+        Type `str`. """
+        
+        self.eventParticipant = None
+        """ Who  was involved in the adverse event or the potential adverse
+        event.
+        Type `FHIRReference` referencing `Practitioner, Device` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier for the event.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.location = None
+        """ Location where adverse event occurred.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.outcome = None
+        """ resolved | recovering | ongoing | resolvedWithSequelae | fatal |
+        unknown.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reaction = None
+        """ Adverse Reaction Events linked to exposure to substance.
+        List of `FHIRReference` items referencing `Condition` (represented as `dict` in JSON). """
+        
+        self.recorder = None
+        """ Who recorded the adverse event.
+        Type `FHIRReference` referencing `Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.referenceDocument = None
+        """ AdverseEvent.referenceDocument.
+        List of `FHIRReference` items referencing `DocumentReference` (represented as `dict` in JSON). """
+        
+        self.seriousness = None
+        """ Mild | Moderate | Severe.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.study = None
+        """ AdverseEvent.study.
+        List of `FHIRReference` items referencing `ResearchStudy` (represented as `dict` in JSON). """
+        
+        self.subject = None
+        """ Subject or group impacted by event.
+        Type `FHIRReference` referencing `Patient, ResearchSubject, Medication, Device` (represented as `dict` in JSON). """
+        
+        self.subjectMedicalHistory = None
+        """ AdverseEvent.subjectMedicalHistory.
+        List of `FHIRReference` items referencing `Condition, Observation, AllergyIntolerance, FamilyMemberHistory, Immunization, Procedure` (represented as `dict` in JSON). """
+        
+        self.suspectEntity = None
+        """ The suspected agent causing the adverse event.
+        List of `AdverseEventSuspectEntity` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ actual | potential.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(AdverseEvent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AdverseEvent, self).elementProperties()
+        js.extend([
+            ("category", "category", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("eventParticipant", "eventParticipant", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("location", "location", fhirreference.FHIRReference, False, None, False),
+            ("outcome", "outcome", codeableconcept.CodeableConcept, False, None, False),
+            ("reaction", "reaction", fhirreference.FHIRReference, True, None, False),
+            ("recorder", "recorder", fhirreference.FHIRReference, False, None, False),
+            ("referenceDocument", "referenceDocument", fhirreference.FHIRReference, True, None, False),
+            ("seriousness", "seriousness", codeableconcept.CodeableConcept, False, None, False),
+            ("study", "study", fhirreference.FHIRReference, True, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("subjectMedicalHistory", "subjectMedicalHistory", fhirreference.FHIRReference, True, None, False),
+            ("suspectEntity", "suspectEntity", AdverseEventSuspectEntity, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class AdverseEventSuspectEntity(backboneelement.BackboneElement):
+    """ The suspected agent causing the adverse event.
+    
+    Describes the entity that is suspected to have caused the adverse event.
+    """
+    
+    resource_type = "AdverseEventSuspectEntity"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.causality = None
+        """ causality1 | causality2.
+        Type `str`. """
+        
+        self.causalityAssessment = None
+        """ assess1 | assess2.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.causalityAuthor = None
+        """ AdverseEvent.suspectEntity.causalityAuthor.
+        Type `FHIRReference` referencing `Practitioner, PractitionerRole` (represented as `dict` in JSON). """
+        
+        self.causalityMethod = None
+        """ method1 | method2.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.causalityProductRelatedness = None
+        """ AdverseEvent.suspectEntity.causalityProductRelatedness.
+        Type `str`. """
+        
+        self.causalityResult = None
+        """ result1 | result2.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.instance = None
+        """ Refers to the specific entity that caused the adverse event.
+        Type `FHIRReference` referencing `Substance, Medication, MedicationAdministration, MedicationStatement, Device` (represented as `dict` in JSON). """
+        
+        super(AdverseEventSuspectEntity, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AdverseEventSuspectEntity, self).elementProperties()
+        js.extend([
+            ("causality", "causality", str, False, None, False),
+            ("causalityAssessment", "causalityAssessment", codeableconcept.CodeableConcept, False, None, False),
+            ("causalityAuthor", "causalityAuthor", fhirreference.FHIRReference, False, None, False),
+            ("causalityMethod", "causalityMethod", codeableconcept.CodeableConcept, False, None, False),
+            ("causalityProductRelatedness", "causalityProductRelatedness", str, False, None, False),
+            ("causalityResult", "causalityResult", codeableconcept.CodeableConcept, False, None, False),
+            ("instance", "instance", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/adverseevent_tests.py b/fhirclient/models/adverseevent_tests.py
new file mode 100644
index 0000000..aaf67d9
--- /dev/null
+++ b/fhirclient/models/adverseevent_tests.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import adverseevent
+from .fhirdate import FHIRDate
+
+
+class AdverseEventTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("AdverseEvent", js["resourceType"])
+        return adverseevent.AdverseEvent(js)
+    
+    def testAdverseEvent1(self):
+        inst = self.instantiate_from("adverseevent-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AdverseEvent instance")
+        self.implAdverseEvent1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AdverseEvent", js["resourceType"])
+        inst2 = adverseevent.AdverseEvent(js)
+        self.implAdverseEvent1(inst2)
+    
+    def implAdverseEvent1(self, inst):
+        self.assertEqual(inst.category, "AE")
+        self.assertEqual(inst.date.date, FHIRDate("2017-01-29T12:34:56+00:00").date)
+        self.assertEqual(inst.date.as_json(), "2017-01-29T12:34:56+00:00")
+        self.assertEqual(inst.description, "This was a mild rash on the left forearm")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier.system, "http://acme.com/ids/patients/risks")
+        self.assertEqual(inst.identifier.value, "49476534")
+        self.assertEqual(inst.seriousness.coding[0].code, "Mild")
+        self.assertEqual(inst.seriousness.coding[0].display, "Mild")
+        self.assertEqual(inst.seriousness.coding[0].system, "http://hl7.org/fhir/adverse-event-seriousness")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "304386008")
+        self.assertEqual(inst.type.coding[0].display, "O/E - itchy rash")
+        self.assertEqual(inst.type.coding[0].system, "http://snomed.info/sct")
+
diff --git a/fhirclient/models/age.py b/fhirclient/models/age.py
new file mode 100644
index 0000000..7c0f4be
--- /dev/null
+++ b/fhirclient/models/age.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Age) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import quantity
+
+class Age(quantity.Quantity):
+    """ A duration of time during which an organism (or a process) has existed.
+    """
+    
+    resource_type = "Age"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        super(Age, self).__init__(jsondict=jsondict, strict=strict)
+
+
diff --git a/fhirclient/models/allergyintolerance.py b/fhirclient/models/allergyintolerance.py
new file mode 100644
index 0000000..b3f92b2
--- /dev/null
+++ b/fhirclient/models/allergyintolerance.py
@@ -0,0 +1,227 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/AllergyIntolerance) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class AllergyIntolerance(domainresource.DomainResource):
+    """ Allergy or Intolerance (generally: Risk of adverse reaction to a substance).
+    
+    Risk of harmful or undesirable, physiological response which is unique to
+    an individual and associated with exposure to a substance.
+    """
+    
+    resource_type = "AllergyIntolerance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.assertedDate = None
+        """ Date record was believed accurate.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.asserter = None
+        """ Source of the information about the allergy.
+        Type `FHIRReference` referencing `Patient, RelatedPerson, Practitioner` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ food | medication | environment | biologic.
+        List of `str` items. """
+        
+        self.clinicalStatus = None
+        """ active | inactive | resolved.
+        Type `str`. """
+        
+        self.code = None
+        """ Code that identifies the allergy or intolerance.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.criticality = None
+        """ low | high | unable-to-assess.
+        Type `str`. """
+        
+        self.identifier = None
+        """ External ids for this item.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.lastOccurrence = None
+        """ Date(/time) of last known occurrence of a reaction.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.note = None
+        """ Additional text not captured in other fields.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.onsetAge = None
+        """ When allergy or intolerance was identified.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.onsetDateTime = None
+        """ When allergy or intolerance was identified.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.onsetPeriod = None
+        """ When allergy or intolerance was identified.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.onsetRange = None
+        """ When allergy or intolerance was identified.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.onsetString = None
+        """ When allergy or intolerance was identified.
+        Type `str`. """
+        
+        self.patient = None
+        """ Who the sensitivity is for.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.reaction = None
+        """ Adverse Reaction Events linked to exposure to substance.
+        List of `AllergyIntoleranceReaction` items (represented as `dict` in JSON). """
+        
+        self.recorder = None
+        """ Who recorded the sensitivity.
+        Type `FHIRReference` referencing `Practitioner, Patient` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ allergy | intolerance - Underlying mechanism (if known).
+        Type `str`. """
+        
+        self.verificationStatus = None
+        """ unconfirmed | confirmed | refuted | entered-in-error.
+        Type `str`. """
+        
+        super(AllergyIntolerance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AllergyIntolerance, self).elementProperties()
+        js.extend([
+            ("assertedDate", "assertedDate", fhirdate.FHIRDate, False, None, False),
+            ("asserter", "asserter", fhirreference.FHIRReference, False, None, False),
+            ("category", "category", str, True, None, False),
+            ("clinicalStatus", "clinicalStatus", str, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("criticality", "criticality", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("lastOccurrence", "lastOccurrence", fhirdate.FHIRDate, False, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("onsetAge", "onsetAge", age.Age, False, "onset", False),
+            ("onsetDateTime", "onsetDateTime", fhirdate.FHIRDate, False, "onset", False),
+            ("onsetPeriod", "onsetPeriod", period.Period, False, "onset", False),
+            ("onsetRange", "onsetRange", range.Range, False, "onset", False),
+            ("onsetString", "onsetString", str, False, "onset", False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("reaction", "reaction", AllergyIntoleranceReaction, True, None, False),
+            ("recorder", "recorder", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", str, False, None, False),
+            ("verificationStatus", "verificationStatus", str, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class AllergyIntoleranceReaction(backboneelement.BackboneElement):
+    """ Adverse Reaction Events linked to exposure to substance.
+    
+    Details about each adverse reaction event linked to exposure to the
+    identified substance.
+    """
+    
+    resource_type = "AllergyIntoleranceReaction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Description of the event as a whole.
+        Type `str`. """
+        
+        self.exposureRoute = None
+        """ How the subject was exposed to the substance.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.manifestation = None
+        """ Clinical symptoms/signs associated with the Event.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Text about event not captured in other fields.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.onset = None
+        """ Date(/time) when manifestations showed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.severity = None
+        """ mild | moderate | severe (of event as a whole).
+        Type `str`. """
+        
+        self.substance = None
+        """ Specific substance or pharmaceutical product considered to be
+        responsible for event.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(AllergyIntoleranceReaction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AllergyIntoleranceReaction, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("exposureRoute", "exposureRoute", codeableconcept.CodeableConcept, False, None, False),
+            ("manifestation", "manifestation", codeableconcept.CodeableConcept, True, None, True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("onset", "onset", fhirdate.FHIRDate, False, None, False),
+            ("severity", "severity", str, False, None, False),
+            ("substance", "substance", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import age
+except ImportError:
+    age = sys.modules[__package__ + '.age']
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
diff --git a/fhirclient/models/allergyintolerance_tests.py b/fhirclient/models/allergyintolerance_tests.py
new file mode 100644
index 0000000..3cda5c9
--- /dev/null
+++ b/fhirclient/models/allergyintolerance_tests.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import allergyintolerance
+from .fhirdate import FHIRDate
+
+
+class AllergyIntoleranceTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("AllergyIntolerance", js["resourceType"])
+        return allergyintolerance.AllergyIntolerance(js)
+    
+    def testAllergyIntolerance1(self):
+        inst = self.instantiate_from("allergyintolerance-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AllergyIntolerance instance")
+        self.implAllergyIntolerance1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AllergyIntolerance", js["resourceType"])
+        inst2 = allergyintolerance.AllergyIntolerance(js)
+        self.implAllergyIntolerance1(inst2)
+    
+    def implAllergyIntolerance1(self, inst):
+        self.assertEqual(inst.assertedDate.date, FHIRDate("2014-10-09T14:58:00+11:00").date)
+        self.assertEqual(inst.assertedDate.as_json(), "2014-10-09T14:58:00+11:00")
+        self.assertEqual(inst.category[0], "food")
+        self.assertEqual(inst.clinicalStatus, "active")
+        self.assertEqual(inst.code.coding[0].code, "227493005")
+        self.assertEqual(inst.code.coding[0].display, "Cashew nuts")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.criticality, "high")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http://acme.com/ids/patients/risks")
+        self.assertEqual(inst.identifier[0].value, "49476534")
+        self.assertEqual(inst.lastOccurrence.date, FHIRDate("2012-06").date)
+        self.assertEqual(inst.lastOccurrence.as_json(), "2012-06")
+        self.assertEqual(inst.note[0].text, "The criticality is high becasue of the observed anaphylactic reaction when challenged with cashew extract.")
+        self.assertEqual(inst.onsetDateTime.date, FHIRDate("2004").date)
+        self.assertEqual(inst.onsetDateTime.as_json(), "2004")
+        self.assertEqual(inst.reaction[0].description, "Challenge Protocol. Severe reaction to subcutaneous cashew extract. Epinephrine administered")
+        self.assertEqual(inst.reaction[0].exposureRoute.coding[0].code, "34206005")
+        self.assertEqual(inst.reaction[0].exposureRoute.coding[0].display, "Subcutaneous route")
+        self.assertEqual(inst.reaction[0].exposureRoute.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reaction[0].manifestation[0].coding[0].code, "39579001")
+        self.assertEqual(inst.reaction[0].manifestation[0].coding[0].display, "Anaphylactic reaction")
+        self.assertEqual(inst.reaction[0].manifestation[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reaction[0].onset.date, FHIRDate("2012-06-12").date)
+        self.assertEqual(inst.reaction[0].onset.as_json(), "2012-06-12")
+        self.assertEqual(inst.reaction[0].severity, "severe")
+        self.assertEqual(inst.reaction[0].substance.coding[0].code, "1160593")
+        self.assertEqual(inst.reaction[0].substance.coding[0].display, "cashew nut allergenic extract Injectable Product")
+        self.assertEqual(inst.reaction[0].substance.coding[0].system, "http://www.nlm.nih.gov/research/umls/rxnorm")
+        self.assertEqual(inst.reaction[1].manifestation[0].coding[0].code, "64305001")
+        self.assertEqual(inst.reaction[1].manifestation[0].coding[0].display, "Urticaria")
+        self.assertEqual(inst.reaction[1].manifestation[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reaction[1].note[0].text, "The patient reports that the onset of urticaria was within 15 minutes of eating cashews.")
+        self.assertEqual(inst.reaction[1].onset.date, FHIRDate("2004").date)
+        self.assertEqual(inst.reaction[1].onset.as_json(), "2004")
+        self.assertEqual(inst.reaction[1].severity, "moderate")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "allergy")
+        self.assertEqual(inst.verificationStatus, "confirmed")
+
diff --git a/fhirclient/models/annotation.py b/fhirclient/models/annotation.py
new file mode 100644
index 0000000..a6f1b2a
--- /dev/null
+++ b/fhirclient/models/annotation.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Annotation) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Annotation(element.Element):
+    """ Text node with attribution.
+    
+    A  text note which also  contains information about who made the statement
+    and when.
+    """
+    
+    resource_type = "Annotation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authorReference = None
+        """ Individual responsible for the annotation.
+        Type `FHIRReference` referencing `Practitioner, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.authorString = None
+        """ Individual responsible for the annotation.
+        Type `str`. """
+        
+        self.text = None
+        """ The annotation  - text content.
+        Type `str`. """
+        
+        self.time = None
+        """ When the annotation was made.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(Annotation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Annotation, self).elementProperties()
+        js.extend([
+            ("authorReference", "authorReference", fhirreference.FHIRReference, False, "author", False),
+            ("authorString", "authorString", str, False, "author", False),
+            ("text", "text", str, False, None, True),
+            ("time", "time", fhirdate.FHIRDate, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
diff --git a/fhirclient/models/appointment.py b/fhirclient/models/appointment.py
new file mode 100644
index 0000000..d5ca3fc
--- /dev/null
+++ b/fhirclient/models/appointment.py
@@ -0,0 +1,209 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Appointment) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Appointment(domainresource.DomainResource):
+    """ A booking of a healthcare event among patient(s), practitioner(s), related
+    person(s) and/or device(s) for a specific date/time. This may result in one
+    or more Encounter(s).
+    """
+    
+    resource_type = "Appointment"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.appointmentType = None
+        """ The style of appointment or patient that has been booked in the
+        slot (not service type).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.comment = None
+        """ Additional comments.
+        Type `str`. """
+        
+        self.created = None
+        """ The date that this appointment was initially created.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Shown on a subject line in a meeting request, or appointment list.
+        Type `str`. """
+        
+        self.end = None
+        """ When appointment is to conclude.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.identifier = None
+        """ External Ids for this item.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.incomingReferral = None
+        """ The ReferralRequest provided as information to allocate to the
+        Encounter.
+        List of `FHIRReference` items referencing `ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.indication = None
+        """ Reason the appointment is to takes place (resource).
+        List of `FHIRReference` items referencing `Condition, Procedure` (represented as `dict` in JSON). """
+        
+        self.minutesDuration = None
+        """ Can be less than start/end (e.g. estimate).
+        Type `int`. """
+        
+        self.participant = None
+        """ Participants involved in appointment.
+        List of `AppointmentParticipant` items (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ Used to make informed decisions if needing to re-prioritize.
+        Type `int`. """
+        
+        self.reason = None
+        """ Reason this appointment is scheduled.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.requestedPeriod = None
+        """ Potential date/time interval(s) requested to allocate the
+        appointment within.
+        List of `Period` items (represented as `dict` in JSON). """
+        
+        self.serviceCategory = None
+        """ A broad categorisation of the service that is to be performed
+        during this appointment.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.serviceType = None
+        """ The specific service that is to be performed during this
+        appointment.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.slot = None
+        """ The slots that this appointment is filling.
+        List of `FHIRReference` items referencing `Slot` (represented as `dict` in JSON). """
+        
+        self.specialty = None
+        """ The specialty of a practitioner that would be required to perform
+        the service requested in this appointment.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.start = None
+        """ When appointment is to take place.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.status = None
+        """ proposed | pending | booked | arrived | fulfilled | cancelled |
+        noshow | entered-in-error.
+        Type `str`. """
+        
+        self.supportingInformation = None
+        """ Additional information to support the appointment.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(Appointment, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Appointment, self).elementProperties()
+        js.extend([
+            ("appointmentType", "appointmentType", codeableconcept.CodeableConcept, False, None, False),
+            ("comment", "comment", str, False, None, False),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("end", "end", fhirdate.FHIRDate, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("incomingReferral", "incomingReferral", fhirreference.FHIRReference, True, None, False),
+            ("indication", "indication", fhirreference.FHIRReference, True, None, False),
+            ("minutesDuration", "minutesDuration", int, False, None, False),
+            ("participant", "participant", AppointmentParticipant, True, None, True),
+            ("priority", "priority", int, False, None, False),
+            ("reason", "reason", codeableconcept.CodeableConcept, True, None, False),
+            ("requestedPeriod", "requestedPeriod", period.Period, True, None, False),
+            ("serviceCategory", "serviceCategory", codeableconcept.CodeableConcept, False, None, False),
+            ("serviceType", "serviceType", codeableconcept.CodeableConcept, True, None, False),
+            ("slot", "slot", fhirreference.FHIRReference, True, None, False),
+            ("specialty", "specialty", codeableconcept.CodeableConcept, True, None, False),
+            ("start", "start", fhirdate.FHIRDate, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("supportingInformation", "supportingInformation", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class AppointmentParticipant(backboneelement.BackboneElement):
+    """ Participants involved in appointment.
+    
+    List of participants involved in the appointment.
+    """
+    
+    resource_type = "AppointmentParticipant"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actor = None
+        """ Person, Location/HealthcareService or Device.
+        Type `FHIRReference` referencing `Patient, Practitioner, RelatedPerson, Device, HealthcareService, Location` (represented as `dict` in JSON). """
+        
+        self.required = None
+        """ required | optional | information-only.
+        Type `str`. """
+        
+        self.status = None
+        """ accepted | declined | tentative | needs-action.
+        Type `str`. """
+        
+        self.type = None
+        """ Role of participant in the appointment.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(AppointmentParticipant, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AppointmentParticipant, self).elementProperties()
+        js.extend([
+            ("actor", "actor", fhirreference.FHIRReference, False, None, False),
+            ("required", "required", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("type", "type", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/appointment_tests.py b/fhirclient/models/appointment_tests.py
new file mode 100644
index 0000000..c0c0b5d
--- /dev/null
+++ b/fhirclient/models/appointment_tests.py
@@ -0,0 +1,157 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import appointment
+from .fhirdate import FHIRDate
+
+
+class AppointmentTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Appointment", js["resourceType"])
+        return appointment.Appointment(js)
+    
+    def testAppointment1(self):
+        inst = self.instantiate_from("appointment-example-request.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Appointment instance")
+        self.implAppointment1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Appointment", js["resourceType"])
+        inst2 = appointment.Appointment(js)
+        self.implAppointment1(inst2)
+    
+    def implAppointment1(self, inst):
+        self.assertEqual(inst.appointmentType.coding[0].code, "wi")
+        self.assertEqual(inst.appointmentType.coding[0].display, "Walk in")
+        self.assertEqual(inst.appointmentType.coding[0].system, "http://example.org/appointment-type")
+        self.assertEqual(inst.comment, "Further expand on the results of the MRI and determine the next actions that may be appropriate.")
+        self.assertEqual(inst.created.date, FHIRDate("2015-12-02").date)
+        self.assertEqual(inst.created.as_json(), "2015-12-02")
+        self.assertEqual(inst.description, "Discussion on the results of your recent MRI")
+        self.assertEqual(inst.id, "examplereq")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/sampleappointment-identifier")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.minutesDuration, 15)
+        self.assertEqual(inst.participant[0].required, "required")
+        self.assertEqual(inst.participant[0].status, "needs-action")
+        self.assertEqual(inst.participant[1].required, "required")
+        self.assertEqual(inst.participant[1].status, "needs-action")
+        self.assertEqual(inst.participant[1].type[0].coding[0].code, "ATND")
+        self.assertEqual(inst.participant[1].type[0].coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.participant[2].required, "required")
+        self.assertEqual(inst.participant[2].status, "accepted")
+        self.assertEqual(inst.priority, 5)
+        self.assertEqual(inst.reason[0].coding[0].code, "413095006")
+        self.assertEqual(inst.reason[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reason[0].text, "Clinical Review")
+        self.assertEqual(inst.requestedPeriod[0].end.date, FHIRDate("2016-06-09").date)
+        self.assertEqual(inst.requestedPeriod[0].end.as_json(), "2016-06-09")
+        self.assertEqual(inst.requestedPeriod[0].start.date, FHIRDate("2016-06-02").date)
+        self.assertEqual(inst.requestedPeriod[0].start.as_json(), "2016-06-02")
+        self.assertEqual(inst.serviceCategory.coding[0].code, "gp")
+        self.assertEqual(inst.serviceCategory.coding[0].display, "General Practice")
+        self.assertEqual(inst.serviceCategory.coding[0].system, "http://example.org/service-category")
+        self.assertEqual(inst.specialty[0].coding[0].code, "gp")
+        self.assertEqual(inst.specialty[0].coding[0].display, "General Practice")
+        self.assertEqual(inst.specialty[0].coding[0].system, "http://example.org/specialty")
+        self.assertEqual(inst.status, "proposed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Brian MRI results discussion</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testAppointment2(self):
+        inst = self.instantiate_from("appointment-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Appointment instance")
+        self.implAppointment2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Appointment", js["resourceType"])
+        inst2 = appointment.Appointment(js)
+        self.implAppointment2(inst2)
+    
+    def implAppointment2(self, inst):
+        self.assertEqual(inst.appointmentType.coding[0].code, "follow")
+        self.assertEqual(inst.appointmentType.coding[0].display, "Followup")
+        self.assertEqual(inst.appointmentType.coding[0].system, "http://example.org/appointment-type")
+        self.assertEqual(inst.comment, "Further expand on the results of the MRI and determine the next actions that may be appropriate.")
+        self.assertEqual(inst.created.date, FHIRDate("2013-10-10").date)
+        self.assertEqual(inst.created.as_json(), "2013-10-10")
+        self.assertEqual(inst.description, "Discussion on the results of your recent MRI")
+        self.assertEqual(inst.end.date, FHIRDate("2013-12-10T11:00:00Z").date)
+        self.assertEqual(inst.end.as_json(), "2013-12-10T11:00:00Z")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.participant[0].required, "required")
+        self.assertEqual(inst.participant[0].status, "accepted")
+        self.assertEqual(inst.participant[1].required, "required")
+        self.assertEqual(inst.participant[1].status, "accepted")
+        self.assertEqual(inst.participant[1].type[0].coding[0].code, "ATND")
+        self.assertEqual(inst.participant[1].type[0].coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.participant[2].required, "required")
+        self.assertEqual(inst.participant[2].status, "accepted")
+        self.assertEqual(inst.priority, 5)
+        self.assertEqual(inst.serviceCategory.coding[0].code, "gp")
+        self.assertEqual(inst.serviceCategory.coding[0].display, "General Practice")
+        self.assertEqual(inst.serviceCategory.coding[0].system, "http://example.org/service-category")
+        self.assertEqual(inst.serviceType[0].coding[0].code, "52")
+        self.assertEqual(inst.serviceType[0].coding[0].display, "General Discussion")
+        self.assertEqual(inst.specialty[0].coding[0].code, "gp")
+        self.assertEqual(inst.specialty[0].coding[0].display, "General Practice")
+        self.assertEqual(inst.specialty[0].coding[0].system, "http://example.org/specialty")
+        self.assertEqual(inst.start.date, FHIRDate("2013-12-10T09:00:00Z").date)
+        self.assertEqual(inst.start.as_json(), "2013-12-10T09:00:00Z")
+        self.assertEqual(inst.status, "booked")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Brian MRI results discussion</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testAppointment3(self):
+        inst = self.instantiate_from("appointment-example2doctors.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Appointment instance")
+        self.implAppointment3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Appointment", js["resourceType"])
+        inst2 = appointment.Appointment(js)
+        self.implAppointment3(inst2)
+    
+    def implAppointment3(self, inst):
+        self.assertEqual(inst.appointmentType.coding[0].code, "wi")
+        self.assertEqual(inst.appointmentType.coding[0].display, "Walk in")
+        self.assertEqual(inst.appointmentType.coding[0].system, "http://example.org/appointment-type")
+        self.assertEqual(inst.comment, "Clarify the results of the MRI to ensure context of test was correct")
+        self.assertEqual(inst.description, "Discussion about Peter Chalmers MRI results")
+        self.assertEqual(inst.end.date, FHIRDate("2013-12-09T11:00:00Z").date)
+        self.assertEqual(inst.end.as_json(), "2013-12-09T11:00:00Z")
+        self.assertEqual(inst.id, "2docs")
+        self.assertEqual(inst.participant[0].required, "information-only")
+        self.assertEqual(inst.participant[0].status, "accepted")
+        self.assertEqual(inst.participant[1].required, "required")
+        self.assertEqual(inst.participant[1].status, "accepted")
+        self.assertEqual(inst.participant[2].required, "required")
+        self.assertEqual(inst.participant[2].status, "accepted")
+        self.assertEqual(inst.participant[3].required, "information-only")
+        self.assertEqual(inst.participant[3].status, "accepted")
+        self.assertEqual(inst.priority, 5)
+        self.assertEqual(inst.serviceCategory.coding[0].code, "gp")
+        self.assertEqual(inst.serviceCategory.coding[0].display, "General Practice")
+        self.assertEqual(inst.serviceCategory.coding[0].system, "http://example.org/service-category")
+        self.assertEqual(inst.serviceType[0].coding[0].code, "52")
+        self.assertEqual(inst.serviceType[0].coding[0].display, "General Discussion")
+        self.assertEqual(inst.specialty[0].coding[0].code, "gp")
+        self.assertEqual(inst.specialty[0].coding[0].display, "General Practice")
+        self.assertEqual(inst.specialty[0].coding[0].system, "http://example.org/specialty")
+        self.assertEqual(inst.start.date, FHIRDate("2013-12-09T09:00:00Z").date)
+        self.assertEqual(inst.start.as_json(), "2013-12-09T09:00:00Z")
+        self.assertEqual(inst.status, "booked")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Brian MRI results discussion</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/appointmentresponse.py b/fhirclient/models/appointmentresponse.py
new file mode 100644
index 0000000..3a9d36f
--- /dev/null
+++ b/fhirclient/models/appointmentresponse.py
@@ -0,0 +1,91 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/AppointmentResponse) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class AppointmentResponse(domainresource.DomainResource):
+    """ A reply to an appointment request for a patient and/or practitioner(s),
+    such as a confirmation or rejection.
+    """
+    
+    resource_type = "AppointmentResponse"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actor = None
+        """ Person, Location/HealthcareService or Device.
+        Type `FHIRReference` referencing `Patient, Practitioner, RelatedPerson, Device, HealthcareService, Location` (represented as `dict` in JSON). """
+        
+        self.appointment = None
+        """ Appointment this response relates to.
+        Type `FHIRReference` referencing `Appointment` (represented as `dict` in JSON). """
+        
+        self.comment = None
+        """ Additional comments.
+        Type `str`. """
+        
+        self.end = None
+        """ Time from appointment, or requested new end time.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.identifier = None
+        """ External Ids for this item.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.participantStatus = None
+        """ accepted | declined | tentative | in-process | completed | needs-
+        action | entered-in-error.
+        Type `str`. """
+        
+        self.participantType = None
+        """ Role of participant in the appointment.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.start = None
+        """ Time from appointment, or requested new start time.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(AppointmentResponse, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AppointmentResponse, self).elementProperties()
+        js.extend([
+            ("actor", "actor", fhirreference.FHIRReference, False, None, False),
+            ("appointment", "appointment", fhirreference.FHIRReference, False, None, True),
+            ("comment", "comment", str, False, None, False),
+            ("end", "end", fhirdate.FHIRDate, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("participantStatus", "participantStatus", str, False, None, True),
+            ("participantType", "participantType", codeableconcept.CodeableConcept, True, None, False),
+            ("start", "start", fhirdate.FHIRDate, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/appointmentresponse_tests.py b/fhirclient/models/appointmentresponse_tests.py
new file mode 100644
index 0000000..72bbf66
--- /dev/null
+++ b/fhirclient/models/appointmentresponse_tests.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import appointmentresponse
+from .fhirdate import FHIRDate
+
+
+class AppointmentResponseTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("AppointmentResponse", js["resourceType"])
+        return appointmentresponse.AppointmentResponse(js)
+    
+    def testAppointmentResponse1(self):
+        inst = self.instantiate_from("appointmentresponse-example-req.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AppointmentResponse instance")
+        self.implAppointmentResponse1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AppointmentResponse", js["resourceType"])
+        inst2 = appointmentresponse.AppointmentResponse(js)
+        self.implAppointmentResponse1(inst2)
+    
+    def implAppointmentResponse1(self, inst):
+        self.assertEqual(inst.comment, "can't we try for this time, can't do mornings")
+        self.assertEqual(inst.end.date, FHIRDate("2013-12-25T13:30:00Z").date)
+        self.assertEqual(inst.end.as_json(), "2013-12-25T13:30:00Z")
+        self.assertEqual(inst.id, "exampleresp")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/sampleappointmentresponse-identifier")
+        self.assertEqual(inst.identifier[0].value, "response123")
+        self.assertEqual(inst.participantStatus, "tentative")
+        self.assertEqual(inst.participantType[0].coding[0].code, "ATND")
+        self.assertEqual(inst.participantType[0].coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.start.date, FHIRDate("2013-12-25T13:15:00Z").date)
+        self.assertEqual(inst.start.as_json(), "2013-12-25T13:15:00Z")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Accept Brian MRI results discussion</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testAppointmentResponse2(self):
+        inst = self.instantiate_from("appointmentresponse-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AppointmentResponse instance")
+        self.implAppointmentResponse2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AppointmentResponse", js["resourceType"])
+        inst2 = appointmentresponse.AppointmentResponse(js)
+        self.implAppointmentResponse2(inst2)
+    
+    def implAppointmentResponse2(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.participantStatus, "accepted")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Accept Brian MRI results discussion</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/attachment.py b/fhirclient/models/attachment.py
new file mode 100644
index 0000000..f013f04
--- /dev/null
+++ b/fhirclient/models/attachment.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Attachment) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Attachment(element.Element):
+    """ Content in a format defined elsewhere.
+    
+    For referring to data content defined in other formats.
+    """
+    
+    resource_type = "Attachment"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contentType = None
+        """ Mime type of the content, with charset etc..
+        Type `str`. """
+        
+        self.creation = None
+        """ Date attachment was first created.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.data = None
+        """ Data inline, base64ed.
+        Type `str`. """
+        
+        self.hash = None
+        """ Hash of the data (sha-1, base64ed).
+        Type `str`. """
+        
+        self.language = None
+        """ Human language of the content (BCP-47).
+        Type `str`. """
+        
+        self.size = None
+        """ Number of bytes of content (if url provided).
+        Type `int`. """
+        
+        self.title = None
+        """ Label to display in place of the data.
+        Type `str`. """
+        
+        self.url = None
+        """ Uri where the data can be found.
+        Type `str`. """
+        
+        super(Attachment, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Attachment, self).elementProperties()
+        js.extend([
+            ("contentType", "contentType", str, False, None, False),
+            ("creation", "creation", fhirdate.FHIRDate, False, None, False),
+            ("data", "data", str, False, None, False),
+            ("hash", "hash", str, False, None, False),
+            ("language", "language", str, False, None, False),
+            ("size", "size", int, False, None, False),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
diff --git a/fhirclient/models/auditevent.py b/fhirclient/models/auditevent.py
new file mode 100644
index 0000000..1c26ac3
--- /dev/null
+++ b/fhirclient/models/auditevent.py
@@ -0,0 +1,375 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/AuditEvent) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class AuditEvent(domainresource.DomainResource):
+    """ Event record kept for security purposes.
+    
+    A record of an event made for purposes of maintaining a security log.
+    Typical uses include detection of intrusion attempts and monitoring for
+    inappropriate usage.
+    """
+    
+    resource_type = "AuditEvent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ Type of action performed during the event.
+        Type `str`. """
+        
+        self.agent = None
+        """ Actor involved in the event.
+        List of `AuditEventAgent` items (represented as `dict` in JSON). """
+        
+        self.entity = None
+        """ Data or objects used.
+        List of `AuditEventEntity` items (represented as `dict` in JSON). """
+        
+        self.outcome = None
+        """ Whether the event succeeded or failed.
+        Type `str`. """
+        
+        self.outcomeDesc = None
+        """ Description of the event outcome.
+        Type `str`. """
+        
+        self.purposeOfEvent = None
+        """ The purposeOfUse of the event.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.recorded = None
+        """ Time when the event occurred on source.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.source = None
+        """ Audit Event Reporter.
+        Type `AuditEventSource` (represented as `dict` in JSON). """
+        
+        self.subtype = None
+        """ More specific type/id for the event.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type/identifier of event.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(AuditEvent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AuditEvent, self).elementProperties()
+        js.extend([
+            ("action", "action", str, False, None, False),
+            ("agent", "agent", AuditEventAgent, True, None, True),
+            ("entity", "entity", AuditEventEntity, True, None, False),
+            ("outcome", "outcome", str, False, None, False),
+            ("outcomeDesc", "outcomeDesc", str, False, None, False),
+            ("purposeOfEvent", "purposeOfEvent", codeableconcept.CodeableConcept, True, None, False),
+            ("recorded", "recorded", fhirdate.FHIRDate, False, None, True),
+            ("source", "source", AuditEventSource, False, None, True),
+            ("subtype", "subtype", coding.Coding, True, None, False),
+            ("type", "type", coding.Coding, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class AuditEventAgent(backboneelement.BackboneElement):
+    """ Actor involved in the event.
+    
+    An actor taking an active role in the event or activity that is logged.
+    """
+    
+    resource_type = "AuditEventAgent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.altId = None
+        """ Alternative User id e.g. authentication.
+        Type `str`. """
+        
+        self.location = None
+        """ Where.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.media = None
+        """ Type of media.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Human-meaningful name for the agent.
+        Type `str`. """
+        
+        self.network = None
+        """ Logical network location for application activity.
+        Type `AuditEventAgentNetwork` (represented as `dict` in JSON). """
+        
+        self.policy = None
+        """ Policy that authorized event.
+        List of `str` items. """
+        
+        self.purposeOfUse = None
+        """ Reason given for this user.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reference = None
+        """ Direct reference to resource.
+        Type `FHIRReference` referencing `Practitioner, Organization, Device, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.requestor = None
+        """ Whether user is initiator.
+        Type `bool`. """
+        
+        self.role = None
+        """ Agent role in the event.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.userId = None
+        """ Unique identifier for the user.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        super(AuditEventAgent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AuditEventAgent, self).elementProperties()
+        js.extend([
+            ("altId", "altId", str, False, None, False),
+            ("location", "location", fhirreference.FHIRReference, False, None, False),
+            ("media", "media", coding.Coding, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("network", "network", AuditEventAgentNetwork, False, None, False),
+            ("policy", "policy", str, True, None, False),
+            ("purposeOfUse", "purposeOfUse", codeableconcept.CodeableConcept, True, None, False),
+            ("reference", "reference", fhirreference.FHIRReference, False, None, False),
+            ("requestor", "requestor", bool, False, None, True),
+            ("role", "role", codeableconcept.CodeableConcept, True, None, False),
+            ("userId", "userId", identifier.Identifier, False, None, False),
+        ])
+        return js
+
+
+class AuditEventAgentNetwork(backboneelement.BackboneElement):
+    """ Logical network location for application activity.
+    
+    Logical network location for application activity, if the activity has a
+    network location.
+    """
+    
+    resource_type = "AuditEventAgentNetwork"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.address = None
+        """ Identifier for the network access point of the user device.
+        Type `str`. """
+        
+        self.type = None
+        """ The type of network access point.
+        Type `str`. """
+        
+        super(AuditEventAgentNetwork, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AuditEventAgentNetwork, self).elementProperties()
+        js.extend([
+            ("address", "address", str, False, None, False),
+            ("type", "type", str, False, None, False),
+        ])
+        return js
+
+
+class AuditEventEntity(backboneelement.BackboneElement):
+    """ Data or objects used.
+    
+    Specific instances of data or objects that have been accessed.
+    """
+    
+    resource_type = "AuditEventEntity"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Descriptive text.
+        Type `str`. """
+        
+        self.detail = None
+        """ Additional Information about the entity.
+        List of `AuditEventEntityDetail` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Specific instance of object.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.lifecycle = None
+        """ Life-cycle stage for the entity.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Descriptor for entity.
+        Type `str`. """
+        
+        self.query = None
+        """ Query parameters.
+        Type `str`. """
+        
+        self.reference = None
+        """ Specific instance of resource.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ What role the entity played.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.securityLabel = None
+        """ Security labels on the entity.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type of entity involved.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(AuditEventEntity, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AuditEventEntity, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("detail", "detail", AuditEventEntityDetail, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("lifecycle", "lifecycle", coding.Coding, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("query", "query", str, False, None, False),
+            ("reference", "reference", fhirreference.FHIRReference, False, None, False),
+            ("role", "role", coding.Coding, False, None, False),
+            ("securityLabel", "securityLabel", coding.Coding, True, None, False),
+            ("type", "type", coding.Coding, False, None, False),
+        ])
+        return js
+
+
+class AuditEventEntityDetail(backboneelement.BackboneElement):
+    """ Additional Information about the entity.
+    
+    Tagged value pairs for conveying additional information about the entity.
+    """
+    
+    resource_type = "AuditEventEntityDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.type = None
+        """ Name of the property.
+        Type `str`. """
+        
+        self.value = None
+        """ Property value.
+        Type `str`. """
+        
+        super(AuditEventEntityDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AuditEventEntityDetail, self).elementProperties()
+        js.extend([
+            ("type", "type", str, False, None, True),
+            ("value", "value", str, False, None, True),
+        ])
+        return js
+
+
+class AuditEventSource(backboneelement.BackboneElement):
+    """ Audit Event Reporter.
+    
+    The system that is reporting the event.
+    """
+    
+    resource_type = "AuditEventSource"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.identifier = None
+        """ The identity of source detecting the event.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.site = None
+        """ Logical source location within the enterprise.
+        Type `str`. """
+        
+        self.type = None
+        """ The type of source where event originated.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        super(AuditEventSource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(AuditEventSource, self).elementProperties()
+        js.extend([
+            ("identifier", "identifier", identifier.Identifier, False, None, True),
+            ("site", "site", str, False, None, False),
+            ("type", "type", coding.Coding, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/auditevent_tests.py b/fhirclient/models/auditevent_tests.py
new file mode 100644
index 0000000..6a55e11
--- /dev/null
+++ b/fhirclient/models/auditevent_tests.py
@@ -0,0 +1,452 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import auditevent
+from .fhirdate import FHIRDate
+
+
+class AuditEventTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("AuditEvent", js["resourceType"])
+        return auditevent.AuditEvent(js)
+    
+    def testAuditEvent1(self):
+        inst = self.instantiate_from("audit-event-example-login.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance")
+        self.implAuditEvent1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AuditEvent", js["resourceType"])
+        inst2 = auditevent.AuditEvent(js)
+        self.implAuditEvent1(inst2)
+    
+    def implAuditEvent1(self, inst):
+        self.assertEqual(inst.action, "E")
+        self.assertEqual(inst.agent[0].altId, "601847123")
+        self.assertEqual(inst.agent[0].name, "Grahame Grieve")
+        self.assertEqual(inst.agent[0].network.address, "127.0.0.1")
+        self.assertEqual(inst.agent[0].network.type, "2")
+        self.assertTrue(inst.agent[0].requestor)
+        self.assertEqual(inst.agent[0].userId.value, "95")
+        self.assertEqual(inst.agent[1].altId, "6580")
+        self.assertEqual(inst.agent[1].network.address, "Workstation1.ehr.familyclinic.com")
+        self.assertEqual(inst.agent[1].network.type, "1")
+        self.assertFalse(inst.agent[1].requestor)
+        self.assertEqual(inst.agent[1].role[0].coding[0].code, "110153")
+        self.assertEqual(inst.agent[1].role[0].coding[0].display, "Source Role ID")
+        self.assertEqual(inst.agent[1].role[0].coding[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.agent[1].userId.value, "2.16.840.1.113883.4.2|2.16.840.1.113883.4.2")
+        self.assertEqual(inst.id, "example-login")
+        self.assertEqual(inst.outcome, "0")
+        self.assertEqual(inst.recorded.date, FHIRDate("2013-06-20T23:41:23Z").date)
+        self.assertEqual(inst.recorded.as_json(), "2013-06-20T23:41:23Z")
+        self.assertEqual(inst.source.identifier.value, "hl7connect.healthintersections.com.au")
+        self.assertEqual(inst.source.site, "Cloud")
+        self.assertEqual(inst.source.type[0].code, "3")
+        self.assertEqual(inst.source.type[0].display, "Web Server")
+        self.assertEqual(inst.source.type[0].system, "http://hl7.org/fhir/security-source-type")
+        self.assertEqual(inst.subtype[0].code, "110122")
+        self.assertEqual(inst.subtype[0].display, "Login")
+        self.assertEqual(inst.subtype[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.code, "110114")
+        self.assertEqual(inst.type.display, "User Authentication")
+        self.assertEqual(inst.type.system, "http://dicom.nema.org/resources/ontology/DCM")
+    
+    def testAuditEvent2(self):
+        inst = self.instantiate_from("audit-event-example-logout.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance")
+        self.implAuditEvent2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AuditEvent", js["resourceType"])
+        inst2 = auditevent.AuditEvent(js)
+        self.implAuditEvent2(inst2)
+    
+    def implAuditEvent2(self, inst):
+        self.assertEqual(inst.action, "E")
+        self.assertEqual(inst.agent[0].altId, "601847123")
+        self.assertEqual(inst.agent[0].name, "Grahame Grieve")
+        self.assertEqual(inst.agent[0].network.address, "127.0.0.1")
+        self.assertEqual(inst.agent[0].network.type, "2")
+        self.assertTrue(inst.agent[0].requestor)
+        self.assertEqual(inst.agent[0].userId.value, "95")
+        self.assertEqual(inst.agent[1].altId, "6580")
+        self.assertEqual(inst.agent[1].network.address, "Workstation1.ehr.familyclinic.com")
+        self.assertEqual(inst.agent[1].network.type, "1")
+        self.assertFalse(inst.agent[1].requestor)
+        self.assertEqual(inst.agent[1].role[0].coding[0].code, "110153")
+        self.assertEqual(inst.agent[1].role[0].coding[0].display, "Source Role ID")
+        self.assertEqual(inst.agent[1].role[0].coding[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.agent[1].userId.value, "2.16.840.1.113883.4.2|2.16.840.1.113883.4.2")
+        self.assertEqual(inst.id, "example-logout")
+        self.assertEqual(inst.outcome, "0")
+        self.assertEqual(inst.recorded.date, FHIRDate("2013-06-20T23:46:41Z").date)
+        self.assertEqual(inst.recorded.as_json(), "2013-06-20T23:46:41Z")
+        self.assertEqual(inst.source.identifier.value, "hl7connect.healthintersections.com.au")
+        self.assertEqual(inst.source.site, "Cloud")
+        self.assertEqual(inst.source.type[0].code, "3")
+        self.assertEqual(inst.source.type[0].display, "Web Server")
+        self.assertEqual(inst.source.type[0].system, "http://hl7.org/fhir/security-source-type")
+        self.assertEqual(inst.subtype[0].code, "110123")
+        self.assertEqual(inst.subtype[0].display, "Logout")
+        self.assertEqual(inst.subtype[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.code, "110114")
+        self.assertEqual(inst.type.display, "User Authentication")
+        self.assertEqual(inst.type.system, "http://dicom.nema.org/resources/ontology/DCM")
+    
+    def testAuditEvent3(self):
+        inst = self.instantiate_from("audit-event-example-media.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance")
+        self.implAuditEvent3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AuditEvent", js["resourceType"])
+        inst2 = auditevent.AuditEvent(js)
+        self.implAuditEvent3(inst2)
+    
+    def implAuditEvent3(self, inst):
+        self.assertEqual(inst.action, "R")
+        self.assertFalse(inst.agent[0].requestor)
+        self.assertEqual(inst.agent[0].role[0].coding[0].code, "110153")
+        self.assertEqual(inst.agent[0].role[0].coding[0].display, "Source Role ID")
+        self.assertEqual(inst.agent[0].role[0].coding[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.agent[0].userId.value, "ExportToMedia.app")
+        self.assertEqual(inst.agent[1].altId, "601847123")
+        self.assertEqual(inst.agent[1].name, "Grahame Grieve")
+        self.assertTrue(inst.agent[1].requestor)
+        self.assertEqual(inst.agent[1].userId.value, "95")
+        self.assertEqual(inst.agent[2].media.code, "110033")
+        self.assertEqual(inst.agent[2].media.display, "DVD")
+        self.assertEqual(inst.agent[2].media.system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.agent[2].name, "Media title: Hello World")
+        self.assertFalse(inst.agent[2].requestor)
+        self.assertEqual(inst.entity[0].identifier.value, "e3cdfc81a0d24bd^^^&2.16.840.1.113883.4.2&ISO")
+        self.assertEqual(inst.entity[0].role.code, "1")
+        self.assertEqual(inst.entity[0].role.display, "Patient")
+        self.assertEqual(inst.entity[0].role.system, "http://hl7.org/fhir/object-role")
+        self.assertEqual(inst.entity[0].type.code, "1")
+        self.assertEqual(inst.entity[0].type.display, "Person")
+        self.assertEqual(inst.entity[0].type.system, "http://hl7.org/fhir/object-type")
+        self.assertEqual(inst.entity[1].identifier.type.coding[0].code, "IHE XDS Metadata")
+        self.assertEqual(inst.entity[1].identifier.type.coding[0].display, "submission set classificationNode")
+        self.assertEqual(inst.entity[1].identifier.type.coding[0].system, "urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd")
+        self.assertEqual(inst.entity[1].identifier.value, "e3cdfc81a0d24bd^^^&2.16.840.1.113883.4.2&ISO")
+        self.assertEqual(inst.entity[1].role.code, "20")
+        self.assertEqual(inst.entity[1].role.display, "Job")
+        self.assertEqual(inst.entity[1].role.system, "http://hl7.org/fhir/object-role")
+        self.assertEqual(inst.entity[1].type.code, "2")
+        self.assertEqual(inst.entity[1].type.display, "System Object")
+        self.assertEqual(inst.entity[1].type.system, "http://hl7.org/fhir/object-type")
+        self.assertEqual(inst.entity[2].type.code, "2")
+        self.assertEqual(inst.entity[2].type.display, "System Object")
+        self.assertEqual(inst.entity[2].type.system, "http://hl7.org/fhir/object-type")
+        self.assertEqual(inst.id, "example-media")
+        self.assertEqual(inst.outcome, "0")
+        self.assertEqual(inst.recorded.date, FHIRDate("2015-08-27T23:42:24Z").date)
+        self.assertEqual(inst.recorded.as_json(), "2015-08-27T23:42:24Z")
+        self.assertEqual(inst.source.identifier.value, "hl7connect.healthintersections.com.au")
+        self.assertEqual(inst.subtype[0].code, "ITI-32")
+        self.assertEqual(inst.subtype[0].display, "Distribute Document Set on Media")
+        self.assertEqual(inst.subtype[0].system, "urn:oid:1.3.6.1.4.1.19376.1.2")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.code, "110106")
+        self.assertEqual(inst.type.display, "Export")
+        self.assertEqual(inst.type.system, "http://dicom.nema.org/resources/ontology/DCM")
+    
+    def testAuditEvent4(self):
+        inst = self.instantiate_from("audit-event-example-pixQuery.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance")
+        self.implAuditEvent4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AuditEvent", js["resourceType"])
+        inst2 = auditevent.AuditEvent(js)
+        self.implAuditEvent4(inst2)
+    
+    def implAuditEvent4(self, inst):
+        self.assertEqual(inst.action, "E")
+        self.assertEqual(inst.agent[0].altId, "6580")
+        self.assertEqual(inst.agent[0].network.address, "Workstation1.ehr.familyclinic.com")
+        self.assertEqual(inst.agent[0].network.type, "1")
+        self.assertFalse(inst.agent[0].requestor)
+        self.assertEqual(inst.agent[0].role[0].coding[0].code, "110153")
+        self.assertEqual(inst.agent[0].role[0].coding[0].display, "Source Role ID")
+        self.assertEqual(inst.agent[0].role[0].coding[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.agent[0].userId.value, "2.16.840.1.113883.4.2|2.16.840.1.113883.4.2")
+        self.assertEqual(inst.agent[1].altId, "601847123")
+        self.assertEqual(inst.agent[1].name, "Grahame Grieve")
+        self.assertTrue(inst.agent[1].requestor)
+        self.assertEqual(inst.agent[1].userId.value, "95")
+        self.assertEqual(inst.entity[0].identifier.value, "e3cdfc81a0d24bd^^^&2.16.840.1.113883.4.2&ISO")
+        self.assertEqual(inst.entity[0].role.code, "1")
+        self.assertEqual(inst.entity[0].role.display, "Patient")
+        self.assertEqual(inst.entity[0].role.system, "http://hl7.org/fhir/object-role")
+        self.assertEqual(inst.entity[0].type.code, "1")
+        self.assertEqual(inst.entity[0].type.display, "Person")
+        self.assertEqual(inst.entity[0].type.system, "http://hl7.org/fhir/object-type")
+        self.assertEqual(inst.entity[1].detail[0].type, "MSH-10")
+        self.assertEqual(inst.entity[1].detail[0].value, "MS4yLjg0MC4xMTQzNTAuMS4xMy4wLjEuNy4xLjE=")
+        self.assertEqual(inst.entity[1].role.code, "24")
+        self.assertEqual(inst.entity[1].role.display, "Query")
+        self.assertEqual(inst.entity[1].role.system, "http://hl7.org/fhir/object-role")
+        self.assertEqual(inst.entity[1].type.code, "2")
+        self.assertEqual(inst.entity[1].type.display, "System Object")
+        self.assertEqual(inst.entity[1].type.system, "http://hl7.org/fhir/object-type")
+        self.assertEqual(inst.id, "example-pixQuery")
+        self.assertEqual(inst.outcome, "0")
+        self.assertEqual(inst.recorded.date, FHIRDate("2015-08-26T23:42:24Z").date)
+        self.assertEqual(inst.recorded.as_json(), "2015-08-26T23:42:24Z")
+        self.assertEqual(inst.source.identifier.value, "hl7connect.healthintersections.com.au")
+        self.assertEqual(inst.subtype[0].code, "ITI-9")
+        self.assertEqual(inst.subtype[0].display, "PIX Query")
+        self.assertEqual(inst.subtype[0].system, "urn:oid:1.3.6.1.4.1.19376.1.2")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.code, "110112")
+        self.assertEqual(inst.type.display, "Query")
+        self.assertEqual(inst.type.system, "http://dicom.nema.org/resources/ontology/DCM")
+    
+    def testAuditEvent5(self):
+        inst = self.instantiate_from("audit-event-example-search.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance")
+        self.implAuditEvent5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AuditEvent", js["resourceType"])
+        inst2 = auditevent.AuditEvent(js)
+        self.implAuditEvent5(inst2)
+    
+    def implAuditEvent5(self, inst):
+        self.assertEqual(inst.action, "E")
+        self.assertEqual(inst.agent[0].altId, "601847123")
+        self.assertEqual(inst.agent[0].name, "Grahame Grieve")
+        self.assertTrue(inst.agent[0].requestor)
+        self.assertEqual(inst.agent[0].userId.value, "95")
+        self.assertEqual(inst.agent[1].altId, "6580")
+        self.assertEqual(inst.agent[1].network.address, "Workstation1.ehr.familyclinic.com")
+        self.assertEqual(inst.agent[1].network.type, "1")
+        self.assertFalse(inst.agent[1].requestor)
+        self.assertEqual(inst.agent[1].role[0].coding[0].code, "110153")
+        self.assertEqual(inst.agent[1].role[0].coding[0].display, "Source Role ID")
+        self.assertEqual(inst.agent[1].role[0].coding[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.agent[1].userId.value, "2.16.840.1.113883.4.2|2.16.840.1.113883.4.2")
+        self.assertEqual(inst.entity[0].query, "aHR0cDovL2ZoaXItZGV2LmhlYWx0aGludGVyc2VjdGlvbnMuY29tLmF1L29wZW4vRW5jb3VudGVyP3BhcnRpY2lwYW50PTEz")
+        self.assertEqual(inst.entity[0].role.code, "24")
+        self.assertEqual(inst.entity[0].role.display, "Query")
+        self.assertEqual(inst.entity[0].role.system, "http://hl7.org/fhir/object-role")
+        self.assertEqual(inst.entity[0].type.code, "2")
+        self.assertEqual(inst.entity[0].type.display, "System Object")
+        self.assertEqual(inst.entity[0].type.system, "http://hl7.org/fhir/object-type")
+        self.assertEqual(inst.id, "example-search")
+        self.assertEqual(inst.outcome, "0")
+        self.assertEqual(inst.recorded.date, FHIRDate("2015-08-22T23:42:24Z").date)
+        self.assertEqual(inst.recorded.as_json(), "2015-08-22T23:42:24Z")
+        self.assertEqual(inst.source.identifier.value, "hl7connect.healthintersections.com.au")
+        self.assertEqual(inst.source.site, "Cloud")
+        self.assertEqual(inst.source.type[0].code, "3")
+        self.assertEqual(inst.source.type[0].display, "Web Server")
+        self.assertEqual(inst.source.type[0].system, "http://hl7.org/fhir/security-source-type")
+        self.assertEqual(inst.subtype[0].code, "search")
+        self.assertEqual(inst.subtype[0].display, "search")
+        self.assertEqual(inst.subtype[0].system, "http://hl7.org/fhir/restful-interaction")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.code, "rest")
+        self.assertEqual(inst.type.display, "Restful Operation")
+        self.assertEqual(inst.type.system, "http://hl7.org/fhir/audit-event-type")
+    
+    def testAuditEvent6(self):
+        inst = self.instantiate_from("audit-event-example-vread.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance")
+        self.implAuditEvent6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AuditEvent", js["resourceType"])
+        inst2 = auditevent.AuditEvent(js)
+        self.implAuditEvent6(inst2)
+    
+    def implAuditEvent6(self, inst):
+        self.assertEqual(inst.action, "R")
+        self.assertEqual(inst.agent[0].altId, "601847123")
+        self.assertEqual(inst.agent[0].name, "Grahame Grieve")
+        self.assertTrue(inst.agent[0].requestor)
+        self.assertEqual(inst.agent[0].userId.value, "95")
+        self.assertEqual(inst.agent[1].altId, "6580")
+        self.assertEqual(inst.agent[1].network.address, "Workstation1.ehr.familyclinic.com")
+        self.assertEqual(inst.agent[1].network.type, "1")
+        self.assertFalse(inst.agent[1].requestor)
+        self.assertEqual(inst.agent[1].role[0].coding[0].code, "110153")
+        self.assertEqual(inst.agent[1].role[0].coding[0].display, "Source Role ID")
+        self.assertEqual(inst.agent[1].role[0].coding[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.agent[1].userId.value, "2.16.840.1.113883.4.2|2.16.840.1.113883.4.2")
+        self.assertEqual(inst.entity[0].lifecycle.code, "6")
+        self.assertEqual(inst.entity[0].lifecycle.display, "Access / Use")
+        self.assertEqual(inst.entity[0].lifecycle.system, "http://hl7.org/fhir/dicom-audit-lifecycle")
+        self.assertEqual(inst.entity[0].type.code, "2")
+        self.assertEqual(inst.entity[0].type.display, "System Object")
+        self.assertEqual(inst.entity[0].type.system, "http://hl7.org/fhir/object-type")
+        self.assertEqual(inst.id, "example-rest")
+        self.assertEqual(inst.outcome, "0")
+        self.assertEqual(inst.recorded.date, FHIRDate("2013-06-20T23:42:24Z").date)
+        self.assertEqual(inst.recorded.as_json(), "2013-06-20T23:42:24Z")
+        self.assertEqual(inst.source.identifier.value, "hl7connect.healthintersections.com.au")
+        self.assertEqual(inst.source.site, "Cloud")
+        self.assertEqual(inst.source.type[0].code, "3")
+        self.assertEqual(inst.source.type[0].display, "Web Server")
+        self.assertEqual(inst.source.type[0].system, "http://hl7.org/fhir/security-source-type")
+        self.assertEqual(inst.subtype[0].code, "vread")
+        self.assertEqual(inst.subtype[0].display, "vread")
+        self.assertEqual(inst.subtype[0].system, "http://hl7.org/fhir/restful-interaction")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.code, "rest")
+        self.assertEqual(inst.type.display, "Restful Operation")
+        self.assertEqual(inst.type.system, "http://hl7.org/fhir/audit-event-type")
+    
+    def testAuditEvent7(self):
+        inst = self.instantiate_from("auditevent-example-disclosure.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance")
+        self.implAuditEvent7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AuditEvent", js["resourceType"])
+        inst2 = auditevent.AuditEvent(js)
+        self.implAuditEvent7(inst2)
+    
+    def implAuditEvent7(self, inst):
+        self.assertEqual(inst.action, "R")
+        self.assertEqual(inst.agent[0].altId, "notMe")
+        self.assertEqual(inst.agent[0].name, "That guy everyone wishes would be caught")
+        self.assertEqual(inst.agent[0].network.address, "custodian.net")
+        self.assertEqual(inst.agent[0].network.type, "1")
+        self.assertEqual(inst.agent[0].policy[0], "http://consent.com/yes")
+        self.assertTrue(inst.agent[0].requestor)
+        self.assertEqual(inst.agent[0].role[0].coding[0].code, "110153")
+        self.assertEqual(inst.agent[0].role[0].coding[0].display, "Source Role ID")
+        self.assertEqual(inst.agent[0].role[0].coding[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.agent[0].userId.value, "SomeIdiot at nowhere.com")
+        self.assertEqual(inst.agent[1].network.address, "marketing.land")
+        self.assertEqual(inst.agent[1].network.type, "1")
+        self.assertEqual(inst.agent[1].purposeOfUse[0].coding[0].code, "HMARKT")
+        self.assertEqual(inst.agent[1].purposeOfUse[0].coding[0].display, "healthcare marketing")
+        self.assertEqual(inst.agent[1].purposeOfUse[0].coding[0].system, "http://hl7.org/fhir/v3/ActReason")
+        self.assertFalse(inst.agent[1].requestor)
+        self.assertEqual(inst.agent[1].role[0].coding[0].code, "110152")
+        self.assertEqual(inst.agent[1].role[0].coding[0].display, "Destination Role ID")
+        self.assertEqual(inst.agent[1].role[0].coding[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.agent[1].userId.value, "Where")
+        self.assertEqual(inst.entity[0].role.code, "1")
+        self.assertEqual(inst.entity[0].role.display, "Patient")
+        self.assertEqual(inst.entity[0].role.system, "http://hl7.org/fhir/object-role")
+        self.assertEqual(inst.entity[0].type.code, "1")
+        self.assertEqual(inst.entity[0].type.display, "Person")
+        self.assertEqual(inst.entity[0].type.system, "http://hl7.org/fhir/object-type")
+        self.assertEqual(inst.entity[1].description, "data about Everthing important")
+        self.assertEqual(inst.entity[1].identifier.value, "What.id")
+        self.assertEqual(inst.entity[1].lifecycle.code, "11")
+        self.assertEqual(inst.entity[1].lifecycle.display, "Disclosure")
+        self.assertEqual(inst.entity[1].lifecycle.system, "http://hl7.org/fhir/dicom-audit-lifecycle")
+        self.assertEqual(inst.entity[1].name, "Namne of What")
+        self.assertEqual(inst.entity[1].role.code, "4")
+        self.assertEqual(inst.entity[1].role.display, "Domain Resource")
+        self.assertEqual(inst.entity[1].role.system, "http://hl7.org/fhir/object-role")
+        self.assertEqual(inst.entity[1].securityLabel[0].code, "V")
+        self.assertEqual(inst.entity[1].securityLabel[0].display, "very restricted")
+        self.assertEqual(inst.entity[1].securityLabel[0].system, "http://hl7.org/fhir/v3/Confidentiality")
+        self.assertEqual(inst.entity[1].securityLabel[1].code, "STD")
+        self.assertEqual(inst.entity[1].securityLabel[1].display, "sexually transmitted disease information sensitivity")
+        self.assertEqual(inst.entity[1].securityLabel[1].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.entity[1].securityLabel[2].code, "DELAU")
+        self.assertEqual(inst.entity[1].securityLabel[2].display, "delete after use")
+        self.assertEqual(inst.entity[1].securityLabel[2].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.entity[1].type.code, "2")
+        self.assertEqual(inst.entity[1].type.display, "System Object")
+        self.assertEqual(inst.entity[1].type.system, "http://hl7.org/fhir/object-type")
+        self.assertEqual(inst.id, "example-disclosure")
+        self.assertEqual(inst.outcome, "0")
+        self.assertEqual(inst.outcomeDesc, "Successful  Disclosure")
+        self.assertEqual(inst.purposeOfEvent[0].coding[0].code, "HMARKT")
+        self.assertEqual(inst.purposeOfEvent[0].coding[0].display, "healthcare marketing")
+        self.assertEqual(inst.purposeOfEvent[0].coding[0].system, "http://hl7.org/fhir/v3/ActReason")
+        self.assertEqual(inst.recorded.date, FHIRDate("2013-09-22T00:08:00Z").date)
+        self.assertEqual(inst.recorded.as_json(), "2013-09-22T00:08:00Z")
+        self.assertEqual(inst.source.identifier.value, "Watchers Accounting of Disclosures Application")
+        self.assertEqual(inst.source.site, "Watcher")
+        self.assertEqual(inst.source.type[0].code, "4")
+        self.assertEqual(inst.source.type[0].display, "Application Server")
+        self.assertEqual(inst.source.type[0].system, "http://hl7.org/fhir/security-source-type")
+        self.assertEqual(inst.subtype[0].code, "Disclosure")
+        self.assertEqual(inst.subtype[0].display, "HIPAA disclosure")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Disclosure by some idiot, for marketing reasons, to places unknown, of a Poor Sap, data about Everthing important.</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.code, "110106")
+        self.assertEqual(inst.type.display, "Export")
+        self.assertEqual(inst.type.system, "http://dicom.nema.org/resources/ontology/DCM")
+    
+    def testAuditEvent8(self):
+        inst = self.instantiate_from("auditevent-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a AuditEvent instance")
+        self.implAuditEvent8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("AuditEvent", js["resourceType"])
+        inst2 = auditevent.AuditEvent(js)
+        self.implAuditEvent8(inst2)
+    
+    def implAuditEvent8(self, inst):
+        self.assertEqual(inst.action, "E")
+        self.assertEqual(inst.agent[0].network.address, "127.0.0.1")
+        self.assertEqual(inst.agent[0].network.type, "2")
+        self.assertFalse(inst.agent[0].requestor)
+        self.assertEqual(inst.agent[0].role[0].text, "Service User (Logon)")
+        self.assertEqual(inst.agent[0].userId.value, "Grahame")
+        self.assertEqual(inst.agent[1].altId, "6580")
+        self.assertEqual(inst.agent[1].network.address, "Workstation1.ehr.familyclinic.com")
+        self.assertEqual(inst.agent[1].network.type, "1")
+        self.assertFalse(inst.agent[1].requestor)
+        self.assertEqual(inst.agent[1].role[0].coding[0].code, "110153")
+        self.assertEqual(inst.agent[1].role[0].coding[0].display, "Source Role ID")
+        self.assertEqual(inst.agent[1].role[0].coding[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.agent[1].userId.value, "2.16.840.1.113883.4.2|2.16.840.1.113883.4.2")
+        self.assertEqual(inst.entity[0].identifier.type.coding[0].code, "SNO")
+        self.assertEqual(inst.entity[0].identifier.type.coding[0].system, "http://hl7.org/fhir/identifier-type")
+        self.assertEqual(inst.entity[0].identifier.type.text, "Dell Serial Number")
+        self.assertEqual(inst.entity[0].identifier.value, "ABCDEF")
+        self.assertEqual(inst.entity[0].lifecycle.code, "6")
+        self.assertEqual(inst.entity[0].lifecycle.display, "Access / Use")
+        self.assertEqual(inst.entity[0].lifecycle.system, "http://hl7.org/fhir/dicom-audit-lifecycle")
+        self.assertEqual(inst.entity[0].name, "Grahame's Laptop")
+        self.assertEqual(inst.entity[0].role.code, "4")
+        self.assertEqual(inst.entity[0].role.display, "Domain Resource")
+        self.assertEqual(inst.entity[0].role.system, "http://hl7.org/fhir/object-role")
+        self.assertEqual(inst.entity[0].type.code, "4")
+        self.assertEqual(inst.entity[0].type.display, "Other")
+        self.assertEqual(inst.entity[0].type.system, "http://hl7.org/fhir/object-type")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.outcome, "0")
+        self.assertEqual(inst.recorded.date, FHIRDate("2012-10-25T22:04:27+11:00").date)
+        self.assertEqual(inst.recorded.as_json(), "2012-10-25T22:04:27+11:00")
+        self.assertEqual(inst.source.identifier.value, "Grahame's Laptop")
+        self.assertEqual(inst.source.site, "Development")
+        self.assertEqual(inst.source.type[0].code, "110122")
+        self.assertEqual(inst.source.type[0].display, "Login")
+        self.assertEqual(inst.source.type[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.subtype[0].code, "110120")
+        self.assertEqual(inst.subtype[0].display, "Application Start")
+        self.assertEqual(inst.subtype[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Application Start for under service login "Grahame" (id: Grahame's Test HL7Connect)</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.code, "110100")
+        self.assertEqual(inst.type.display, "Application Activity")
+        self.assertEqual(inst.type.system, "http://dicom.nema.org/resources/ontology/DCM")
+
diff --git a/fhirclient/models/backboneelement.py b/fhirclient/models/backboneelement.py
new file mode 100644
index 0000000..1207392
--- /dev/null
+++ b/fhirclient/models/backboneelement.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/BackboneElement) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class BackboneElement(element.Element):
+    """ Base for elements defined inside a resource.
+    
+    Base definition for all elements that are defined inside a resource - but
+    not those in a data type.
+    """
+    
+    resource_type = "BackboneElement"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.modifierExtension = None
+        """ Extensions that cannot be ignored.
+        List of `Extension` items (represented as `dict` in JSON). """
+        
+        super(BackboneElement, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(BackboneElement, self).elementProperties()
+        js.extend([
+            ("modifierExtension", "modifierExtension", extension.Extension, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import extension
+except ImportError:
+    extension = sys.modules[__package__ + '.extension']
diff --git a/fhirclient/models/basic.py b/fhirclient/models/basic.py
new file mode 100644
index 0000000..5b745f8
--- /dev/null
+++ b/fhirclient/models/basic.py
@@ -0,0 +1,78 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Basic) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Basic(domainresource.DomainResource):
+    """ Resource for non-supported content.
+    
+    Basic is used for handling concepts not yet defined in FHIR, narrative-only
+    resources that don't map to an existing resource, and custom resources not
+    appropriate for inclusion in the FHIR specification.
+    """
+    
+    resource_type = "Basic"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.author = None
+        """ Who created.
+        Type `FHIRReference` referencing `Practitioner, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Kind of Resource.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.created = None
+        """ When created.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.subject = None
+        """ Identifies the focus of this resource.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(Basic, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Basic, self).elementProperties()
+        js.extend([
+            ("author", "author", fhirreference.FHIRReference, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/basic_tests.py b/fhirclient/models/basic_tests.py
new file mode 100644
index 0000000..70ca2ca
--- /dev/null
+++ b/fhirclient/models/basic_tests.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import basic
+from .fhirdate import FHIRDate
+
+
+class BasicTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Basic", js["resourceType"])
+        return basic.Basic(js)
+    
+    def testBasic1(self):
+        inst = self.instantiate_from("basic-example-narrative.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Basic instance")
+        self.implBasic1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Basic", js["resourceType"])
+        inst2 = basic.Basic(js)
+        self.implBasic1(inst2)
+    
+    def implBasic1(self, inst):
+        self.assertEqual(inst.code.text, "Example Narrative Tester")
+        self.assertEqual(inst.id, "basic-example-narrative")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testBasic2(self):
+        inst = self.instantiate_from("basic-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Basic instance")
+        self.implBasic2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Basic", js["resourceType"])
+        inst2 = basic.Basic(js)
+        self.implBasic2(inst2)
+    
+    def implBasic2(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "referral")
+        self.assertEqual(inst.code.coding[0].system, "http://hl7.org/fhir/basic-resource-type")
+        self.assertEqual(inst.created.date, FHIRDate("2013-05-14").date)
+        self.assertEqual(inst.created.as_json(), "2013-05-14")
+        self.assertEqual(inst.extension[0].url, "http://example.org/do-not-use/fhir-extensions/referral#requestingPractitioner")
+        self.assertEqual(inst.extension[1].url, "http://example.org/do-not-use/fhir-extensions/referral#notes")
+        self.assertEqual(inst.extension[1].valueString, "The patient had fever peaks over the last couple of days. He is worried about these peaks.")
+        self.assertEqual(inst.extension[2].url, "http://example.org/do-not-use/fhir-extensions/referral#fulfillingEncounter")
+        self.assertEqual(inst.id, "referral")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealth.org/basic/identifiers")
+        self.assertEqual(inst.identifier[0].value, "19283746")
+        self.assertEqual(inst.modifierExtension[0].url, "http://example.org/do-not-use/fhir-extensions/referral#referredForService")
+        self.assertEqual(inst.modifierExtension[0].valueCodeableConcept.coding[0].code, "11429006")
+        self.assertEqual(inst.modifierExtension[0].valueCodeableConcept.coding[0].display, "Consultation")
+        self.assertEqual(inst.modifierExtension[0].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.modifierExtension[1].url, "http://example.org/do-not-use/fhir-extensions/referral#targetDate")
+        self.assertEqual(inst.modifierExtension[1].valuePeriod.end.date, FHIRDate("2013-04-15").date)
+        self.assertEqual(inst.modifierExtension[1].valuePeriod.end.as_json(), "2013-04-15")
+        self.assertEqual(inst.modifierExtension[1].valuePeriod.start.date, FHIRDate("2013-04-01").date)
+        self.assertEqual(inst.modifierExtension[1].valuePeriod.start.as_json(), "2013-04-01")
+        self.assertEqual(inst.modifierExtension[2].url, "http://example.org/do-not-use/fhir-extensions/referral#status")
+        self.assertEqual(inst.modifierExtension[2].valueCode, "complete")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testBasic3(self):
+        inst = self.instantiate_from("basic-example2.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Basic instance")
+        self.implBasic3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Basic", js["resourceType"])
+        inst2 = basic.Basic(js)
+        self.implBasic3(inst2)
+    
+    def implBasic3(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "UMLCLASSMODEL")
+        self.assertEqual(inst.code.coding[0].system, "http://example.org/do-not-use/fhir-codes#resourceTypes")
+        self.assertEqual(inst.extension[0].extension[0].url, "name")
+        self.assertEqual(inst.extension[0].extension[0].valueString, "Class1")
+        self.assertEqual(inst.extension[0].extension[1].extension[0].url, "name")
+        self.assertEqual(inst.extension[0].extension[1].extension[0].valueString, "attribute1")
+        self.assertEqual(inst.extension[0].extension[1].extension[1].url, "minOccurs")
+        self.assertEqual(inst.extension[0].extension[1].extension[1].valueInteger, 1)
+        self.assertEqual(inst.extension[0].extension[1].extension[2].url, "maxOccurs")
+        self.assertEqual(inst.extension[0].extension[1].extension[2].valueCode, "*")
+        self.assertEqual(inst.extension[0].extension[1].url, "attribute")
+        self.assertEqual(inst.extension[0].extension[2].extension[0].url, "name")
+        self.assertEqual(inst.extension[0].extension[2].extension[0].valueString, "attribute2")
+        self.assertEqual(inst.extension[0].extension[2].extension[1].url, "minOccurs")
+        self.assertEqual(inst.extension[0].extension[2].extension[1].valueInteger, 0)
+        self.assertEqual(inst.extension[0].extension[2].extension[2].url, "maxOccurs")
+        self.assertEqual(inst.extension[0].extension[2].extension[2].valueInteger, 1)
+        self.assertEqual(inst.extension[0].extension[2].url, "attribute")
+        self.assertEqual(inst.extension[0].url, "http://example.org/do-not-use/fhir-extensions/UMLclass")
+        self.assertEqual(inst.id, "classModel")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/binary.py b/fhirclient/models/binary.py
new file mode 100644
index 0000000..4ed0d76
--- /dev/null
+++ b/fhirclient/models/binary.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Binary) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import resource
+
+class Binary(resource.Resource):
+    """ Pure binary content defined by a format other than FHIR.
+    
+    A binary resource can contain any content, whether text, image, pdf, zip
+    archive, etc.
+    """
+    
+    resource_type = "Binary"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.content = None
+        """ The actual content.
+        Type `str`. """
+        
+        self.contentType = None
+        """ MimeType of the binary content.
+        Type `str`. """
+        
+        self.securityContext = None
+        """ Access Control Management.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(Binary, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Binary, self).elementProperties()
+        js.extend([
+            ("content", "content", str, False, None, True),
+            ("contentType", "contentType", str, False, None, True),
+            ("securityContext", "securityContext", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
diff --git a/fhirclient/models/binary_tests.py b/fhirclient/models/binary_tests.py
new file mode 100644
index 0000000..6334f54
--- /dev/null
+++ b/fhirclient/models/binary_tests.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import binary
+from .fhirdate import FHIRDate
+
+
+class BinaryTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Binary", js["resourceType"])
+        return binary.Binary(js)
+    
+    def testBinary1(self):
+        inst = self.instantiate_from("binary-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Binary instance")
+        self.implBinary1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Binary", js["resourceType"])
+        inst2 = binary.Binary(js)
+        self.implBinary1(inst2)
+    
+    def implBinary1(self, inst):
+        self.assertEqual(inst.contentType, "application/pdf")
+        self.assertEqual(inst.id, "example")
+
diff --git a/fhirclient/models/bodysite.py b/fhirclient/models/bodysite.py
new file mode 100644
index 0000000..4444d85
--- /dev/null
+++ b/fhirclient/models/bodysite.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/BodySite) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class BodySite(domainresource.DomainResource):
+    """ Specific and identified anatomical location.
+    
+    Record details about the anatomical location of a specimen or body part.
+    This resource may be used when a coded concept does not provide the
+    necessary detail needed for the use case.
+    """
+    
+    resource_type = "BodySite"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Whether this body site record is in active use.
+        Type `bool`. """
+        
+        self.code = None
+        """ Named anatomical location.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Anatomical location description.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Bodysite identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.image = None
+        """ Attached images.
+        List of `Attachment` items (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ Who this is about.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.qualifier = None
+        """ Modification to location code.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(BodySite, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(BodySite, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("image", "image", attachment.Attachment, True, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("qualifier", "qualifier", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/bodysite_tests.py b/fhirclient/models/bodysite_tests.py
new file mode 100644
index 0000000..10e2e4f
--- /dev/null
+++ b/fhirclient/models/bodysite_tests.py
@@ -0,0 +1,93 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import bodysite
+from .fhirdate import FHIRDate
+
+
+class BodySiteTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("BodySite", js["resourceType"])
+        return bodysite.BodySite(js)
+    
+    def testBodySite1(self):
+        inst = self.instantiate_from("bodysite-example-fetus.json")
+        self.assertIsNotNone(inst, "Must have instantiated a BodySite instance")
+        self.implBodySite1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("BodySite", js["resourceType"])
+        inst2 = bodysite.BodySite(js)
+        self.implBodySite1(inst2)
+    
+    def implBodySite1(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "83418008")
+        self.assertEqual(inst.code.coding[0].display, "Entire fetus (body structure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Fetus")
+        self.assertEqual(inst.description, "EDD 1/1/2017 confirmation by LMP")
+        self.assertEqual(inst.id, "fetus")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealth.org/bodysite/identifiers")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testBodySite2(self):
+        inst = self.instantiate_from("bodysite-example-skin-patch.json")
+        self.assertIsNotNone(inst, "Must have instantiated a BodySite instance")
+        self.implBodySite2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("BodySite", js["resourceType"])
+        inst2 = bodysite.BodySite(js)
+        self.implBodySite2(inst2)
+    
+    def implBodySite2(self, inst):
+        self.assertFalse(inst.active)
+        self.assertEqual(inst.code.coding[0].code, "39937001")
+        self.assertEqual(inst.code.coding[0].display, "Skin structure (body structure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Skin patch")
+        self.assertEqual(inst.description, "inner surface (volar) of the left forearm")
+        self.assertEqual(inst.id, "skin-patch")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealth.org/bodysite/identifiers")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testBodySite3(self):
+        inst = self.instantiate_from("bodysite-example-tumor.json")
+        self.assertIsNotNone(inst, "Must have instantiated a BodySite instance")
+        self.implBodySite3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("BodySite", js["resourceType"])
+        inst2 = bodysite.BodySite(js)
+        self.implBodySite3(inst2)
+    
+    def implBodySite3(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "4147007")
+        self.assertEqual(inst.code.coding[0].display, "Mass (morphologic abnormality)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Splenic mass")
+        self.assertEqual(inst.description, "7 cm maximum diameter")
+        self.assertEqual(inst.id, "tumor")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealth.org/bodysite/identifiers")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.image[0].contentType, "application/dicom")
+        self.assertEqual(inst.image[0].url, "http://imaging.acme.com/wado/server?requestType=WADO&wado_details")
+        self.assertEqual(inst.qualifier[0].coding[0].code, "78961009")
+        self.assertEqual(inst.qualifier[0].coding[0].display, "Splenic structure (body structure)")
+        self.assertEqual(inst.qualifier[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.qualifier[0].text, "Splenic mass")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/bundle.py b/fhirclient/models/bundle.py
new file mode 100644
index 0000000..ce89481
--- /dev/null
+++ b/fhirclient/models/bundle.py
@@ -0,0 +1,315 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Bundle) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import resource
+
+class Bundle(resource.Resource):
+    """ Contains a collection of resources.
+    
+    A container for a collection of resources.
+    """
+    
+    resource_type = "Bundle"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.entry = None
+        """ Entry in the bundle - will have a resource, or information.
+        List of `BundleEntry` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Persistent identifier for the bundle.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.link = None
+        """ Links related to this Bundle.
+        List of `BundleLink` items (represented as `dict` in JSON). """
+        
+        self.signature = None
+        """ Digital Signature.
+        Type `Signature` (represented as `dict` in JSON). """
+        
+        self.total = None
+        """ If search, the total number of matches.
+        Type `int`. """
+        
+        self.type = None
+        """ document | message | transaction | transaction-response | batch |
+        batch-response | history | searchset | collection.
+        Type `str`. """
+        
+        super(Bundle, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Bundle, self).elementProperties()
+        js.extend([
+            ("entry", "entry", BundleEntry, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("link", "link", BundleLink, True, None, False),
+            ("signature", "signature", signature.Signature, False, None, False),
+            ("total", "total", int, False, None, False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class BundleEntry(backboneelement.BackboneElement):
+    """ Entry in the bundle - will have a resource, or information.
+    
+    An entry in a bundle resource - will either contain a resource, or
+    information about a resource (transactions and history only).
+    """
+    
+    resource_type = "BundleEntry"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.fullUrl = None
+        """ Absolute URL for resource (server address, or UUID/OID).
+        Type `str`. """
+        
+        self.link = None
+        """ Links related to this entry.
+        List of `BundleLink` items (represented as `dict` in JSON). """
+        
+        self.request = None
+        """ Transaction Related Information.
+        Type `BundleEntryRequest` (represented as `dict` in JSON). """
+        
+        self.resource = None
+        """ A resource in the bundle.
+        Type `Resource` (represented as `dict` in JSON). """
+        
+        self.response = None
+        """ Transaction Related Information.
+        Type `BundleEntryResponse` (represented as `dict` in JSON). """
+        
+        self.search = None
+        """ Search related information.
+        Type `BundleEntrySearch` (represented as `dict` in JSON). """
+        
+        super(BundleEntry, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(BundleEntry, self).elementProperties()
+        js.extend([
+            ("fullUrl", "fullUrl", str, False, None, False),
+            ("link", "link", BundleLink, True, None, False),
+            ("request", "request", BundleEntryRequest, False, None, False),
+            ("resource", "resource", resource.Resource, False, None, False),
+            ("response", "response", BundleEntryResponse, False, None, False),
+            ("search", "search", BundleEntrySearch, False, None, False),
+        ])
+        return js
+
+
+class BundleEntryRequest(backboneelement.BackboneElement):
+    """ Transaction Related Information.
+    
+    Additional information about how this entry should be processed as part of
+    a transaction.
+    """
+    
+    resource_type = "BundleEntryRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.ifMatch = None
+        """ For managing update contention.
+        Type `str`. """
+        
+        self.ifModifiedSince = None
+        """ For managing update contention.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.ifNoneExist = None
+        """ For conditional creates.
+        Type `str`. """
+        
+        self.ifNoneMatch = None
+        """ For managing cache currency.
+        Type `str`. """
+        
+        self.method = None
+        """ GET | POST | PUT | DELETE.
+        Type `str`. """
+        
+        self.url = None
+        """ URL for HTTP equivalent of this entry.
+        Type `str`. """
+        
+        super(BundleEntryRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(BundleEntryRequest, self).elementProperties()
+        js.extend([
+            ("ifMatch", "ifMatch", str, False, None, False),
+            ("ifModifiedSince", "ifModifiedSince", fhirdate.FHIRDate, False, None, False),
+            ("ifNoneExist", "ifNoneExist", str, False, None, False),
+            ("ifNoneMatch", "ifNoneMatch", str, False, None, False),
+            ("method", "method", str, False, None, True),
+            ("url", "url", str, False, None, True),
+        ])
+        return js
+
+
+class BundleEntryResponse(backboneelement.BackboneElement):
+    """ Transaction Related Information.
+    
+    Additional information about how this entry should be processed as part of
+    a transaction.
+    """
+    
+    resource_type = "BundleEntryResponse"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.etag = None
+        """ The etag for the resource (if relevant).
+        Type `str`. """
+        
+        self.lastModified = None
+        """ Server's date time modified.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.location = None
+        """ The location, if the operation returns a location.
+        Type `str`. """
+        
+        self.outcome = None
+        """ OperationOutcome with hints and warnings (for batch/transaction).
+        Type `Resource` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ Status response code (text optional).
+        Type `str`. """
+        
+        super(BundleEntryResponse, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(BundleEntryResponse, self).elementProperties()
+        js.extend([
+            ("etag", "etag", str, False, None, False),
+            ("lastModified", "lastModified", fhirdate.FHIRDate, False, None, False),
+            ("location", "location", str, False, None, False),
+            ("outcome", "outcome", resource.Resource, False, None, False),
+            ("status", "status", str, False, None, True),
+        ])
+        return js
+
+
+class BundleEntrySearch(backboneelement.BackboneElement):
+    """ Search related information.
+    
+    Information about the search process that lead to the creation of this
+    entry.
+    """
+    
+    resource_type = "BundleEntrySearch"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.mode = None
+        """ match | include | outcome - why this is in the result set.
+        Type `str`. """
+        
+        self.score = None
+        """ Search ranking (between 0 and 1).
+        Type `float`. """
+        
+        super(BundleEntrySearch, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(BundleEntrySearch, self).elementProperties()
+        js.extend([
+            ("mode", "mode", str, False, None, False),
+            ("score", "score", float, False, None, False),
+        ])
+        return js
+
+
+class BundleLink(backboneelement.BackboneElement):
+    """ Links related to this Bundle.
+    
+    A series of links that provide context to this bundle.
+    """
+    
+    resource_type = "BundleLink"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.relation = None
+        """ See http://www.iana.org/assignments/link-relations/link-
+        relations.xhtml#link-relations-1.
+        Type `str`. """
+        
+        self.url = None
+        """ Reference details for the link.
+        Type `str`. """
+        
+        super(BundleLink, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(BundleLink, self).elementProperties()
+        js.extend([
+            ("relation", "relation", str, False, None, True),
+            ("url", "url", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import signature
+except ImportError:
+    signature = sys.modules[__package__ + '.signature']
diff --git a/fhirclient/models/bundle_tests.py b/fhirclient/models/bundle_tests.py
new file mode 100644
index 0000000..a3ee457
--- /dev/null
+++ b/fhirclient/models/bundle_tests.py
@@ -0,0 +1,453 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import bundle
+from .fhirdate import FHIRDate
+
+
+class BundleTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Bundle", js["resourceType"])
+        return bundle.Bundle(js)
+    
+    def testBundle1(self):
+        inst = self.instantiate_from("bundle-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Bundle instance")
+        self.implBundle1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Bundle", js["resourceType"])
+        inst2 = bundle.Bundle(js)
+        self.implBundle1(inst2)
+    
+    def implBundle1(self, inst):
+        self.assertEqual(inst.entry[0].fullUrl, "https://example.com/base/MedicationRequest/3123")
+        self.assertEqual(inst.entry[0].resource.id, "3123")
+        self.assertEqual(inst.entry[0].search.mode, "match")
+        self.assertEqual(inst.entry[0].search.score, 1)
+        self.assertEqual(inst.entry[1].fullUrl, "https://example.com/base/Medication/example")
+        self.assertEqual(inst.entry[1].resource.id, "example")
+        self.assertEqual(inst.entry[1].search.mode, "include")
+        self.assertEqual(inst.id, "bundle-example")
+        self.assertEqual(inst.link[0].relation, "self")
+        self.assertEqual(inst.link[0].url, "https://example.com/base/MedicationRequest?patient=347&_include=MedicationRequest.medication")
+        self.assertEqual(inst.link[1].relation, "next")
+        self.assertEqual(inst.link[1].url, "https://example.com/base/MedicationRequest?patient=347&searchId=ff15fd40-ff71-4b48-b366-09c706bed9d0&page=2")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2014-08-18T01:43:30Z").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2014-08-18T01:43:30Z")
+        self.assertEqual(inst.total, 3)
+        self.assertEqual(inst.type, "searchset")
+    
+    def testBundle2(self):
+        inst = self.instantiate_from("diagnosticreport-examples-general.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Bundle instance")
+        self.implBundle2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Bundle", js["resourceType"])
+        inst2 = bundle.Bundle(js)
+        self.implBundle2(inst2)
+    
+    def implBundle2(self, inst):
+        self.assertEqual(inst.entry[0].fullUrl, "http://hl7.org/fhir/DiagnosticReport/3")
+        self.assertEqual(inst.entry[0].resource.id, "3")
+        self.assertEqual(inst.entry[0].resource.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.entry[0].resource.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.entry[1].fullUrl, "http://hl7.org/fhir/DiagnosticReport/4")
+        self.assertEqual(inst.entry[1].resource.id, "4")
+        self.assertEqual(inst.entry[1].resource.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.entry[1].resource.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.entry[2].fullUrl, "http://hl7.org/fhir/DiagnosticReport/5")
+        self.assertEqual(inst.entry[2].resource.id, "5")
+        self.assertEqual(inst.entry[2].resource.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.entry[2].resource.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.entry[3].fullUrl, "http://hl7.org/fhir/DiagnosticReport/6")
+        self.assertEqual(inst.entry[3].resource.id, "6")
+        self.assertEqual(inst.entry[3].resource.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.entry[3].resource.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.entry[4].fullUrl, "http://hl7.org/fhir/DiagnosticReport/7")
+        self.assertEqual(inst.entry[4].resource.id, "7")
+        self.assertEqual(inst.entry[4].resource.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.entry[4].resource.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.entry[5].fullUrl, "http://hl7.org/fhir/DiagnosticReport/8")
+        self.assertEqual(inst.entry[5].resource.id, "8")
+        self.assertEqual(inst.entry[5].resource.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.entry[5].resource.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.entry[6].fullUrl, "http://hl7.org/fhir/DiagnosticReport/9")
+        self.assertEqual(inst.entry[6].resource.id, "9")
+        self.assertEqual(inst.entry[6].resource.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.entry[6].resource.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.entry[7].fullUrl, "http://hl7.org/fhir/DiagnosticReport/15")
+        self.assertEqual(inst.entry[7].resource.id, "15")
+        self.assertEqual(inst.entry[7].resource.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.entry[7].resource.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.entry[8].fullUrl, "http://hl7.org/fhir/DiagnosticReport/16")
+        self.assertEqual(inst.entry[8].resource.id, "16")
+        self.assertEqual(inst.entry[8].resource.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.entry[8].resource.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.entry[9].fullUrl, "http://hl7.org/fhir/DiagnosticReport/17")
+        self.assertEqual(inst.entry[9].resource.id, "17")
+        self.assertEqual(inst.entry[9].resource.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.entry[9].resource.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.id, "72ac8493-52ac-41bd-8d5d-7258c289b5ea")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2012-04-14T10:35:23Z").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2012-04-14T10:35:23Z")
+        self.assertEqual(inst.type, "collection")
+    
+    def testBundle3(self):
+        inst = self.instantiate_from("diagnosticreport-hla-genetics-results-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Bundle instance")
+        self.implBundle3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Bundle", js["resourceType"])
+        inst2 = bundle.Bundle(js)
+        self.implBundle3(inst2)
+    
+    def implBundle3(self, inst):
+        self.assertEqual(inst.entry[0].fullUrl, "urn:uuid:b0a4b18e-94e7-4b1b-8031-c7ae4bdd8db9")
+        self.assertEqual(inst.entry[0].request.method, "POST")
+        self.assertEqual(inst.entry[0].request.url, "DiagnosticReport")
+        self.assertEqual(inst.entry[1].fullUrl, "urn:uuid:8200dab6-18a2-4550-b913-a7db480c0804")
+        self.assertEqual(inst.entry[1].request.method, "POST")
+        self.assertEqual(inst.entry[1].request.url, "Sequence")
+        self.assertEqual(inst.entry[2].fullUrl, "urn:uuid:7c393185-f15c-45bc-a714-c0fdbea32675")
+        self.assertEqual(inst.entry[2].request.method, "POST")
+        self.assertEqual(inst.entry[2].request.url, "Sequence")
+        self.assertEqual(inst.entry[3].fullUrl, "urn:uuid:65c85f14-c3a0-4b72-818f-820e04fcc621")
+        self.assertEqual(inst.entry[3].request.method, "POST")
+        self.assertEqual(inst.entry[3].request.url, "Sequence")
+        self.assertEqual(inst.entry[4].fullUrl, "urn:uuid:fbba9fe7-0ece-4ec1-9233-a437a8d242a0")
+        self.assertEqual(inst.entry[4].request.method, "POST")
+        self.assertEqual(inst.entry[4].request.url, "Sequence")
+        self.assertEqual(inst.entry[5].fullUrl, "urn:uuid:cbabf93e-1b4b-46f2-ba1e-d84862670670")
+        self.assertEqual(inst.entry[5].request.method, "POST")
+        self.assertEqual(inst.entry[5].request.url, "Sequence")
+        self.assertEqual(inst.entry[6].fullUrl, "urn:uuid:c233ad3d-1572-48d6-93da-0a583535e138")
+        self.assertEqual(inst.entry[6].request.method, "POST")
+        self.assertEqual(inst.entry[6].request.url, "Sequence")
+        self.assertEqual(inst.entry[7].fullUrl, "urn:uuid:05fa52d7-5c67-460a-8722-d3460b24d6fe")
+        self.assertEqual(inst.entry[7].request.method, "POST")
+        self.assertEqual(inst.entry[7].request.url, "Sequence")
+        self.assertEqual(inst.entry[8].fullUrl, "urn:uuid:db69e549-6267-4777-b4b9-8813f3329309")
+        self.assertEqual(inst.entry[8].request.method, "POST")
+        self.assertEqual(inst.entry[8].request.url, "Sequence")
+        self.assertEqual(inst.entry[9].fullUrl, "urn:uuid:bb55c2bc-5ad2-4bc1-8ff3-c407d06b12d0")
+        self.assertEqual(inst.entry[9].request.method, "POST")
+        self.assertEqual(inst.entry[9].request.url, "Sequence")
+        self.assertEqual(inst.id, "hla-1")
+        self.assertEqual(inst.type, "transaction")
+    
+    def testBundle4(self):
+        inst = self.instantiate_from("document-example-dischargesummary.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Bundle instance")
+        self.implBundle4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Bundle", js["resourceType"])
+        inst2 = bundle.Bundle(js)
+        self.implBundle4(inst2)
+    
+    def implBundle4(self, inst):
+        self.assertEqual(inst.entry[0].fullUrl, "http://fhir.healthintersections.com.au/open/Composition/180f219f-97a8-486d-99d9-ed631fe4fc57")
+        self.assertEqual(inst.entry[0].resource.id, "180f219f-97a8-486d-99d9-ed631fe4fc57")
+        self.assertEqual(inst.entry[0].resource.meta.lastUpdated.date, FHIRDate("2013-05-28T22:12:21Z").date)
+        self.assertEqual(inst.entry[0].resource.meta.lastUpdated.as_json(), "2013-05-28T22:12:21Z")
+        self.assertEqual(inst.entry[1].fullUrl, "http://fhir.healthintersections.com.au/open/Practitioner/example")
+        self.assertEqual(inst.entry[1].resource.id, "example")
+        self.assertEqual(inst.entry[1].resource.meta.lastUpdated.date, FHIRDate("2013-05-05T16:13:03Z").date)
+        self.assertEqual(inst.entry[1].resource.meta.lastUpdated.as_json(), "2013-05-05T16:13:03Z")
+        self.assertEqual(inst.entry[2].fullUrl, "http://fhir.healthintersections.com.au/open/Patient/d1")
+        self.assertEqual(inst.entry[2].resource.id, "d1")
+        self.assertEqual(inst.entry[3].fullUrl, "http://fhir.healthintersections.com.au/open/Encounter/doc-example")
+        self.assertEqual(inst.entry[3].resource.id, "doc-example")
+        self.assertEqual(inst.entry[3].resource.meta.lastUpdated.date, FHIRDate("2013-05-05T16:13:03Z").date)
+        self.assertEqual(inst.entry[3].resource.meta.lastUpdated.as_json(), "2013-05-05T16:13:03Z")
+        self.assertEqual(inst.entry[4].fullUrl, "urn:uuid:541a72a8-df75-4484-ac89-ac4923f03b81")
+        self.assertEqual(inst.entry[4].resource.meta.lastUpdated.date, FHIRDate("2013-05-05T16:13:03Z").date)
+        self.assertEqual(inst.entry[4].resource.meta.lastUpdated.as_json(), "2013-05-05T16:13:03Z")
+        self.assertEqual(inst.entry[5].fullUrl, "urn:uuid:124a6916-5d84-4b8c-b250-10cefb8e6e86")
+        self.assertEqual(inst.entry[5].resource.meta.lastUpdated.date, FHIRDate("2013-05-05T16:13:03Z").date)
+        self.assertEqual(inst.entry[5].resource.meta.lastUpdated.as_json(), "2013-05-05T16:13:03Z")
+        self.assertEqual(inst.entry[6].fullUrl, "urn:uuid:673f8db5-0ffd-4395-9657-6da00420bbc1")
+        self.assertEqual(inst.entry[7].fullUrl, "urn:uuid:47600e0f-b6b5-4308-84b5-5dec157f7637")
+        self.assertEqual(inst.entry[7].resource.meta.lastUpdated.date, FHIRDate("2013-05-05T16:13:03Z").date)
+        self.assertEqual(inst.entry[7].resource.meta.lastUpdated.as_json(), "2013-05-05T16:13:03Z")
+        self.assertEqual(inst.id, "father")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:uuid:0c3151bd-1cbf-4d64-b04d-cd9187a4c6e0")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2013-05-28T22:12:21Z").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2013-05-28T22:12:21Z")
+        self.assertEqual(inst.signature.contentType, "image/jpg")
+        self.assertEqual(inst.signature.type[0].code, "1.2.840.10065.1.12.1.1")
+        self.assertEqual(inst.signature.type[0].display, "Author's Signature")
+        self.assertEqual(inst.signature.type[0].system, "urn:iso-astm:E1762-95:2013")
+        self.assertEqual(inst.signature.when.date, FHIRDate("2015-08-31T07:42:33+10:00").date)
+        self.assertEqual(inst.signature.when.as_json(), "2015-08-31T07:42:33+10:00")
+        self.assertEqual(inst.type, "document")
+    
+    def testBundle5(self):
+        inst = self.instantiate_from("endpoint-examples-general-template.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Bundle instance")
+        self.implBundle5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Bundle", js["resourceType"])
+        inst2 = bundle.Bundle(js)
+        self.implBundle5(inst2)
+    
+    def implBundle5(self, inst):
+        self.assertEqual(inst.entry[0].fullUrl, "http://hl7.org/fhir/Endpoint/71")
+        self.assertEqual(inst.entry[0].resource.id, "71")
+        self.assertEqual(inst.entry[1].fullUrl, "http://hl7.org/fhir/Endpoint/72")
+        self.assertEqual(inst.entry[1].resource.id, "72")
+        self.assertEqual(inst.entry[2].fullUrl, "http://hl7.org/fhir/Endpoint/73")
+        self.assertEqual(inst.entry[2].resource.id, "73")
+        self.assertEqual(inst.entry[3].fullUrl, "http://hl7.org/fhir/Endpoint/74")
+        self.assertEqual(inst.entry[3].resource.id, "74")
+        self.assertEqual(inst.entry[4].fullUrl, "http://hl7.org/fhir/Endpoint/75")
+        self.assertEqual(inst.entry[4].resource.id, "75")
+        self.assertEqual(inst.entry[5].fullUrl, "http://hl7.org/fhir/Endpoint/76")
+        self.assertEqual(inst.entry[5].resource.id, "76")
+        self.assertEqual(inst.entry[6].fullUrl, "http://hl7.org/fhir/Endpoint/77")
+        self.assertEqual(inst.entry[6].resource.id, "77")
+        self.assertEqual(inst.entry[7].fullUrl, "http://hl7.org/fhir/Endpoint/78")
+        self.assertEqual(inst.entry[7].resource.id, "78")
+        self.assertEqual(inst.entry[8].fullUrl, "http://hl7.org/fhir/Endpoint/79")
+        self.assertEqual(inst.entry[8].resource.id, "79")
+        self.assertEqual(inst.entry[9].fullUrl, "http://hl7.org/fhir/Endpoint/80")
+        self.assertEqual(inst.entry[9].resource.id, "80")
+        self.assertEqual(inst.id, "b0a5e4277-83c4-4adb-87e2-e3efe3369b6f")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.type, "collection")
+    
+    def testBundle6(self):
+        inst = self.instantiate_from("location-examples-general.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Bundle instance")
+        self.implBundle6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Bundle", js["resourceType"])
+        inst2 = bundle.Bundle(js)
+        self.implBundle6(inst2)
+    
+    def implBundle6(self, inst):
+        self.assertEqual(inst.entry[0].fullUrl, "http://hl7.org/fhir/Location/2")
+        self.assertEqual(inst.entry[0].resource.id, "2")
+        self.assertEqual(inst.entry[1].fullUrl, "http://hl7.org/fhir/Location/3")
+        self.assertEqual(inst.entry[1].resource.id, "3")
+        self.assertEqual(inst.id, "3ad0687e-f477-468c-afd5-fcc2bf897819")
+        self.assertEqual(inst.type, "collection")
+    
+    def testBundle7(self):
+        inst = self.instantiate_from("patient-examples-cypress-template.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Bundle instance")
+        self.implBundle7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Bundle", js["resourceType"])
+        inst2 = bundle.Bundle(js)
+        self.implBundle7(inst2)
+    
+    def implBundle7(self, inst):
+        self.assertEqual(inst.entry[0].fullUrl, "http://hl7.org/fhir/Patient/71")
+        self.assertEqual(inst.entry[0].resource.id, "71")
+        self.assertEqual(inst.entry[0].resource.meta.lastUpdated.date, FHIRDate("2012-06-03T23:45:32Z").date)
+        self.assertEqual(inst.entry[0].resource.meta.lastUpdated.as_json(), "2012-06-03T23:45:32Z")
+        self.assertEqual(inst.entry[1].fullUrl, "http://hl7.org/fhir/Patient/72")
+        self.assertEqual(inst.entry[1].resource.id, "72")
+        self.assertEqual(inst.entry[1].resource.meta.lastUpdated.date, FHIRDate("2012-06-03T23:45:32Z").date)
+        self.assertEqual(inst.entry[1].resource.meta.lastUpdated.as_json(), "2012-06-03T23:45:32Z")
+        self.assertEqual(inst.entry[2].fullUrl, "http://hl7.org/fhir/Patient/73")
+        self.assertEqual(inst.entry[2].resource.id, "73")
+        self.assertEqual(inst.entry[2].resource.meta.lastUpdated.date, FHIRDate("2012-06-03T23:45:32Z").date)
+        self.assertEqual(inst.entry[2].resource.meta.lastUpdated.as_json(), "2012-06-03T23:45:32Z")
+        self.assertEqual(inst.entry[3].fullUrl, "http://hl7.org/fhir/Patient/74")
+        self.assertEqual(inst.entry[3].resource.id, "74")
+        self.assertEqual(inst.entry[3].resource.meta.lastUpdated.date, FHIRDate("2012-06-03T23:45:32Z").date)
+        self.assertEqual(inst.entry[3].resource.meta.lastUpdated.as_json(), "2012-06-03T23:45:32Z")
+        self.assertEqual(inst.entry[4].fullUrl, "http://hl7.org/fhir/Patient/75")
+        self.assertEqual(inst.entry[4].resource.id, "75")
+        self.assertEqual(inst.entry[4].resource.meta.lastUpdated.date, FHIRDate("2012-06-03T23:45:32Z").date)
+        self.assertEqual(inst.entry[4].resource.meta.lastUpdated.as_json(), "2012-06-03T23:45:32Z")
+        self.assertEqual(inst.entry[5].fullUrl, "http://hl7.org/fhir/Patient/76")
+        self.assertEqual(inst.entry[5].resource.id, "76")
+        self.assertEqual(inst.entry[5].resource.meta.lastUpdated.date, FHIRDate("2012-06-03T23:45:32Z").date)
+        self.assertEqual(inst.entry[5].resource.meta.lastUpdated.as_json(), "2012-06-03T23:45:32Z")
+        self.assertEqual(inst.entry[6].fullUrl, "http://hl7.org/fhir/Patient/77")
+        self.assertEqual(inst.entry[6].resource.id, "77")
+        self.assertEqual(inst.entry[6].resource.meta.lastUpdated.date, FHIRDate("2012-06-03T23:45:32Z").date)
+        self.assertEqual(inst.entry[6].resource.meta.lastUpdated.as_json(), "2012-06-03T23:45:32Z")
+        self.assertEqual(inst.entry[7].fullUrl, "http://hl7.org/fhir/Patient/78")
+        self.assertEqual(inst.entry[7].resource.id, "78")
+        self.assertEqual(inst.entry[7].resource.meta.lastUpdated.date, FHIRDate("2012-06-03T23:45:32Z").date)
+        self.assertEqual(inst.entry[7].resource.meta.lastUpdated.as_json(), "2012-06-03T23:45:32Z")
+        self.assertEqual(inst.entry[8].fullUrl, "http://hl7.org/fhir/Patient/79")
+        self.assertEqual(inst.entry[8].resource.id, "79")
+        self.assertEqual(inst.entry[8].resource.meta.lastUpdated.date, FHIRDate("2012-06-03T23:45:32Z").date)
+        self.assertEqual(inst.entry[8].resource.meta.lastUpdated.as_json(), "2012-06-03T23:45:32Z")
+        self.assertEqual(inst.entry[9].fullUrl, "http://hl7.org/fhir/Patient/80")
+        self.assertEqual(inst.entry[9].resource.id, "80")
+        self.assertEqual(inst.entry[9].resource.meta.lastUpdated.date, FHIRDate("2012-06-03T23:45:32Z").date)
+        self.assertEqual(inst.entry[9].resource.meta.lastUpdated.as_json(), "2012-06-03T23:45:32Z")
+        self.assertEqual(inst.id, "b0a5e4277-83c4-4adb-87e2-e3efe3369b6f")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.type, "collection")
+    
+    def testBundle8(self):
+        inst = self.instantiate_from("patient-examples-general.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Bundle instance")
+        self.implBundle8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Bundle", js["resourceType"])
+        inst2 = bundle.Bundle(js)
+        self.implBundle8(inst2)
+    
+    def implBundle8(self, inst):
+        self.assertEqual(inst.entry[0].fullUrl, "http://hl7.org/fhir/Patient/1")
+        self.assertEqual(inst.entry[0].resource.id, "1")
+        self.assertEqual(inst.entry[0].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[0].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[1].fullUrl, "http://hl7.org/fhir/Patient/2")
+        self.assertEqual(inst.entry[1].resource.id, "2")
+        self.assertEqual(inst.entry[1].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[1].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[2].fullUrl, "http://hl7.org/fhir/Patient/3")
+        self.assertEqual(inst.entry[2].resource.id, "3")
+        self.assertEqual(inst.entry[2].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[2].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[3].fullUrl, "http://hl7.org/fhir/Patient/4")
+        self.assertEqual(inst.entry[3].resource.id, "4")
+        self.assertEqual(inst.entry[3].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[3].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[4].fullUrl, "http://hl7.org/fhir/Patient/5")
+        self.assertEqual(inst.entry[4].resource.id, "5")
+        self.assertEqual(inst.entry[4].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[4].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[5].fullUrl, "http://hl7.org/fhir/Patient/6")
+        self.assertEqual(inst.entry[5].resource.id, "6")
+        self.assertEqual(inst.entry[5].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[5].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[6].fullUrl, "http://hl7.org/fhir/Patient/7")
+        self.assertEqual(inst.entry[6].resource.id, "7")
+        self.assertEqual(inst.entry[6].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[6].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[7].fullUrl, "http://hl7.org/fhir/Patient/8")
+        self.assertEqual(inst.entry[7].resource.id, "8")
+        self.assertEqual(inst.entry[7].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[7].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[8].fullUrl, "http://hl7.org/fhir/Patient/9")
+        self.assertEqual(inst.entry[8].resource.id, "9")
+        self.assertEqual(inst.entry[8].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[8].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[9].fullUrl, "http://hl7.org/fhir/Patient/10")
+        self.assertEqual(inst.entry[9].resource.id, "10")
+        self.assertEqual(inst.entry[9].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[9].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.id, "b248b1b2-1686-4b94-9936-37d7a5f94b51")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.type, "collection")
+    
+    def testBundle9(self):
+        inst = self.instantiate_from("practitioner-examples-general.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Bundle instance")
+        self.implBundle9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Bundle", js["resourceType"])
+        inst2 = bundle.Bundle(js)
+        self.implBundle9(inst2)
+    
+    def implBundle9(self, inst):
+        self.assertEqual(inst.entry[0].fullUrl, "http://hl7.org/fhir/Practitioner/1")
+        self.assertEqual(inst.entry[0].resource.id, "1")
+        self.assertEqual(inst.entry[1].fullUrl, "http://hl7.org/fhir/Practitioner/13")
+        self.assertEqual(inst.entry[1].resource.id, "13")
+        self.assertEqual(inst.entry[1].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[1].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[2].fullUrl, "http://hl7.org/fhir/Practitioner/14")
+        self.assertEqual(inst.entry[2].resource.id, "14")
+        self.assertEqual(inst.entry[2].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[2].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[3].fullUrl, "http://hl7.org/fhir/Practitioner/15")
+        self.assertEqual(inst.entry[3].resource.id, "15")
+        self.assertEqual(inst.entry[3].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[3].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[4].fullUrl, "http://hl7.org/fhir/Practitioner/16")
+        self.assertEqual(inst.entry[4].resource.id, "16")
+        self.assertEqual(inst.entry[4].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[4].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[5].fullUrl, "http://hl7.org/fhir/Practitioner/17")
+        self.assertEqual(inst.entry[5].resource.id, "17")
+        self.assertEqual(inst.entry[5].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[5].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[6].fullUrl, "http://hl7.org/fhir/Practitioner/18")
+        self.assertEqual(inst.entry[6].resource.id, "18")
+        self.assertEqual(inst.entry[6].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[6].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[7].fullUrl, "http://hl7.org/fhir/Practitioner/19")
+        self.assertEqual(inst.entry[7].resource.id, "19")
+        self.assertEqual(inst.entry[7].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[7].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[8].fullUrl, "http://hl7.org/fhir/Practitioner/20")
+        self.assertEqual(inst.entry[8].resource.id, "20")
+        self.assertEqual(inst.entry[8].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[8].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.entry[9].fullUrl, "http://hl7.org/fhir/Practitioner/21")
+        self.assertEqual(inst.entry[9].resource.id, "21")
+        self.assertEqual(inst.entry[9].resource.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.entry[9].resource.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.id, "3ad0687e-f477-468c-afd5-fcc2bf897809")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2012-05-29T23:45:32Z").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2012-05-29T23:45:32Z")
+        self.assertEqual(inst.type, "collection")
+    
+    def testBundle10(self):
+        inst = self.instantiate_from("practitionerrole-examples-general.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Bundle instance")
+        self.implBundle10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Bundle", js["resourceType"])
+        inst2 = bundle.Bundle(js)
+        self.implBundle10(inst2)
+    
+    def implBundle10(self, inst):
+        self.assertEqual(inst.entry[0].fullUrl, "http://hl7.org/fhir/PractitionerRole/f003-0")
+        self.assertEqual(inst.entry[0].resource.id, "f003-0")
+        self.assertEqual(inst.entry[1].fullUrl, "http://hl7.org/fhir/PractitionerRole/example-0")
+        self.assertEqual(inst.entry[1].resource.id, "example-0")
+        self.assertEqual(inst.entry[2].fullUrl, "http://hl7.org/fhir/PractitionerRole/example-1")
+        self.assertEqual(inst.entry[2].resource.id, "example-1")
+        self.assertEqual(inst.entry[3].fullUrl, "http://hl7.org/fhir/PractitionerRole/example-2")
+        self.assertEqual(inst.entry[3].resource.id, "example-2")
+        self.assertEqual(inst.entry[4].fullUrl, "http://hl7.org/fhir/PractitionerRole/f007-0")
+        self.assertEqual(inst.entry[4].resource.id, "f007-0")
+        self.assertEqual(inst.entry[5].fullUrl, "http://hl7.org/fhir/PractitionerRole/f004-0")
+        self.assertEqual(inst.entry[5].resource.id, "f004-0")
+        self.assertEqual(inst.entry[6].fullUrl, "http://hl7.org/fhir/PractitionerRole/xcda1-0")
+        self.assertEqual(inst.entry[6].resource.id, "xcda1-0")
+        self.assertEqual(inst.entry[7].fullUrl, "http://hl7.org/fhir/PractitionerRole/f202-0")
+        self.assertEqual(inst.entry[7].resource.id, "f202-0")
+        self.assertEqual(inst.entry[8].fullUrl, "http://hl7.org/fhir/PractitionerRole/f201-0")
+        self.assertEqual(inst.entry[8].resource.id, "f201-0")
+        self.assertEqual(inst.entry[9].fullUrl, "http://hl7.org/fhir/PractitionerRole/f203-0")
+        self.assertEqual(inst.entry[9].resource.id, "f203-0")
+        self.assertEqual(inst.id, "3ad0687e-f477-468c-afd5-fcc2bf897808")
+        self.assertEqual(inst.type, "collection")
+
diff --git a/fhirclient/models/capabilitystatement.py b/fhirclient/models/capabilitystatement.py
new file mode 100644
index 0000000..8d3873f
--- /dev/null
+++ b/fhirclient/models/capabilitystatement.py
@@ -0,0 +1,901 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/CapabilityStatement) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class CapabilityStatement(domainresource.DomainResource):
+    """ A statement of system capabilities.
+    
+    A Capability Statement documents a set of capabilities (behaviors) of a
+    FHIR Server that may be used as a statement of actual server functionality
+    or a statement of required or desired server implementation.
+    """
+    
+    resource_type = "CapabilityStatement"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.acceptUnknown = None
+        """ no | extensions | elements | both.
+        Type `str`. """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the capability statement.
+        Type `str`. """
+        
+        self.document = None
+        """ Document definition.
+        List of `CapabilityStatementDocument` items (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.fhirVersion = None
+        """ FHIR Version the system uses.
+        Type `str`. """
+        
+        self.format = None
+        """ formats supported (xml | json | ttl | mime type).
+        List of `str` items. """
+        
+        self.implementation = None
+        """ If this describes a specific instance.
+        Type `CapabilityStatementImplementation` (represented as `dict` in JSON). """
+        
+        self.implementationGuide = None
+        """ Implementation guides supported.
+        List of `str` items. """
+        
+        self.instantiates = None
+        """ Canonical URL of another capability statement this implements.
+        List of `str` items. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for capability statement (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.kind = None
+        """ instance | capability | requirements.
+        Type `str`. """
+        
+        self.messaging = None
+        """ If messaging is supported.
+        List of `CapabilityStatementMessaging` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this capability statement (computer friendly).
+        Type `str`. """
+        
+        self.patchFormat = None
+        """ Patch formats supported.
+        List of `str` items. """
+        
+        self.profile = None
+        """ Profiles for use cases supported.
+        List of `FHIRReference` items referencing `StructureDefinition` (represented as `dict` in JSON). """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this capability statement is defined.
+        Type `str`. """
+        
+        self.rest = None
+        """ If the endpoint is a RESTful one.
+        List of `CapabilityStatementRest` items (represented as `dict` in JSON). """
+        
+        self.software = None
+        """ Software that is covered by this capability statement.
+        Type `CapabilityStatementSoftware` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this capability statement (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this capability statement (globally
+        unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the capability statement.
+        Type `str`. """
+        
+        super(CapabilityStatement, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatement, self).elementProperties()
+        js.extend([
+            ("acceptUnknown", "acceptUnknown", str, False, None, True),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("document", "document", CapabilityStatementDocument, True, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("fhirVersion", "fhirVersion", str, False, None, True),
+            ("format", "format", str, True, None, True),
+            ("implementation", "implementation", CapabilityStatementImplementation, False, None, False),
+            ("implementationGuide", "implementationGuide", str, True, None, False),
+            ("instantiates", "instantiates", str, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("kind", "kind", str, False, None, True),
+            ("messaging", "messaging", CapabilityStatementMessaging, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("patchFormat", "patchFormat", str, True, None, False),
+            ("profile", "profile", fhirreference.FHIRReference, True, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("rest", "rest", CapabilityStatementRest, True, None, False),
+            ("software", "software", CapabilityStatementSoftware, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class CapabilityStatementDocument(backboneelement.BackboneElement):
+    """ Document definition.
+    
+    A document definition.
+    """
+    
+    resource_type = "CapabilityStatementDocument"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.documentation = None
+        """ Description of document support.
+        Type `str`. """
+        
+        self.mode = None
+        """ producer | consumer.
+        Type `str`. """
+        
+        self.profile = None
+        """ Constraint on a resource used in the document.
+        Type `FHIRReference` referencing `StructureDefinition` (represented as `dict` in JSON). """
+        
+        super(CapabilityStatementDocument, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementDocument, self).elementProperties()
+        js.extend([
+            ("documentation", "documentation", str, False, None, False),
+            ("mode", "mode", str, False, None, True),
+            ("profile", "profile", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+class CapabilityStatementImplementation(backboneelement.BackboneElement):
+    """ If this describes a specific instance.
+    
+    Identifies a specific implementation instance that is described by the
+    capability statement - i.e. a particular installation, rather than the
+    capabilities of a software program.
+    """
+    
+    resource_type = "CapabilityStatementImplementation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Describes this specific instance.
+        Type `str`. """
+        
+        self.url = None
+        """ Base URL for the installation.
+        Type `str`. """
+        
+        super(CapabilityStatementImplementation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementImplementation, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, True),
+            ("url", "url", str, False, None, False),
+        ])
+        return js
+
+
+class CapabilityStatementMessaging(backboneelement.BackboneElement):
+    """ If messaging is supported.
+    
+    A description of the messaging capabilities of the solution.
+    """
+    
+    resource_type = "CapabilityStatementMessaging"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.documentation = None
+        """ Messaging interface behavior details.
+        Type `str`. """
+        
+        self.endpoint = None
+        """ Where messages should be sent.
+        List of `CapabilityStatementMessagingEndpoint` items (represented as `dict` in JSON). """
+        
+        self.event = None
+        """ Declare support for this event.
+        List of `CapabilityStatementMessagingEvent` items (represented as `dict` in JSON). """
+        
+        self.reliableCache = None
+        """ Reliable Message Cache Length (min).
+        Type `int`. """
+        
+        self.supportedMessage = None
+        """ Messages supported by this system.
+        List of `CapabilityStatementMessagingSupportedMessage` items (represented as `dict` in JSON). """
+        
+        super(CapabilityStatementMessaging, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementMessaging, self).elementProperties()
+        js.extend([
+            ("documentation", "documentation", str, False, None, False),
+            ("endpoint", "endpoint", CapabilityStatementMessagingEndpoint, True, None, False),
+            ("event", "event", CapabilityStatementMessagingEvent, True, None, False),
+            ("reliableCache", "reliableCache", int, False, None, False),
+            ("supportedMessage", "supportedMessage", CapabilityStatementMessagingSupportedMessage, True, None, False),
+        ])
+        return js
+
+
+class CapabilityStatementMessagingEndpoint(backboneelement.BackboneElement):
+    """ Where messages should be sent.
+    
+    An endpoint (network accessible address) to which messages and/or replies
+    are to be sent.
+    """
+    
+    resource_type = "CapabilityStatementMessagingEndpoint"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.address = None
+        """ Network address or identifier of the end-point.
+        Type `str`. """
+        
+        self.protocol = None
+        """ http | ftp | mllp +.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(CapabilityStatementMessagingEndpoint, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementMessagingEndpoint, self).elementProperties()
+        js.extend([
+            ("address", "address", str, False, None, True),
+            ("protocol", "protocol", coding.Coding, False, None, True),
+        ])
+        return js
+
+
+class CapabilityStatementMessagingEvent(backboneelement.BackboneElement):
+    """ Declare support for this event.
+    
+    A description of the solution's support for an event at this end-point.
+    """
+    
+    resource_type = "CapabilityStatementMessagingEvent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ Consequence | Currency | Notification.
+        Type `str`. """
+        
+        self.code = None
+        """ Event type.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.documentation = None
+        """ Endpoint-specific event documentation.
+        Type `str`. """
+        
+        self.focus = None
+        """ Resource that's focus of message.
+        Type `str`. """
+        
+        self.mode = None
+        """ sender | receiver.
+        Type `str`. """
+        
+        self.request = None
+        """ Profile that describes the request.
+        Type `FHIRReference` referencing `StructureDefinition` (represented as `dict` in JSON). """
+        
+        self.response = None
+        """ Profile that describes the response.
+        Type `FHIRReference` referencing `StructureDefinition` (represented as `dict` in JSON). """
+        
+        super(CapabilityStatementMessagingEvent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementMessagingEvent, self).elementProperties()
+        js.extend([
+            ("category", "category", str, False, None, False),
+            ("code", "code", coding.Coding, False, None, True),
+            ("documentation", "documentation", str, False, None, False),
+            ("focus", "focus", str, False, None, True),
+            ("mode", "mode", str, False, None, True),
+            ("request", "request", fhirreference.FHIRReference, False, None, True),
+            ("response", "response", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+class CapabilityStatementMessagingSupportedMessage(backboneelement.BackboneElement):
+    """ Messages supported by this system.
+    
+    References to message definitions for messages this system can send or
+    receive.
+    """
+    
+    resource_type = "CapabilityStatementMessagingSupportedMessage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.definition = None
+        """ Message supported by this system.
+        Type `FHIRReference` referencing `MessageDefinition` (represented as `dict` in JSON). """
+        
+        self.mode = None
+        """ sender | receiver.
+        Type `str`. """
+        
+        super(CapabilityStatementMessagingSupportedMessage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementMessagingSupportedMessage, self).elementProperties()
+        js.extend([
+            ("definition", "definition", fhirreference.FHIRReference, False, None, True),
+            ("mode", "mode", str, False, None, True),
+        ])
+        return js
+
+
+class CapabilityStatementRest(backboneelement.BackboneElement):
+    """ If the endpoint is a RESTful one.
+    
+    A definition of the restful capabilities of the solution, if any.
+    """
+    
+    resource_type = "CapabilityStatementRest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.compartment = None
+        """ Compartments served/used by system.
+        List of `str` items. """
+        
+        self.documentation = None
+        """ General description of implementation.
+        Type `str`. """
+        
+        self.interaction = None
+        """ What operations are supported?.
+        List of `CapabilityStatementRestInteraction` items (represented as `dict` in JSON). """
+        
+        self.mode = None
+        """ client | server.
+        Type `str`. """
+        
+        self.operation = None
+        """ Definition of an operation or a custom query.
+        List of `CapabilityStatementRestOperation` items (represented as `dict` in JSON). """
+        
+        self.resource = None
+        """ Resource served on the REST interface.
+        List of `CapabilityStatementRestResource` items (represented as `dict` in JSON). """
+        
+        self.searchParam = None
+        """ Search parameters for searching all resources.
+        List of `CapabilityStatementRestResourceSearchParam` items (represented as `dict` in JSON). """
+        
+        self.security = None
+        """ Information about security of implementation.
+        Type `CapabilityStatementRestSecurity` (represented as `dict` in JSON). """
+        
+        super(CapabilityStatementRest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementRest, self).elementProperties()
+        js.extend([
+            ("compartment", "compartment", str, True, None, False),
+            ("documentation", "documentation", str, False, None, False),
+            ("interaction", "interaction", CapabilityStatementRestInteraction, True, None, False),
+            ("mode", "mode", str, False, None, True),
+            ("operation", "operation", CapabilityStatementRestOperation, True, None, False),
+            ("resource", "resource", CapabilityStatementRestResource, True, None, False),
+            ("searchParam", "searchParam", CapabilityStatementRestResourceSearchParam, True, None, False),
+            ("security", "security", CapabilityStatementRestSecurity, False, None, False),
+        ])
+        return js
+
+
+class CapabilityStatementRestInteraction(backboneelement.BackboneElement):
+    """ What operations are supported?.
+    
+    A specification of restful operations supported by the system.
+    """
+    
+    resource_type = "CapabilityStatementRestInteraction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ transaction | batch | search-system | history-system.
+        Type `str`. """
+        
+        self.documentation = None
+        """ Anything special about operation behavior.
+        Type `str`. """
+        
+        super(CapabilityStatementRestInteraction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementRestInteraction, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("documentation", "documentation", str, False, None, False),
+        ])
+        return js
+
+
+class CapabilityStatementRestOperation(backboneelement.BackboneElement):
+    """ Definition of an operation or a custom query.
+    
+    Definition of an operation or a named query together with its parameters
+    and their meaning and type.
+    """
+    
+    resource_type = "CapabilityStatementRestOperation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.definition = None
+        """ The defined operation/query.
+        Type `FHIRReference` referencing `OperationDefinition` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name by which the operation/query is invoked.
+        Type `str`. """
+        
+        super(CapabilityStatementRestOperation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementRestOperation, self).elementProperties()
+        js.extend([
+            ("definition", "definition", fhirreference.FHIRReference, False, None, True),
+            ("name", "name", str, False, None, True),
+        ])
+        return js
+
+
+class CapabilityStatementRestResource(backboneelement.BackboneElement):
+    """ Resource served on the REST interface.
+    
+    A specification of the restful capabilities of the solution for a specific
+    resource type.
+    """
+    
+    resource_type = "CapabilityStatementRestResource"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.conditionalCreate = None
+        """ If allows/uses conditional create.
+        Type `bool`. """
+        
+        self.conditionalDelete = None
+        """ not-supported | single | multiple - how conditional delete is
+        supported.
+        Type `str`. """
+        
+        self.conditionalRead = None
+        """ not-supported | modified-since | not-match | full-support.
+        Type `str`. """
+        
+        self.conditionalUpdate = None
+        """ If allows/uses conditional update.
+        Type `bool`. """
+        
+        self.documentation = None
+        """ Additional information about the use of the resource type.
+        Type `str`. """
+        
+        self.interaction = None
+        """ What operations are supported?.
+        List of `CapabilityStatementRestResourceInteraction` items (represented as `dict` in JSON). """
+        
+        self.profile = None
+        """ Base System profile for all uses of resource.
+        Type `FHIRReference` referencing `StructureDefinition` (represented as `dict` in JSON). """
+        
+        self.readHistory = None
+        """ Whether vRead can return past versions.
+        Type `bool`. """
+        
+        self.referencePolicy = None
+        """ literal | logical | resolves | enforced | local.
+        List of `str` items. """
+        
+        self.searchInclude = None
+        """ _include values supported by the server.
+        List of `str` items. """
+        
+        self.searchParam = None
+        """ Search parameters supported by implementation.
+        List of `CapabilityStatementRestResourceSearchParam` items (represented as `dict` in JSON). """
+        
+        self.searchRevInclude = None
+        """ _revinclude values supported by the server.
+        List of `str` items. """
+        
+        self.type = None
+        """ A resource type that is supported.
+        Type `str`. """
+        
+        self.updateCreate = None
+        """ If update can commit to a new identity.
+        Type `bool`. """
+        
+        self.versioning = None
+        """ no-version | versioned | versioned-update.
+        Type `str`. """
+        
+        super(CapabilityStatementRestResource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementRestResource, self).elementProperties()
+        js.extend([
+            ("conditionalCreate", "conditionalCreate", bool, False, None, False),
+            ("conditionalDelete", "conditionalDelete", str, False, None, False),
+            ("conditionalRead", "conditionalRead", str, False, None, False),
+            ("conditionalUpdate", "conditionalUpdate", bool, False, None, False),
+            ("documentation", "documentation", str, False, None, False),
+            ("interaction", "interaction", CapabilityStatementRestResourceInteraction, True, None, True),
+            ("profile", "profile", fhirreference.FHIRReference, False, None, False),
+            ("readHistory", "readHistory", bool, False, None, False),
+            ("referencePolicy", "referencePolicy", str, True, None, False),
+            ("searchInclude", "searchInclude", str, True, None, False),
+            ("searchParam", "searchParam", CapabilityStatementRestResourceSearchParam, True, None, False),
+            ("searchRevInclude", "searchRevInclude", str, True, None, False),
+            ("type", "type", str, False, None, True),
+            ("updateCreate", "updateCreate", bool, False, None, False),
+            ("versioning", "versioning", str, False, None, False),
+        ])
+        return js
+
+
+class CapabilityStatementRestResourceInteraction(backboneelement.BackboneElement):
+    """ What operations are supported?.
+    
+    Identifies a restful operation supported by the solution.
+    """
+    
+    resource_type = "CapabilityStatementRestResourceInteraction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ read | vread | update | patch | delete | history-instance |
+        history-type | create | search-type.
+        Type `str`. """
+        
+        self.documentation = None
+        """ Anything special about operation behavior.
+        Type `str`. """
+        
+        super(CapabilityStatementRestResourceInteraction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementRestResourceInteraction, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("documentation", "documentation", str, False, None, False),
+        ])
+        return js
+
+
+class CapabilityStatementRestResourceSearchParam(backboneelement.BackboneElement):
+    """ Search parameters supported by implementation.
+    
+    Search parameters for implementations to support and/or make use of -
+    either references to ones defined in the specification, or additional ones
+    defined for/by the implementation.
+    """
+    
+    resource_type = "CapabilityStatementRestResourceSearchParam"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.definition = None
+        """ Source of definition for parameter.
+        Type `str`. """
+        
+        self.documentation = None
+        """ Server-specific usage.
+        Type `str`. """
+        
+        self.name = None
+        """ Name of search parameter.
+        Type `str`. """
+        
+        self.type = None
+        """ number | date | string | token | reference | composite | quantity |
+        uri.
+        Type `str`. """
+        
+        super(CapabilityStatementRestResourceSearchParam, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementRestResourceSearchParam, self).elementProperties()
+        js.extend([
+            ("definition", "definition", str, False, None, False),
+            ("documentation", "documentation", str, False, None, False),
+            ("name", "name", str, False, None, True),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+class CapabilityStatementRestSecurity(backboneelement.BackboneElement):
+    """ Information about security of implementation.
+    
+    Information about security implementation from an interface perspective -
+    what a client needs to know.
+    """
+    
+    resource_type = "CapabilityStatementRestSecurity"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.certificate = None
+        """ Certificates associated with security profiles.
+        List of `CapabilityStatementRestSecurityCertificate` items (represented as `dict` in JSON). """
+        
+        self.cors = None
+        """ Adds CORS Headers (http://enable-cors.org/).
+        Type `bool`. """
+        
+        self.description = None
+        """ General description of how security works.
+        Type `str`. """
+        
+        self.service = None
+        """ OAuth | SMART-on-FHIR | NTLM | Basic | Kerberos | Certificates.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(CapabilityStatementRestSecurity, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementRestSecurity, self).elementProperties()
+        js.extend([
+            ("certificate", "certificate", CapabilityStatementRestSecurityCertificate, True, None, False),
+            ("cors", "cors", bool, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("service", "service", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+class CapabilityStatementRestSecurityCertificate(backboneelement.BackboneElement):
+    """ Certificates associated with security profiles.
+    """
+    
+    resource_type = "CapabilityStatementRestSecurityCertificate"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.blob = None
+        """ Actual certificate.
+        Type `str`. """
+        
+        self.type = None
+        """ Mime type for certificates.
+        Type `str`. """
+        
+        super(CapabilityStatementRestSecurityCertificate, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementRestSecurityCertificate, self).elementProperties()
+        js.extend([
+            ("blob", "blob", str, False, None, False),
+            ("type", "type", str, False, None, False),
+        ])
+        return js
+
+
+class CapabilityStatementSoftware(backboneelement.BackboneElement):
+    """ Software that is covered by this capability statement.
+    
+    Software that is covered by this capability statement.  It is used when the
+    capability statement describes the capabilities of a particular software
+    version, independent of an installation.
+    """
+    
+    resource_type = "CapabilityStatementSoftware"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.name = None
+        """ A name the software is known by.
+        Type `str`. """
+        
+        self.releaseDate = None
+        """ Date this version released.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.version = None
+        """ Version covered by this statement.
+        Type `str`. """
+        
+        super(CapabilityStatementSoftware, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CapabilityStatementSoftware, self).elementProperties()
+        js.extend([
+            ("name", "name", str, False, None, True),
+            ("releaseDate", "releaseDate", fhirdate.FHIRDate, False, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/capabilitystatement_tests.py b/fhirclient/models/capabilitystatement_tests.py
new file mode 100644
index 0000000..7e92b47
--- /dev/null
+++ b/fhirclient/models/capabilitystatement_tests.py
@@ -0,0 +1,179 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import capabilitystatement
+from .fhirdate import FHIRDate
+
+
+class CapabilityStatementTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("CapabilityStatement", js["resourceType"])
+        return capabilitystatement.CapabilityStatement(js)
+    
+    def testCapabilityStatement1(self):
+        inst = self.instantiate_from("capabilitystatement-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CapabilityStatement instance")
+        self.implCapabilityStatement1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CapabilityStatement", js["resourceType"])
+        inst2 = capabilitystatement.CapabilityStatement(js)
+        self.implCapabilityStatement1(inst2)
+    
+    def implCapabilityStatement1(self, inst):
+        self.assertEqual(inst.acceptUnknown, "both")
+        self.assertEqual(inst.contact[0].name, "System Administrator")
+        self.assertEqual(inst.contact[0].telecom[0].system, "email")
+        self.assertEqual(inst.contact[0].telecom[0].value, "wile at acme.org")
+        self.assertEqual(inst.copyright, "Copyright © Acme Healthcare and GoodCorp EHR Systems")
+        self.assertEqual(inst.date.date, FHIRDate("2012-01-04").date)
+        self.assertEqual(inst.date.as_json(), "2012-01-04")
+        self.assertEqual(inst.description, "This is the FHIR capability statement for the main EHR at ACME for the private interface - it does not describe the public interface")
+        self.assertEqual(inst.document[0].documentation, "Basic rules for all documents in the EHR system")
+        self.assertEqual(inst.document[0].mode, "consumer")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.fhirVersion, "1.0.0")
+        self.assertEqual(inst.format[0], "xml")
+        self.assertEqual(inst.format[1], "json")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.implementation.description, "main EHR at ACME")
+        self.assertEqual(inst.implementation.url, "http://10.2.3.4/fhir")
+        self.assertEqual(inst.implementationGuide[0], "http://hl7.org/fhir/us/lab")
+        self.assertEqual(inst.instantiates[0], "http://ihe.org/fhir/CapabilityStatement/pixm-client")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United States of America (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.kind, "instance")
+        self.assertEqual(inst.messaging[0].documentation, "ADT A08 equivalent for external system notifications")
+        self.assertEqual(inst.messaging[0].endpoint[0].address, "mllp:10.1.1.10:9234")
+        self.assertEqual(inst.messaging[0].endpoint[0].protocol.code, "mllp")
+        self.assertEqual(inst.messaging[0].endpoint[0].protocol.system, "http://hl7.org/fhir/message-transport")
+        self.assertEqual(inst.messaging[0].event[0].category, "Consequence")
+        self.assertEqual(inst.messaging[0].event[0].code.code, "admin-notify")
+        self.assertEqual(inst.messaging[0].event[0].code.system, "http://hl7.org/fhir/message-events")
+        self.assertEqual(inst.messaging[0].event[0].documentation, "Notification of an update to a patient resource. changing the links is not supported")
+        self.assertEqual(inst.messaging[0].event[0].focus, "Patient")
+        self.assertEqual(inst.messaging[0].event[0].mode, "receiver")
+        self.assertEqual(inst.messaging[0].reliableCache, 30)
+        self.assertEqual(inst.name, "ACME-EHR")
+        self.assertEqual(inst.patchFormat[0], "application/xml-patch+xml")
+        self.assertEqual(inst.patchFormat[1], "application/json-patch+json")
+        self.assertEqual(inst.publisher, "ACME Corporation")
+        self.assertEqual(inst.purpose, "Main EHR capability statement, published for contracting and operational support")
+        self.assertEqual(inst.rest[0].compartment[0], "http://hl7.org/fhir/CompartmentDefinition/patient")
+        self.assertEqual(inst.rest[0].documentation, "Main FHIR endpoint for acem health")
+        self.assertEqual(inst.rest[0].interaction[0].code, "transaction")
+        self.assertEqual(inst.rest[0].interaction[1].code, "history-system")
+        self.assertEqual(inst.rest[0].mode, "server")
+        self.assertTrue(inst.rest[0].resource[0].conditionalCreate)
+        self.assertEqual(inst.rest[0].resource[0].conditionalDelete, "not-supported")
+        self.assertEqual(inst.rest[0].resource[0].conditionalRead, "full-support")
+        self.assertFalse(inst.rest[0].resource[0].conditionalUpdate)
+        self.assertEqual(inst.rest[0].resource[0].documentation, "This server does not let the clients create identities.")
+        self.assertEqual(inst.rest[0].resource[0].interaction[0].code, "read")
+        self.assertEqual(inst.rest[0].resource[0].interaction[1].code, "vread")
+        self.assertEqual(inst.rest[0].resource[0].interaction[1].documentation, "Only supported for patient records since 12-Dec 2012")
+        self.assertEqual(inst.rest[0].resource[0].interaction[2].code, "update")
+        self.assertEqual(inst.rest[0].resource[0].interaction[3].code, "history-instance")
+        self.assertEqual(inst.rest[0].resource[0].interaction[4].code, "create")
+        self.assertEqual(inst.rest[0].resource[0].interaction[5].code, "history-type")
+        self.assertTrue(inst.rest[0].resource[0].readHistory)
+        self.assertEqual(inst.rest[0].resource[0].searchInclude[0], "Organization")
+        self.assertEqual(inst.rest[0].resource[0].searchParam[0].definition, "http://hl7.org/fhir/SearchParameter/Patient-identifier")
+        self.assertEqual(inst.rest[0].resource[0].searchParam[0].documentation, "Only supports search by institution MRN")
+        self.assertEqual(inst.rest[0].resource[0].searchParam[0].name, "identifier")
+        self.assertEqual(inst.rest[0].resource[0].searchParam[0].type, "token")
+        self.assertEqual(inst.rest[0].resource[0].searchParam[1].definition, "http://hl7.org/fhir/SearchParameter/Patient-general-practitioner")
+        self.assertEqual(inst.rest[0].resource[0].searchParam[1].name, "general-practitioner")
+        self.assertEqual(inst.rest[0].resource[0].searchParam[1].type, "reference")
+        self.assertEqual(inst.rest[0].resource[0].searchRevInclude[0], "Person")
+        self.assertEqual(inst.rest[0].resource[0].type, "Patient")
+        self.assertFalse(inst.rest[0].resource[0].updateCreate)
+        self.assertEqual(inst.rest[0].resource[0].versioning, "versioned-update")
+        self.assertEqual(inst.rest[0].security.certificate[0].blob, "IHRoaXMgYmxvYiBpcyBub3QgdmFsaWQ=")
+        self.assertEqual(inst.rest[0].security.certificate[0].type, "application/jwt")
+        self.assertTrue(inst.rest[0].security.cors)
+        self.assertEqual(inst.rest[0].security.description, "See Smart on FHIR documentation")
+        self.assertEqual(inst.rest[0].security.service[0].coding[0].code, "SMART-on-FHIR")
+        self.assertEqual(inst.rest[0].security.service[0].coding[0].system, "http://hl7.org/fhir/restful-security-service")
+        self.assertEqual(inst.software.name, "EHR")
+        self.assertEqual(inst.software.releaseDate.date, FHIRDate("2012-01-04").date)
+        self.assertEqual(inst.software.releaseDate.as_json(), "2012-01-04")
+        self.assertEqual(inst.software.version, "0.00.020.2134")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "ACME EHR capability statement")
+        self.assertEqual(inst.url, "urn:uuid:68D043B5-9ECF-4559-A57A-396E0D452311")
+        self.assertEqual(inst.useContext[0].code.code, "focus")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "positive")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "http://hl7.org/fhir/variant-state")
+        self.assertEqual(inst.version, "20130510")
+    
+    def testCapabilityStatement2(self):
+        inst = self.instantiate_from("capabilitystatement-phr-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CapabilityStatement instance")
+        self.implCapabilityStatement2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CapabilityStatement", js["resourceType"])
+        inst2 = capabilitystatement.CapabilityStatement(js)
+        self.implCapabilityStatement2(inst2)
+    
+    def implCapabilityStatement2(self, inst):
+        self.assertEqual(inst.acceptUnknown, "no")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.date.date, FHIRDate("2013-06-18").date)
+        self.assertEqual(inst.date.as_json(), "2013-06-18")
+        self.assertEqual(inst.description, "Prototype Capability Statement for September 2013 Connectathon")
+        self.assertEqual(inst.fhirVersion, "1.0.0")
+        self.assertEqual(inst.format[0], "json")
+        self.assertEqual(inst.format[1], "xml")
+        self.assertEqual(inst.id, "phr")
+        self.assertEqual(inst.kind, "capability")
+        self.assertEqual(inst.name, "PHR Template")
+        self.assertEqual(inst.publisher, "FHIR Project")
+        self.assertEqual(inst.rest[0].documentation, "Protoype server Capability Statement for September 2013 Connectathon")
+        self.assertEqual(inst.rest[0].mode, "server")
+        self.assertEqual(inst.rest[0].resource[0].interaction[0].code, "read")
+        self.assertEqual(inst.rest[0].resource[0].interaction[1].code, "search-type")
+        self.assertEqual(inst.rest[0].resource[0].interaction[1].documentation, "When a client searches patients with no search criteria, they get a list of all patients they have access too. Servers may elect to offer additional search parameters, but this is not required")
+        self.assertEqual(inst.rest[0].resource[0].type, "Patient")
+        self.assertEqual(inst.rest[0].resource[1].interaction[0].code, "read")
+        self.assertEqual(inst.rest[0].resource[1].interaction[1].code, "search-type")
+        self.assertEqual(inst.rest[0].resource[1].searchParam[0].documentation, "_id parameter always supported. For the connectathon, servers may elect which search parameters are supported")
+        self.assertEqual(inst.rest[0].resource[1].searchParam[0].name, "_id")
+        self.assertEqual(inst.rest[0].resource[1].searchParam[0].type, "token")
+        self.assertEqual(inst.rest[0].resource[1].type, "DocumentReference")
+        self.assertEqual(inst.rest[0].resource[2].interaction[0].code, "read")
+        self.assertEqual(inst.rest[0].resource[2].interaction[1].code, "search-type")
+        self.assertEqual(inst.rest[0].resource[2].searchParam[0].documentation, "Standard _id parameter")
+        self.assertEqual(inst.rest[0].resource[2].searchParam[0].name, "_id")
+        self.assertEqual(inst.rest[0].resource[2].searchParam[0].type, "token")
+        self.assertEqual(inst.rest[0].resource[2].type, "Condition")
+        self.assertEqual(inst.rest[0].resource[3].interaction[0].code, "read")
+        self.assertEqual(inst.rest[0].resource[3].interaction[1].code, "search-type")
+        self.assertEqual(inst.rest[0].resource[3].searchParam[0].documentation, "Standard _id parameter")
+        self.assertEqual(inst.rest[0].resource[3].searchParam[0].name, "_id")
+        self.assertEqual(inst.rest[0].resource[3].searchParam[0].type, "token")
+        self.assertEqual(inst.rest[0].resource[3].searchParam[1].documentation, "which diagnostic discipline/department created the report")
+        self.assertEqual(inst.rest[0].resource[3].searchParam[1].name, "service")
+        self.assertEqual(inst.rest[0].resource[3].searchParam[1].type, "token")
+        self.assertEqual(inst.rest[0].resource[3].type, "DiagnosticReport")
+        self.assertEqual(inst.rest[0].security.service[0].text, "OAuth")
+        self.assertEqual(inst.software.name, "ACME PHR Server")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/careplan.py b/fhirclient/models/careplan.py
new file mode 100644
index 0000000..d9da33a
--- /dev/null
+++ b/fhirclient/models/careplan.py
@@ -0,0 +1,343 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/CarePlan) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class CarePlan(domainresource.DomainResource):
+    """ Healthcare plan for patient or group.
+    
+    Describes the intention of how one or more practitioners intend to deliver
+    care for a particular patient, group or community for a period of time,
+    possibly limited to care for a specific condition or set of conditions.
+    """
+    
+    resource_type = "CarePlan"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.activity = None
+        """ Action to occur as part of plan.
+        List of `CarePlanActivity` items (represented as `dict` in JSON). """
+        
+        self.addresses = None
+        """ Health issues this plan addresses.
+        List of `FHIRReference` items referencing `Condition` (represented as `dict` in JSON). """
+        
+        self.author = None
+        """ Who is responsible for contents of the plan.
+        List of `FHIRReference` items referencing `Patient, Practitioner, RelatedPerson, Organization, CareTeam` (represented as `dict` in JSON). """
+        
+        self.basedOn = None
+        """ Fulfills care plan.
+        List of `FHIRReference` items referencing `CarePlan` (represented as `dict` in JSON). """
+        
+        self.careTeam = None
+        """ Who's involved in plan?.
+        List of `FHIRReference` items referencing `CareTeam` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Type of plan.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Created in context of.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Protocol or definition.
+        List of `FHIRReference` items referencing `PlanDefinition, Questionnaire` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Summary of nature of plan.
+        Type `str`. """
+        
+        self.goal = None
+        """ Desired outcome of plan.
+        List of `FHIRReference` items referencing `Goal` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External Ids for this plan.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.intent = None
+        """ proposal | plan | order | option.
+        Type `str`. """
+        
+        self.note = None
+        """ Comments about the plan.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Part of referenced CarePlan.
+        List of `FHIRReference` items referencing `CarePlan` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Time period plan covers.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.replaces = None
+        """ CarePlan replaced by this CarePlan.
+        List of `FHIRReference` items referencing `CarePlan` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | suspended | completed | entered-in-error |
+        cancelled | unknown.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who care plan is for.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.supportingInfo = None
+        """ Information considered as part of plan.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.title = None
+        """ Human-friendly name for the CarePlan.
+        Type `str`. """
+        
+        super(CarePlan, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CarePlan, self).elementProperties()
+        js.extend([
+            ("activity", "activity", CarePlanActivity, True, None, False),
+            ("addresses", "addresses", fhirreference.FHIRReference, True, None, False),
+            ("author", "author", fhirreference.FHIRReference, True, None, False),
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("careTeam", "careTeam", fhirreference.FHIRReference, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, True, None, False),
+            ("description", "description", str, False, None, False),
+            ("goal", "goal", fhirreference.FHIRReference, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("intent", "intent", str, False, None, True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, True, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("replaces", "replaces", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("supportingInfo", "supportingInfo", fhirreference.FHIRReference, True, None, False),
+            ("title", "title", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class CarePlanActivity(backboneelement.BackboneElement):
+    """ Action to occur as part of plan.
+    
+    Identifies a planned action to occur as part of the plan.  For example, a
+    medication to be used, lab tests to perform, self-monitoring, education,
+    etc.
+    """
+    
+    resource_type = "CarePlanActivity"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.detail = None
+        """ In-line definition of activity.
+        Type `CarePlanActivityDetail` (represented as `dict` in JSON). """
+        
+        self.outcomeCodeableConcept = None
+        """ Results of the activity.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.outcomeReference = None
+        """ Appointment, Encounter, Procedure, etc..
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.progress = None
+        """ Comments about the activity status/progress.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.reference = None
+        """ Activity details defined in specific resource.
+        Type `FHIRReference` referencing `Appointment, CommunicationRequest, DeviceRequest, MedicationRequest, NutritionOrder, Task, ProcedureRequest, ReferralRequest, VisionPrescription, RequestGroup` (represented as `dict` in JSON). """
+        
+        super(CarePlanActivity, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CarePlanActivity, self).elementProperties()
+        js.extend([
+            ("detail", "detail", CarePlanActivityDetail, False, None, False),
+            ("outcomeCodeableConcept", "outcomeCodeableConcept", codeableconcept.CodeableConcept, True, None, False),
+            ("outcomeReference", "outcomeReference", fhirreference.FHIRReference, True, None, False),
+            ("progress", "progress", annotation.Annotation, True, None, False),
+            ("reference", "reference", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+class CarePlanActivityDetail(backboneelement.BackboneElement):
+    """ In-line definition of activity.
+    
+    A simple summary of a planned activity suitable for a general care plan
+    system (e.g. form driven) that doesn't know about specific resources such
+    as procedure etc.
+    """
+    
+    resource_type = "CarePlanActivityDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ diet | drug | encounter | observation | procedure | supply | other.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Detail type of activity.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.dailyAmount = None
+        """ How to consume/day?.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Protocol or definition.
+        Type `FHIRReference` referencing `PlanDefinition, ActivityDefinition, Questionnaire` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Extra info describing activity to perform.
+        Type `str`. """
+        
+        self.goal = None
+        """ Goals this activity relates to.
+        List of `FHIRReference` items referencing `Goal` (represented as `dict` in JSON). """
+        
+        self.location = None
+        """ Where it should happen.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.performer = None
+        """ Who will be responsible?.
+        List of `FHIRReference` items referencing `Practitioner, Organization, RelatedPerson, Patient, CareTeam` (represented as `dict` in JSON). """
+        
+        self.productCodeableConcept = None
+        """ What is to be administered/supplied.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.productReference = None
+        """ What is to be administered/supplied.
+        Type `FHIRReference` referencing `Medication, Substance` (represented as `dict` in JSON). """
+        
+        self.prohibited = None
+        """ Do NOT do.
+        Type `bool`. """
+        
+        self.quantity = None
+        """ How much to administer/supply/consume.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.reasonCode = None
+        """ Why activity should be done or why activity was prohibited.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Condition triggering need for activity.
+        List of `FHIRReference` items referencing `Condition` (represented as `dict` in JSON). """
+        
+        self.scheduledPeriod = None
+        """ When activity is to occur.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.scheduledString = None
+        """ When activity is to occur.
+        Type `str`. """
+        
+        self.scheduledTiming = None
+        """ When activity is to occur.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ not-started | scheduled | in-progress | on-hold | completed |
+        cancelled | unknown.
+        Type `str`. """
+        
+        self.statusReason = None
+        """ Reason for current status.
+        Type `str`. """
+        
+        super(CarePlanActivityDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CarePlanActivityDetail, self).elementProperties()
+        js.extend([
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("dailyAmount", "dailyAmount", quantity.Quantity, False, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("goal", "goal", fhirreference.FHIRReference, True, None, False),
+            ("location", "location", fhirreference.FHIRReference, False, None, False),
+            ("performer", "performer", fhirreference.FHIRReference, True, None, False),
+            ("productCodeableConcept", "productCodeableConcept", codeableconcept.CodeableConcept, False, "product", False),
+            ("productReference", "productReference", fhirreference.FHIRReference, False, "product", False),
+            ("prohibited", "prohibited", bool, False, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("scheduledPeriod", "scheduledPeriod", period.Period, False, "scheduled", False),
+            ("scheduledString", "scheduledString", str, False, "scheduled", False),
+            ("scheduledTiming", "scheduledTiming", timing.Timing, False, "scheduled", False),
+            ("status", "status", str, False, None, True),
+            ("statusReason", "statusReason", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/careplan_tests.py b/fhirclient/models/careplan_tests.py
new file mode 100644
index 0000000..62b5f53
--- /dev/null
+++ b/fhirclient/models/careplan_tests.py
@@ -0,0 +1,500 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import careplan
+from .fhirdate import FHIRDate
+
+
+class CarePlanTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("CarePlan", js["resourceType"])
+        return careplan.CarePlan(js)
+    
+    def testCarePlan1(self):
+        inst = self.instantiate_from("careplan-example-f001-heart.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CarePlan instance")
+        self.implCarePlan1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CarePlan", js["resourceType"])
+        inst2 = careplan.CarePlan(js)
+        self.implCarePlan1(inst2)
+    
+    def implCarePlan1(self, inst):
+        self.assertEqual(inst.activity[0].detail.category.coding[0].code, "procedure")
+        self.assertEqual(inst.activity[0].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].code, "64915003")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].display, "Operation on heart")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].system, "http://snomed.info/sct")
+        self.assertTrue(inst.activity[0].detail.prohibited)
+        self.assertEqual(inst.activity[0].detail.scheduledString, "2011-06-27T09:30:10+01:00")
+        self.assertEqual(inst.activity[0].detail.status, "completed")
+        self.assertEqual(inst.contained[0].id, "careteam")
+        self.assertEqual(inst.contained[1].id, "goal")
+        self.assertEqual(inst.id, "f001")
+        self.assertEqual(inst.identifier[0].system, "http://www.bmc.nl/zorgportal/identifiers/careplans")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "CP2903")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.period.end.date, FHIRDate("2011-06-27").date)
+        self.assertEqual(inst.period.end.as_json(), "2011-06-27")
+        self.assertEqual(inst.period.start.date, FHIRDate("2011-06-26").date)
+        self.assertEqual(inst.period.start.as_json(), "2011-06-26")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCarePlan2(self):
+        inst = self.instantiate_from("careplan-example-f002-lung.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CarePlan instance")
+        self.implCarePlan2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CarePlan", js["resourceType"])
+        inst2 = careplan.CarePlan(js)
+        self.implCarePlan2(inst2)
+    
+    def implCarePlan2(self, inst):
+        self.assertEqual(inst.activity[0].detail.category.coding[0].code, "procedure")
+        self.assertEqual(inst.activity[0].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].code, "359615001")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].display, "Partial lobectomy of lung")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].system, "http://snomed.info/sct")
+        self.assertTrue(inst.activity[0].detail.prohibited)
+        self.assertEqual(inst.activity[0].detail.scheduledString, "2011-07-07T09:30:10+01:00")
+        self.assertEqual(inst.activity[0].detail.status, "completed")
+        self.assertEqual(inst.contained[0].id, "careteam")
+        self.assertEqual(inst.contained[1].id, "goal")
+        self.assertEqual(inst.id, "f002")
+        self.assertEqual(inst.identifier[0].system, "http://www.bmc.nl/zorgportal/identifiers/careplans")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "CP2934")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.period.end.date, FHIRDate("2013-07-07").date)
+        self.assertEqual(inst.period.end.as_json(), "2013-07-07")
+        self.assertEqual(inst.period.start.date, FHIRDate("2011-07-06").date)
+        self.assertEqual(inst.period.start.as_json(), "2011-07-06")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCarePlan3(self):
+        inst = self.instantiate_from("careplan-example-f003-pharynx.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CarePlan instance")
+        self.implCarePlan3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CarePlan", js["resourceType"])
+        inst2 = careplan.CarePlan(js)
+        self.implCarePlan3(inst2)
+    
+    def implCarePlan3(self, inst):
+        self.assertEqual(inst.activity[0].detail.category.coding[0].code, "procedure")
+        self.assertEqual(inst.activity[0].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].code, "172960003")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].display, "Incision of retropharyngeal abscess")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].system, "http://snomed.info/sct")
+        self.assertTrue(inst.activity[0].detail.prohibited)
+        self.assertEqual(inst.activity[0].detail.scheduledString, "2011-06-27T09:30:10+01:00")
+        self.assertEqual(inst.activity[0].detail.status, "completed")
+        self.assertEqual(inst.contained[0].id, "careteam")
+        self.assertEqual(inst.contained[1].id, "goal")
+        self.assertEqual(inst.id, "f003")
+        self.assertEqual(inst.identifier[0].system, "http://www.bmc.nl/zorgportal/identifiers/careplans")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "CP3953")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.period.end.date, FHIRDate("2013-03-08T09:30:10+01:00").date)
+        self.assertEqual(inst.period.end.as_json(), "2013-03-08T09:30:10+01:00")
+        self.assertEqual(inst.period.start.date, FHIRDate("2013-03-08T09:00:10+01:00").date)
+        self.assertEqual(inst.period.start.as_json(), "2013-03-08T09:00:10+01:00")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCarePlan4(self):
+        inst = self.instantiate_from("careplan-example-f201-renal.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CarePlan instance")
+        self.implCarePlan4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CarePlan", js["resourceType"])
+        inst2 = careplan.CarePlan(js)
+        self.implCarePlan4(inst2)
+    
+    def implCarePlan4(self, inst):
+        self.assertEqual(inst.activity[0].detail.category.coding[0].code, "diet")
+        self.assertEqual(inst.activity[0].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].code, "284093001")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].display, "Potassium supplementation")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.activity[0].detail.dailyAmount.code, "258718000")
+        self.assertEqual(inst.activity[0].detail.dailyAmount.system, "http://snomed.info/sct")
+        self.assertEqual(inst.activity[0].detail.dailyAmount.unit, "mmol")
+        self.assertEqual(inst.activity[0].detail.dailyAmount.value, 80)
+        self.assertFalse(inst.activity[0].detail.prohibited)
+        self.assertEqual(inst.activity[0].detail.scheduledString, "daily")
+        self.assertEqual(inst.activity[0].detail.status, "completed")
+        self.assertEqual(inst.activity[1].detail.category.coding[0].code, "observation")
+        self.assertEqual(inst.activity[1].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[1].detail.code.coding[0].code, "306005")
+        self.assertEqual(inst.activity[1].detail.code.coding[0].display, "Echography of kidney")
+        self.assertEqual(inst.activity[1].detail.code.coding[0].system, "http://snomed.info/sct")
+        self.assertFalse(inst.activity[1].detail.prohibited)
+        self.assertEqual(inst.activity[1].detail.status, "completed")
+        self.assertEqual(inst.contained[0].id, "careteam")
+        self.assertEqual(inst.contained[1].id, "goal")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.intent, "proposal")
+        self.assertEqual(inst.period.end.date, FHIRDate("2013-03-13").date)
+        self.assertEqual(inst.period.end.as_json(), "2013-03-13")
+        self.assertEqual(inst.period.start.date, FHIRDate("2013-03-11").date)
+        self.assertEqual(inst.period.start.as_json(), "2013-03-11")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCarePlan5(self):
+        inst = self.instantiate_from("careplan-example-f202-malignancy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CarePlan instance")
+        self.implCarePlan5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CarePlan", js["resourceType"])
+        inst2 = careplan.CarePlan(js)
+        self.implCarePlan5(inst2)
+    
+    def implCarePlan5(self, inst):
+        self.assertEqual(inst.activity[0].detail.category.coding[0].code, "procedure")
+        self.assertEqual(inst.activity[0].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].code, "367336001")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].display, "Chemotherapy")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].system, "http://snomed.info/sct")
+        self.assertFalse(inst.activity[0].detail.prohibited)
+        self.assertEqual(inst.activity[0].detail.status, "in-progress")
+        self.assertEqual(inst.contained[0].id, "doce")
+        self.assertEqual(inst.contained[1].id, "cisp")
+        self.assertEqual(inst.contained[2].id, "fluo")
+        self.assertEqual(inst.contained[3].id, "tpf")
+        self.assertEqual(inst.contained[4].id, "careteam")
+        self.assertEqual(inst.contained[5].id, "goal")
+        self.assertEqual(inst.id, "f202")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCarePlan6(self):
+        inst = self.instantiate_from("careplan-example-f203-sepsis.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CarePlan instance")
+        self.implCarePlan6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CarePlan", js["resourceType"])
+        inst2 = careplan.CarePlan(js)
+        self.implCarePlan6(inst2)
+    
+    def implCarePlan6(self, inst):
+        self.assertEqual(inst.activity[0].detail.category.coding[0].code, "observation")
+        self.assertEqual(inst.activity[0].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].code, "241541005")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].display, "High resolution computed tomography of lungs")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].system, "http://snomed.info/sct")
+        self.assertFalse(inst.activity[0].detail.prohibited)
+        self.assertEqual(inst.activity[0].detail.status, "not-started")
+        self.assertEqual(inst.contained[0].id, "careteam")
+        self.assertEqual(inst.contained[1].id, "goal")
+        self.assertEqual(inst.id, "f203")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.period.end.date, FHIRDate("2013-04-21").date)
+        self.assertEqual(inst.period.end.as_json(), "2013-04-21")
+        self.assertEqual(inst.period.start.date, FHIRDate("2013-04-14").date)
+        self.assertEqual(inst.period.start.as_json(), "2013-04-14")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCarePlan7(self):
+        inst = self.instantiate_from("careplan-example-GPVisit.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CarePlan instance")
+        self.implCarePlan7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CarePlan", js["resourceType"])
+        inst2 = careplan.CarePlan(js)
+        self.implCarePlan7(inst2)
+    
+    def implCarePlan7(self, inst):
+        self.assertEqual(inst.activity[0].detail.category.coding[0].code, "encounter")
+        self.assertEqual(inst.activity[0].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].code, "nursecon")
+        self.assertEqual(inst.activity[0].detail.code.coding[0].system, "http://example.org/local")
+        self.assertEqual(inst.activity[0].detail.code.text, "Nurse Consultation")
+        self.assertFalse(inst.activity[0].detail.prohibited)
+        self.assertEqual(inst.activity[0].detail.scheduledPeriod.end.date, FHIRDate("2013-01-01T10:50:00+00:00").date)
+        self.assertEqual(inst.activity[0].detail.scheduledPeriod.end.as_json(), "2013-01-01T10:50:00+00:00")
+        self.assertEqual(inst.activity[0].detail.scheduledPeriod.start.date, FHIRDate("2013-01-01T10:38:00+00:00").date)
+        self.assertEqual(inst.activity[0].detail.scheduledPeriod.start.as_json(), "2013-01-01T10:38:00+00:00")
+        self.assertEqual(inst.activity[0].detail.status, "completed")
+        self.assertEqual(inst.activity[1].detail.category.coding[0].code, "encounter")
+        self.assertEqual(inst.activity[1].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[1].detail.code.coding[0].code, "doccon")
+        self.assertEqual(inst.activity[1].detail.code.coding[0].system, "http://example.org/local")
+        self.assertEqual(inst.activity[1].detail.code.text, "Doctor Consultation")
+        self.assertFalse(inst.activity[1].detail.prohibited)
+        self.assertEqual(inst.activity[1].detail.status, "scheduled")
+        self.assertEqual(inst.contained[0].id, "p1")
+        self.assertEqual(inst.contained[1].id, "careteam")
+        self.assertEqual(inst.contained[2].id, "goal")
+        self.assertEqual(inst.id, "gpvisit")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.period.start.date, FHIRDate("2013-01-01T10:30:00+00:00").date)
+        self.assertEqual(inst.period.start.as_json(), "2013-01-01T10:30:00+00:00")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testCarePlan8(self):
+        inst = self.instantiate_from("careplan-example-integrated.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CarePlan instance")
+        self.implCarePlan8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CarePlan", js["resourceType"])
+        inst2 = careplan.CarePlan(js)
+        self.implCarePlan8(inst2)
+    
+    def implCarePlan8(self, inst):
+        self.assertEqual(inst.activity[0].detail.category.coding[0].code, "other")
+        self.assertEqual(inst.activity[0].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[0].detail.description, "Eve will review photos of high and low density foods and share with her parents")
+        self.assertEqual(inst.activity[0].detail.extension[0].url, "http://example.org/fhir/StructureDefinition/RevisionDate")
+        self.assertEqual(inst.activity[0].detail.extension[0].valueDate.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[0].detail.extension[0].valueDate.as_json(), "2012-09-10")
+        self.assertFalse(inst.activity[0].detail.prohibited)
+        self.assertEqual(inst.activity[0].detail.scheduledPeriod.start.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[0].detail.scheduledPeriod.start.as_json(), "2012-09-10")
+        self.assertEqual(inst.activity[0].detail.status, "not-started")
+        self.assertEqual(inst.activity[0].progress[0].text, "Eve eats one meal a day with her parents")
+        self.assertEqual(inst.activity[0].progress[0].time.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[0].progress[0].time.as_json(), "2012-09-10")
+        self.assertEqual(inst.activity[1].detail.category.coding[0].code, "other")
+        self.assertEqual(inst.activity[1].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[1].detail.description, "Eve will ask her dad to asist her to put the head of her bed on blocks")
+        self.assertEqual(inst.activity[1].detail.extension[0].url, "http://example.org/fhir/StructureDefinition/RevisionDate")
+        self.assertEqual(inst.activity[1].detail.extension[0].valueDate.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[1].detail.extension[0].valueDate.as_json(), "2012-09-10")
+        self.assertFalse(inst.activity[1].detail.prohibited)
+        self.assertEqual(inst.activity[1].detail.scheduledPeriod.start.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[1].detail.scheduledPeriod.start.as_json(), "2012-09-10")
+        self.assertEqual(inst.activity[1].detail.status, "not-started")
+        self.assertEqual(inst.activity[1].progress[0].text, "Eve will sleep in her bed more often than the couch")
+        self.assertEqual(inst.activity[1].progress[0].time.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[1].progress[0].time.as_json(), "2012-09-10")
+        self.assertEqual(inst.activity[2].detail.category.coding[0].code, "other")
+        self.assertEqual(inst.activity[2].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[2].detail.description, "Eve will reduce her intake of coffee and chocolate")
+        self.assertEqual(inst.activity[2].detail.extension[0].url, "http://example.org/fhir/StructureDefinition/RevisionDate")
+        self.assertEqual(inst.activity[2].detail.extension[0].valueDate.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[2].detail.extension[0].valueDate.as_json(), "2012-09-10")
+        self.assertFalse(inst.activity[2].detail.prohibited)
+        self.assertEqual(inst.activity[2].detail.scheduledPeriod.start.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[2].detail.scheduledPeriod.start.as_json(), "2012-09-10")
+        self.assertEqual(inst.activity[2].detail.status, "in-progress")
+        self.assertEqual(inst.activity[3].detail.category.coding[0].code, "other")
+        self.assertEqual(inst.activity[3].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[3].detail.description, "Eve will walk her friend's dog up and down a big hill 15-30 minutes 3 days a week")
+        self.assertEqual(inst.activity[3].detail.extension[0].url, "http://example.org/fhir/StructureDefinition/RevisionDate")
+        self.assertEqual(inst.activity[3].detail.extension[0].valueDate.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[3].detail.extension[0].valueDate.as_json(), "2012-09-10")
+        self.assertFalse(inst.activity[3].detail.prohibited)
+        self.assertEqual(inst.activity[3].detail.scheduledPeriod.start.date, FHIRDate("2012-08-27").date)
+        self.assertEqual(inst.activity[3].detail.scheduledPeriod.start.as_json(), "2012-08-27")
+        self.assertEqual(inst.activity[3].detail.status, "in-progress")
+        self.assertEqual(inst.activity[3].progress[0].text, "Eve would like to try for 5 days a week.")
+        self.assertEqual(inst.activity[3].progress[0].time.date, FHIRDate("2012-08-27").date)
+        self.assertEqual(inst.activity[3].progress[0].time.as_json(), "2012-08-27")
+        self.assertEqual(inst.activity[3].progress[1].text, "Eve is still walking the dogs.")
+        self.assertEqual(inst.activity[3].progress[1].time.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[3].progress[1].time.as_json(), "2012-09-10")
+        self.assertEqual(inst.activity[4].detail.category.coding[0].code, "other")
+        self.assertEqual(inst.activity[4].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[4].detail.description, "Eve will walk 3 blocks to her parents house twice a week")
+        self.assertEqual(inst.activity[4].detail.extension[0].url, "http://example.org/fhir/StructureDefinition/RevisionDate")
+        self.assertEqual(inst.activity[4].detail.extension[0].valueDate.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[4].detail.extension[0].valueDate.as_json(), "2012-09-10")
+        self.assertFalse(inst.activity[4].detail.prohibited)
+        self.assertEqual(inst.activity[4].detail.scheduledPeriod.start.date, FHIRDate("2012-07-23").date)
+        self.assertEqual(inst.activity[4].detail.scheduledPeriod.start.as_json(), "2012-07-23")
+        self.assertEqual(inst.activity[4].detail.status, "in-progress")
+        self.assertEqual(inst.activity[4].progress[0].text, "Eve walked 4 times the last week.")
+        self.assertEqual(inst.activity[4].progress[0].time.date, FHIRDate("2012-08-13").date)
+        self.assertEqual(inst.activity[4].progress[0].time.as_json(), "2012-08-13")
+        self.assertEqual(inst.activity[4].progress[1].text, "Eve did not walk to her parents the last week, but has plans to start again")
+        self.assertEqual(inst.activity[4].progress[1].time.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[4].progress[1].time.as_json(), "2012-09-10")
+        self.assertEqual(inst.activity[5].detail.category.coding[0].code, "other")
+        self.assertEqual(inst.activity[5].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[5].detail.description, "Eve will us a calendar to check off after medications are taken")
+        self.assertEqual(inst.activity[5].detail.extension[0].url, "http://example.org/fhir/StructureDefinition/RevisionDate")
+        self.assertEqual(inst.activity[5].detail.extension[0].valueDate.date, FHIRDate("2012-08-13").date)
+        self.assertEqual(inst.activity[5].detail.extension[0].valueDate.as_json(), "2012-08-13")
+        self.assertFalse(inst.activity[5].detail.prohibited)
+        self.assertEqual(inst.activity[5].detail.scheduledPeriod.start.date, FHIRDate("2012-07-23").date)
+        self.assertEqual(inst.activity[5].detail.scheduledPeriod.start.as_json(), "2012-07-23")
+        self.assertEqual(inst.activity[5].detail.status, "in-progress")
+        self.assertEqual(inst.activity[6].detail.category.coding[0].code, "other")
+        self.assertEqual(inst.activity[6].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[6].detail.description, "Eve will use her lights MWF after her shower for 3 minutes")
+        self.assertEqual(inst.activity[6].detail.extension[0].url, "http://example.org/fhir/StructureDefinition/RevisionDate")
+        self.assertEqual(inst.activity[6].detail.extension[0].valueDate.date, FHIRDate("2012-08-27").date)
+        self.assertEqual(inst.activity[6].detail.extension[0].valueDate.as_json(), "2012-08-27")
+        self.assertFalse(inst.activity[6].detail.prohibited)
+        self.assertEqual(inst.activity[6].detail.scheduledPeriod.start.date, FHIRDate("2012-07-23").date)
+        self.assertEqual(inst.activity[6].detail.scheduledPeriod.start.as_json(), "2012-07-23")
+        self.assertEqual(inst.activity[6].detail.status, "in-progress")
+        self.assertEqual(inst.activity[6].progress[0].text, "After restarting the vinegar soaks the psoriasis is improved and Eve plans to treat the remainder with light treatments.  She plans to start this week.")
+        self.assertEqual(inst.activity[6].progress[0].time.date, FHIRDate("2012-08-13").date)
+        self.assertEqual(inst.activity[6].progress[0].time.as_json(), "2012-08-13")
+        self.assertEqual(inst.activity[6].progress[1].text, "Since her skin is improved Eve has not been using the light treatment as often, maybe once a week.  She would like to increase to 3 times a week again")
+        self.assertEqual(inst.activity[6].progress[1].time.date, FHIRDate("2012-08-27").date)
+        self.assertEqual(inst.activity[6].progress[1].time.as_json(), "2012-08-27")
+        self.assertEqual(inst.activity[7].detail.category.coding[0].code, "other")
+        self.assertEqual(inst.activity[7].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[7].detail.description, "Eve will use a calendar of a chart to help her remember when to take her medications")
+        self.assertEqual(inst.activity[7].detail.extension[0].url, "http://example.org/fhir/StructureDefinition/RevisionDate")
+        self.assertEqual(inst.activity[7].detail.extension[0].valueDate.date, FHIRDate("2012-09-10").date)
+        self.assertEqual(inst.activity[7].detail.extension[0].valueDate.as_json(), "2012-09-10")
+        self.assertFalse(inst.activity[7].detail.prohibited)
+        self.assertEqual(inst.activity[7].detail.scheduledPeriod.start.date, FHIRDate("2012-07-10").date)
+        self.assertEqual(inst.activity[7].detail.scheduledPeriod.start.as_json(), "2012-07-10")
+        self.assertEqual(inst.activity[7].detail.status, "in-progress")
+        self.assertEqual(inst.activity[7].progress[0].text, "Eve created a chart as a reminer to take the medications that do not fit in her pill box")
+        self.assertEqual(inst.activity[7].progress[0].time.date, FHIRDate("2012-07-23").date)
+        self.assertEqual(inst.activity[7].progress[0].time.as_json(), "2012-07-23")
+        self.assertEqual(inst.activity[8].detail.category.coding[0].code, "other")
+        self.assertEqual(inst.activity[8].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[8].detail.description, "Eve will start using stretch bands and one step 2 days a week Mon/Wed 6-7am and maybe Friday afternoon")
+        self.assertEqual(inst.activity[8].detail.extension[0].url, "http://example.org/fhir/StructureDefinition/RevisionDate")
+        self.assertEqual(inst.activity[8].detail.extension[0].valueDate.date, FHIRDate("2012-08-23").date)
+        self.assertEqual(inst.activity[8].detail.extension[0].valueDate.as_json(), "2012-08-23")
+        self.assertFalse(inst.activity[8].detail.prohibited)
+        self.assertEqual(inst.activity[8].detail.scheduledPeriod.start.date, FHIRDate("2012-07-23").date)
+        self.assertEqual(inst.activity[8].detail.scheduledPeriod.start.as_json(), "2012-07-23")
+        self.assertEqual(inst.activity[8].detail.status, "on-hold")
+        self.assertEqual(inst.activity[8].progress[0].text, "Will be able to esume exercise.")
+        self.assertEqual(inst.activity[8].progress[0].time.date, FHIRDate("2012-07-30").date)
+        self.assertEqual(inst.activity[8].progress[0].time.as_json(), "2012-07-30")
+        self.assertEqual(inst.activity[8].progress[1].text, "Eve prefers to focus on walking at this time")
+        self.assertEqual(inst.activity[8].progress[1].time.date, FHIRDate("2012-08-13").date)
+        self.assertEqual(inst.activity[8].progress[1].time.as_json(), "2012-08-13")
+        self.assertEqual(inst.activity[9].detail.category.coding[0].code, "other")
+        self.assertEqual(inst.activity[9].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[9].detail.description, "Eve will match a printed medication worksheet with the medication bottles at home")
+        self.assertEqual(inst.activity[9].detail.extension[0].url, "http://example.org/fhir/StructureDefinition/RevisionDate")
+        self.assertEqual(inst.activity[9].detail.extension[0].valueDate.date, FHIRDate("2012-07-23").date)
+        self.assertEqual(inst.activity[9].detail.extension[0].valueDate.as_json(), "2012-07-23")
+        self.assertFalse(inst.activity[9].detail.prohibited)
+        self.assertEqual(inst.activity[9].detail.scheduledPeriod.start.date, FHIRDate("2012-07-10").date)
+        self.assertEqual(inst.activity[9].detail.scheduledPeriod.start.as_json(), "2012-07-10")
+        self.assertEqual(inst.activity[9].detail.status, "completed")
+        self.assertEqual(inst.contained[0].id, "p1")
+        self.assertEqual(inst.contained[1].id, "p2")
+        self.assertEqual(inst.contained[2].id, "p3")
+        self.assertEqual(inst.contained[3].id, "g1")
+        self.assertEqual(inst.contained[4].id, "g2")
+        self.assertEqual(inst.contained[5].id, "g3")
+        self.assertEqual(inst.contained[6].id, "g4")
+        self.assertEqual(inst.contained[7].id, "g5")
+        self.assertEqual(inst.id, "integrate")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.note[0].text, "Patient family is not ready to commit to goal setting at this time.  Goal setting will be addressed in the future")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCarePlan9(self):
+        inst = self.instantiate_from("careplan-example-obesity-narrative.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CarePlan instance")
+        self.implCarePlan9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CarePlan", js["resourceType"])
+        inst2 = careplan.CarePlan(js)
+        self.implCarePlan9(inst2)
+    
+    def implCarePlan9(self, inst):
+        self.assertEqual(inst.id, "obesity-narrative")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testCarePlan10(self):
+        inst = self.instantiate_from("careplan-example-pregnancy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CarePlan instance")
+        self.implCarePlan10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CarePlan", js["resourceType"])
+        inst2 = careplan.CarePlan(js)
+        self.implCarePlan10(inst2)
+    
+    def implCarePlan10(self, inst):
+        self.assertEqual(inst.activity[1].detail.category.coding[0].code, "encounter")
+        self.assertEqual(inst.activity[1].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[1].detail.code.coding[0].code, "1an")
+        self.assertEqual(inst.activity[1].detail.code.coding[0].system, "http://example.org/mySystem")
+        self.assertEqual(inst.activity[1].detail.code.text, "First Antenatal encounter")
+        self.assertEqual(inst.activity[1].detail.description, "The first antenatal encounter. This is where a detailed physical examination is performed.             and the pregnanacy discussed with the mother-to-be.")
+        self.assertFalse(inst.activity[1].detail.prohibited)
+        self.assertEqual(inst.activity[1].detail.scheduledTiming.repeat.boundsPeriod.end.date, FHIRDate("2013-02-28").date)
+        self.assertEqual(inst.activity[1].detail.scheduledTiming.repeat.boundsPeriod.end.as_json(), "2013-02-28")
+        self.assertEqual(inst.activity[1].detail.scheduledTiming.repeat.boundsPeriod.start.date, FHIRDate("2013-02-14").date)
+        self.assertEqual(inst.activity[1].detail.scheduledTiming.repeat.boundsPeriod.start.as_json(), "2013-02-14")
+        self.assertEqual(inst.activity[1].detail.status, "scheduled")
+        self.assertEqual(inst.activity[1].extension[0].url, "http://example.org/fhir/StructureDefinition/careplan#andetails")
+        self.assertEqual(inst.activity[1].extension[0].valueUri, "http://orionhealth.com/fhir/careplan/1andetails")
+        self.assertEqual(inst.activity[2].detail.category.coding[0].code, "encounter")
+        self.assertEqual(inst.activity[2].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[2].detail.code.coding[0].code, "an")
+        self.assertEqual(inst.activity[2].detail.code.coding[0].system, "http://example.org/mySystem")
+        self.assertEqual(inst.activity[2].detail.code.text, "Follow-up Antenatal encounter")
+        self.assertEqual(inst.activity[2].detail.description, "The second antenatal encounter. Discuss any issues that arose from the first antenatal encounter")
+        self.assertFalse(inst.activity[2].detail.prohibited)
+        self.assertEqual(inst.activity[2].detail.scheduledTiming.repeat.boundsPeriod.end.date, FHIRDate("2013-03-14").date)
+        self.assertEqual(inst.activity[2].detail.scheduledTiming.repeat.boundsPeriod.end.as_json(), "2013-03-14")
+        self.assertEqual(inst.activity[2].detail.scheduledTiming.repeat.boundsPeriod.start.date, FHIRDate("2013-03-01").date)
+        self.assertEqual(inst.activity[2].detail.scheduledTiming.repeat.boundsPeriod.start.as_json(), "2013-03-01")
+        self.assertEqual(inst.activity[2].detail.status, "not-started")
+        self.assertEqual(inst.activity[3].detail.category.coding[0].code, "encounter")
+        self.assertEqual(inst.activity[3].detail.category.coding[0].system, "http://hl7.org/fhir/care-plan-activity-category")
+        self.assertEqual(inst.activity[3].detail.code.coding[0].code, "del")
+        self.assertEqual(inst.activity[3].detail.code.coding[0].system, "http://example.org/mySystem")
+        self.assertEqual(inst.activity[3].detail.code.text, "Delivery")
+        self.assertEqual(inst.activity[3].detail.description, "The delivery.")
+        self.assertFalse(inst.activity[3].detail.prohibited)
+        self.assertEqual(inst.activity[3].detail.scheduledTiming.repeat.boundsPeriod.end.date, FHIRDate("2013-09-14").date)
+        self.assertEqual(inst.activity[3].detail.scheduledTiming.repeat.boundsPeriod.end.as_json(), "2013-09-14")
+        self.assertEqual(inst.activity[3].detail.scheduledTiming.repeat.boundsPeriod.start.date, FHIRDate("2013-09-01").date)
+        self.assertEqual(inst.activity[3].detail.scheduledTiming.repeat.boundsPeriod.start.as_json(), "2013-09-01")
+        self.assertEqual(inst.activity[3].detail.status, "not-started")
+        self.assertEqual(inst.contained[0].id, "p1")
+        self.assertEqual(inst.contained[1].id, "pr1")
+        self.assertEqual(inst.contained[2].id, "pr2")
+        self.assertEqual(inst.contained[3].id, "careteam")
+        self.assertEqual(inst.contained[4].id, "goal")
+        self.assertEqual(inst.extension[0].url, "http://example.org/fhir/StructureDefinition/careplan#lmp")
+        self.assertEqual(inst.extension[0].valueDateTime.date, FHIRDate("2013-01-01").date)
+        self.assertEqual(inst.extension[0].valueDateTime.as_json(), "2013-01-01")
+        self.assertEqual(inst.id, "preg")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.period.end.date, FHIRDate("2013-10-01").date)
+        self.assertEqual(inst.period.end.as_json(), "2013-10-01")
+        self.assertEqual(inst.period.start.date, FHIRDate("2013-01-01").date)
+        self.assertEqual(inst.period.start.as_json(), "2013-01-01")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "additional")
+
diff --git a/fhirclient/models/careteam.py b/fhirclient/models/careteam.py
new file mode 100644
index 0000000..f078cf6
--- /dev/null
+++ b/fhirclient/models/careteam.py
@@ -0,0 +1,165 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/CareTeam) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class CareTeam(domainresource.DomainResource):
+    """ Planned participants in the coordination and delivery of care for a patient
+    or group.
+    
+    The Care Team includes all the people and organizations who plan to
+    participate in the coordination and delivery of care for a patient.
+    """
+    
+    resource_type = "CareTeam"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ Type of team.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or episode associated with CareTeam.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External Ids for this team.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.managingOrganization = None
+        """ Organization responsible for the care team.
+        List of `FHIRReference` items referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name of the team, such as crisis assessment team.
+        Type `str`. """
+        
+        self.note = None
+        """ Comments made about the CareTeam.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.participant = None
+        """ Members of the team.
+        List of `CareTeamParticipant` items (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Time period team covers.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.reasonCode = None
+        """ Why the care team exists.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Why the care team exists.
+        List of `FHIRReference` items referencing `Condition` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ proposed | active | suspended | inactive | entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who care team is for.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        super(CareTeam, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CareTeam, self).elementProperties()
+        js.extend([
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("managingOrganization", "managingOrganization", fhirreference.FHIRReference, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("participant", "participant", CareTeamParticipant, True, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class CareTeamParticipant(backboneelement.BackboneElement):
+    """ Members of the team.
+    
+    Identifies all people and organizations who are expected to be involved in
+    the care team.
+    """
+    
+    resource_type = "CareTeamParticipant"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.member = None
+        """ Who is involved.
+        Type `FHIRReference` referencing `Practitioner, RelatedPerson, Patient, Organization, CareTeam` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization of the practitioner.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Time period of participant.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ Type of involvement.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(CareTeamParticipant, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CareTeamParticipant, self).elementProperties()
+        js.extend([
+            ("member", "member", fhirreference.FHIRReference, False, None, False),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/careteam_tests.py b/fhirclient/models/careteam_tests.py
new file mode 100644
index 0000000..4950dba
--- /dev/null
+++ b/fhirclient/models/careteam_tests.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import careteam
+from .fhirdate import FHIRDate
+
+
+class CareTeamTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("CareTeam", js["resourceType"])
+        return careteam.CareTeam(js)
+    
+    def testCareTeam1(self):
+        inst = self.instantiate_from("careteam-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CareTeam instance")
+        self.implCareTeam1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CareTeam", js["resourceType"])
+        inst2 = careteam.CareTeam(js)
+        self.implCareTeam1(inst2)
+    
+    def implCareTeam1(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "encounter")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/care-team-category")
+        self.assertEqual(inst.contained[0].id, "pr1")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.name, "Peter James Charlmers Care Plan for Inpatient Encounter")
+        self.assertEqual(inst.participant[0].role.text, "responsiblePerson")
+        self.assertEqual(inst.participant[1].period.end.date, FHIRDate("2013-01-01").date)
+        self.assertEqual(inst.participant[1].period.end.as_json(), "2013-01-01")
+        self.assertEqual(inst.participant[1].role.text, "adviser")
+        self.assertEqual(inst.period.end.date, FHIRDate("2013-01-01").date)
+        self.assertEqual(inst.period.end.as_json(), "2013-01-01")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Care Team</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/chargeitem.py b/fhirclient/models/chargeitem.py
new file mode 100644
index 0000000..3b71392
--- /dev/null
+++ b/fhirclient/models/chargeitem.py
@@ -0,0 +1,240 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ChargeItem) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ChargeItem(domainresource.DomainResource):
+    """ Item containing charge code(s) associated with the provision of healthcare
+    provider products.
+    
+    The resource ChargeItem describes the provision of healthcare provider
+    products for a certain patient, therefore referring not only to the
+    product, but containing in addition details of the provision, like date,
+    time, amounts and participating organizations and persons. Main Usage of
+    the ChargeItem is to enable the billing process and internal cost
+    allocation.
+    """
+    
+    resource_type = "ChargeItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.account = None
+        """ Account to place this charge.
+        List of `FHIRReference` items referencing `Account` (represented as `dict` in JSON). """
+        
+        self.bodysite = None
+        """ Anatomical location, if relevant.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ A code that identifies the charge, like a billing code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter / Episode associated with event.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Defining information about the code of this charge item.
+        List of `str` items. """
+        
+        self.enteredDate = None
+        """ Date the charge item was entered.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.enterer = None
+        """ Individual who was entering.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, Device, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.factorOverride = None
+        """ Factor overriding the associated rules.
+        Type `float`. """
+        
+        self.identifier = None
+        """ Business Identifier for item.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Comments made about the ChargeItem.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.occurrenceDateTime = None
+        """ When the charged service was applied.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.occurrencePeriod = None
+        """ When the charged service was applied.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.occurrenceTiming = None
+        """ When the charged service was applied.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.overrideReason = None
+        """ Reason for overriding the list price/factor.
+        Type `str`. """
+        
+        self.partOf = None
+        """ Part of referenced ChargeItem.
+        List of `FHIRReference` items referencing `ChargeItem` (represented as `dict` in JSON). """
+        
+        self.participant = None
+        """ Who performed charged service.
+        List of `ChargeItemParticipant` items (represented as `dict` in JSON). """
+        
+        self.performingOrganization = None
+        """ Organization providing the charged sevice.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.priceOverride = None
+        """ Price overriding the associated rules.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Quantity of which the charge item has been serviced.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.reason = None
+        """ Why was the charged  service rendered?.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.requestingOrganization = None
+        """ Organization requesting the charged service.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.service = None
+        """ Which rendered service is being charged?.
+        List of `FHIRReference` items referencing `DiagnosticReport, ImagingStudy, Immunization, MedicationAdministration, MedicationDispense, Observation, Procedure, SupplyDelivery` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ planned | billable | not-billable | aborted | billed | entered-in-
+        error | unknown.
+        Type `str`. """
+        
+        self.subject = None
+        """ Individual service was done for/to.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.supportingInformation = None
+        """ Further information supporting the this charge.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(ChargeItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ChargeItem, self).elementProperties()
+        js.extend([
+            ("account", "account", fhirreference.FHIRReference, True, None, False),
+            ("bodysite", "bodysite", codeableconcept.CodeableConcept, True, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definition", "definition", str, True, None, False),
+            ("enteredDate", "enteredDate", fhirdate.FHIRDate, False, None, False),
+            ("enterer", "enterer", fhirreference.FHIRReference, False, None, False),
+            ("factorOverride", "factorOverride", float, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("occurrenceDateTime", "occurrenceDateTime", fhirdate.FHIRDate, False, "occurrence", False),
+            ("occurrencePeriod", "occurrencePeriod", period.Period, False, "occurrence", False),
+            ("occurrenceTiming", "occurrenceTiming", timing.Timing, False, "occurrence", False),
+            ("overrideReason", "overrideReason", str, False, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, True, None, False),
+            ("participant", "participant", ChargeItemParticipant, True, None, False),
+            ("performingOrganization", "performingOrganization", fhirreference.FHIRReference, False, None, False),
+            ("priceOverride", "priceOverride", money.Money, False, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("reason", "reason", codeableconcept.CodeableConcept, True, None, False),
+            ("requestingOrganization", "requestingOrganization", fhirreference.FHIRReference, False, None, False),
+            ("service", "service", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("supportingInformation", "supportingInformation", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ChargeItemParticipant(backboneelement.BackboneElement):
+    """ Who performed charged service.
+    
+    Indicates who or what performed or participated in the charged service.
+    """
+    
+    resource_type = "ChargeItemParticipant"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actor = None
+        """ Individual who was performing.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, Device, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ What type of performance was done.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ChargeItemParticipant, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ChargeItemParticipant, self).elementProperties()
+        js.extend([
+            ("actor", "actor", fhirreference.FHIRReference, False, None, True),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/chargeitem_tests.py b/fhirclient/models/chargeitem_tests.py
new file mode 100644
index 0000000..6b45b2c
--- /dev/null
+++ b/fhirclient/models/chargeitem_tests.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import chargeitem
+from .fhirdate import FHIRDate
+
+
+class ChargeItemTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ChargeItem", js["resourceType"])
+        return chargeitem.ChargeItem(js)
+    
+    def testChargeItem1(self):
+        inst = self.instantiate_from("chargeitem-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ChargeItem instance")
+        self.implChargeItem1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ChargeItem", js["resourceType"])
+        inst2 = chargeitem.ChargeItem(js)
+        self.implChargeItem1(inst2)
+    
+    def implChargeItem1(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "01510")
+        self.assertEqual(inst.code.coding[0].display, "Zusatzpauschale für Beobachtung nach diagnostischer Koronarangiografie")
+        self.assertEqual(inst.definition[0], "http://www.kbv.de/tools/ebm/html/01520_2904360860826220813632.html")
+        self.assertEqual(inst.enteredDate.date, FHIRDate("2017-01-25T23:55:04+01:00").date)
+        self.assertEqual(inst.enteredDate.as_json(), "2017-01-25T23:55:04+01:00")
+        self.assertEqual(inst.factorOverride, 0.8)
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier.system, "http://myHospital.org/ChargeItems")
+        self.assertEqual(inst.identifier.value, "654321")
+        self.assertEqual(inst.note[0].text, "The code is only applicable for periods longer than 4h")
+        self.assertEqual(inst.note[0].time.date, FHIRDate("2017-01-25T23:55:04+01:00").date)
+        self.assertEqual(inst.note[0].time.as_json(), "2017-01-25T23:55:04+01:00")
+        self.assertEqual(inst.occurrencePeriod.end.date, FHIRDate("2017-01-25T12:35:00+01:00").date)
+        self.assertEqual(inst.occurrencePeriod.end.as_json(), "2017-01-25T12:35:00+01:00")
+        self.assertEqual(inst.occurrencePeriod.start.date, FHIRDate("2017-01-25T08:00:00+01:00").date)
+        self.assertEqual(inst.occurrencePeriod.start.as_json(), "2017-01-25T08:00:00+01:00")
+        self.assertEqual(inst.overrideReason, "Patient is Cardiologist's golf buddy, so he gets a 20% discount!")
+        self.assertEqual(inst.participant[0].role.coding[0].code, "17561000")
+        self.assertEqual(inst.participant[0].role.coding[0].display, "Cardiologist")
+        self.assertEqual(inst.participant[0].role.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.participant[1].role.coding[0].code, "224542009")
+        self.assertEqual(inst.participant[1].role.coding[0].display, "Coronary Care Nurse")
+        self.assertEqual(inst.participant[1].role.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.priceOverride.code, "EUR")
+        self.assertEqual(inst.priceOverride.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.priceOverride.unit, "EUR")
+        self.assertEqual(inst.priceOverride.value, 40)
+        self.assertEqual(inst.quantity.value, 1)
+        self.assertEqual(inst.reason[0].coding[0].code, "123456")
+        self.assertEqual(inst.reason[0].coding[0].display, "DIAG-1")
+        self.assertEqual(inst.reason[0].coding[0].system, "http://hl7.org/fhir/sid/icd-10")
+        self.assertEqual(inst.status, "billable")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Example of ChargeItem Usage in Context of the German EBM Billing code system</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/claim.py b/fhirclient/models/claim.py
new file mode 100644
index 0000000..9570d2b
--- /dev/null
+++ b/fhirclient/models/claim.py
@@ -0,0 +1,947 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Claim) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Claim(domainresource.DomainResource):
+    """ Claim, Pre-determination or Pre-authorization.
+    
+    A provider issued list of services and products provided, or to be
+    provided, to a patient which is provided to an insurer for payment
+    recovery.
+    """
+    
+    resource_type = "Claim"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.accident = None
+        """ Details about an accident.
+        Type `ClaimAccident` (represented as `dict` in JSON). """
+        
+        self.billablePeriod = None
+        """ Period for charge submission.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.careTeam = None
+        """ Members of the care team.
+        List of `ClaimCareTeam` items (represented as `dict` in JSON). """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.diagnosis = None
+        """ List of Diagnosis.
+        List of `ClaimDiagnosis` items (represented as `dict` in JSON). """
+        
+        self.employmentImpacted = None
+        """ Period unable to work.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.enterer = None
+        """ Author.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.facility = None
+        """ Servicing Facility.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.fundsReserve = None
+        """ Funds requested to be reserved.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.hospitalization = None
+        """ Period in hospital.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Claim number.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.information = None
+        """ Exceptions, special considerations, the condition, situation, prior
+        or concurrent issues.
+        List of `ClaimInformation` items (represented as `dict` in JSON). """
+        
+        self.insurance = None
+        """ Insurance or medical plan.
+        List of `ClaimInsurance` items (represented as `dict` in JSON). """
+        
+        self.insurer = None
+        """ Target.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.item = None
+        """ Goods and Services.
+        List of `ClaimItem` items (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Responsible organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.originalPrescription = None
+        """ Original prescription if superceded by fulfiller.
+        Type `FHIRReference` referencing `MedicationRequest` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ The subject of the Products and Services.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.payee = None
+        """ Party to be paid any benefits payable.
+        Type `ClaimPayee` (represented as `dict` in JSON). """
+        
+        self.prescription = None
+        """ Prescription authorizing services or products.
+        Type `FHIRReference` referencing `MedicationRequest, VisionPrescription` (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ Desired processing priority.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.procedure = None
+        """ Procedures performed.
+        List of `ClaimProcedure` items (represented as `dict` in JSON). """
+        
+        self.provider = None
+        """ Responsible provider.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.referral = None
+        """ Treatment Referral.
+        Type `FHIRReference` referencing `ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.related = None
+        """ Related Claims which may be revelant to processing this claimn.
+        List of `ClaimRelated` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        self.subType = None
+        """ Finer grained claim type information.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.total = None
+        """ Total claim cost.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type or discipline.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.use = None
+        """ complete | proposed | exploratory | other.
+        Type `str`. """
+        
+        super(Claim, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Claim, self).elementProperties()
+        js.extend([
+            ("accident", "accident", ClaimAccident, False, None, False),
+            ("billablePeriod", "billablePeriod", period.Period, False, None, False),
+            ("careTeam", "careTeam", ClaimCareTeam, True, None, False),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("diagnosis", "diagnosis", ClaimDiagnosis, True, None, False),
+            ("employmentImpacted", "employmentImpacted", period.Period, False, None, False),
+            ("enterer", "enterer", fhirreference.FHIRReference, False, None, False),
+            ("facility", "facility", fhirreference.FHIRReference, False, None, False),
+            ("fundsReserve", "fundsReserve", codeableconcept.CodeableConcept, False, None, False),
+            ("hospitalization", "hospitalization", period.Period, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("information", "information", ClaimInformation, True, None, False),
+            ("insurance", "insurance", ClaimInsurance, True, None, False),
+            ("insurer", "insurer", fhirreference.FHIRReference, False, None, False),
+            ("item", "item", ClaimItem, True, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("originalPrescription", "originalPrescription", fhirreference.FHIRReference, False, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, False),
+            ("payee", "payee", ClaimPayee, False, None, False),
+            ("prescription", "prescription", fhirreference.FHIRReference, False, None, False),
+            ("priority", "priority", codeableconcept.CodeableConcept, False, None, False),
+            ("procedure", "procedure", ClaimProcedure, True, None, False),
+            ("provider", "provider", fhirreference.FHIRReference, False, None, False),
+            ("referral", "referral", fhirreference.FHIRReference, False, None, False),
+            ("related", "related", ClaimRelated, True, None, False),
+            ("status", "status", str, False, None, False),
+            ("subType", "subType", codeableconcept.CodeableConcept, True, None, False),
+            ("total", "total", money.Money, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+            ("use", "use", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ClaimAccident(backboneelement.BackboneElement):
+    """ Details about an accident.
+    
+    An accident which resulted in the need for healthcare services.
+    """
+    
+    resource_type = "ClaimAccident"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.date = None
+        """ When the accident occurred
+        see information codes
+        see information codes.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.locationAddress = None
+        """ Accident Place.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.locationReference = None
+        """ Accident Place.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ The nature of the accident.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ClaimAccident, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimAccident, self).elementProperties()
+        js.extend([
+            ("date", "date", fhirdate.FHIRDate, False, None, True),
+            ("locationAddress", "locationAddress", address.Address, False, "location", False),
+            ("locationReference", "locationReference", fhirreference.FHIRReference, False, "location", False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ClaimCareTeam(backboneelement.BackboneElement):
+    """ Members of the care team.
+    
+    The members of the team who provided the overall service as well as their
+    role and whether responsible and qualifications.
+    """
+    
+    resource_type = "ClaimCareTeam"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.provider = None
+        """ Provider individual or organization.
+        Type `FHIRReference` referencing `Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.qualification = None
+        """ Type, classification or Specialization.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.responsible = None
+        """ Billing provider.
+        Type `bool`. """
+        
+        self.role = None
+        """ Role on the team.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Number to covey order of careTeam.
+        Type `int`. """
+        
+        super(ClaimCareTeam, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimCareTeam, self).elementProperties()
+        js.extend([
+            ("provider", "provider", fhirreference.FHIRReference, False, None, True),
+            ("qualification", "qualification", codeableconcept.CodeableConcept, False, None, False),
+            ("responsible", "responsible", bool, False, None, False),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+        ])
+        return js
+
+
+class ClaimDiagnosis(backboneelement.BackboneElement):
+    """ List of Diagnosis.
+    
+    List of patient diagnosis for which care is sought.
+    """
+    
+    resource_type = "ClaimDiagnosis"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.diagnosisCodeableConcept = None
+        """ Patient's diagnosis.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.diagnosisReference = None
+        """ Patient's diagnosis.
+        Type `FHIRReference` referencing `Condition` (represented as `dict` in JSON). """
+        
+        self.packageCode = None
+        """ Package billing code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Number to covey order of diagnosis.
+        Type `int`. """
+        
+        self.type = None
+        """ Timing or nature of the diagnosis.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(ClaimDiagnosis, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimDiagnosis, self).elementProperties()
+        js.extend([
+            ("diagnosisCodeableConcept", "diagnosisCodeableConcept", codeableconcept.CodeableConcept, False, "diagnosis", True),
+            ("diagnosisReference", "diagnosisReference", fhirreference.FHIRReference, False, "diagnosis", True),
+            ("packageCode", "packageCode", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+            ("type", "type", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+class ClaimInformation(backboneelement.BackboneElement):
+    """ Exceptions, special considerations, the condition, situation, prior or
+    concurrent issues.
+    
+    Additional information codes regarding exceptions, special considerations,
+    the condition, situation, prior or concurrent issues. Often there are
+    mutiple jurisdiction specific valuesets which are required.
+    """
+    
+    resource_type = "ClaimInformation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ General class of information.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Type of information.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reason = None
+        """ Reason associated with the information.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Information instance identifier.
+        Type `int`. """
+        
+        self.timingDate = None
+        """ When it occurred.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.timingPeriod = None
+        """ When it occurred.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.valueAttachment = None
+        """ Additional Data or supporting information.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.valueQuantity = None
+        """ Additional Data or supporting information.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueReference = None
+        """ Additional Data or supporting information.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.valueString = None
+        """ Additional Data or supporting information.
+        Type `str`. """
+        
+        super(ClaimInformation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimInformation, self).elementProperties()
+        js.extend([
+            ("category", "category", codeableconcept.CodeableConcept, False, None, True),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("reason", "reason", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+            ("timingDate", "timingDate", fhirdate.FHIRDate, False, "timing", False),
+            ("timingPeriod", "timingPeriod", period.Period, False, "timing", False),
+            ("valueAttachment", "valueAttachment", attachment.Attachment, False, "value", False),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", False),
+            ("valueReference", "valueReference", fhirreference.FHIRReference, False, "value", False),
+            ("valueString", "valueString", str, False, "value", False),
+        ])
+        return js
+
+
+class ClaimInsurance(backboneelement.BackboneElement):
+    """ Insurance or medical plan.
+    
+    Financial instrument by which payment information for health care.
+    """
+    
+    resource_type = "ClaimInsurance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.businessArrangement = None
+        """ Business agreement.
+        Type `str`. """
+        
+        self.claimResponse = None
+        """ Adjudication results.
+        Type `FHIRReference` referencing `ClaimResponse` (represented as `dict` in JSON). """
+        
+        self.coverage = None
+        """ Insurance information.
+        Type `FHIRReference` referencing `Coverage` (represented as `dict` in JSON). """
+        
+        self.focal = None
+        """ Is the focal Coverage.
+        Type `bool`. """
+        
+        self.preAuthRef = None
+        """ Pre-Authorization/Determination Reference.
+        List of `str` items. """
+        
+        self.sequence = None
+        """ Service instance identifier.
+        Type `int`. """
+        
+        super(ClaimInsurance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimInsurance, self).elementProperties()
+        js.extend([
+            ("businessArrangement", "businessArrangement", str, False, None, False),
+            ("claimResponse", "claimResponse", fhirreference.FHIRReference, False, None, False),
+            ("coverage", "coverage", fhirreference.FHIRReference, False, None, True),
+            ("focal", "focal", bool, False, None, True),
+            ("preAuthRef", "preAuthRef", str, True, None, False),
+            ("sequence", "sequence", int, False, None, True),
+        ])
+        return js
+
+
+class ClaimItem(backboneelement.BackboneElement):
+    """ Goods and Services.
+    
+    First tier of goods and services.
+    """
+    
+    resource_type = "ClaimItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.bodySite = None
+        """ Service Location.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.careTeamLinkId = None
+        """ Applicable careTeam members.
+        List of `int` items. """
+        
+        self.category = None
+        """ Type of service or product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.detail = None
+        """ Additional items.
+        List of `ClaimItemDetail` items (represented as `dict` in JSON). """
+        
+        self.diagnosisLinkId = None
+        """ Applicable diagnoses.
+        List of `int` items. """
+        
+        self.encounter = None
+        """ Encounters related to this billed item.
+        List of `FHIRReference` items referencing `Encounter` (represented as `dict` in JSON). """
+        
+        self.factor = None
+        """ Price scaling factor.
+        Type `float`. """
+        
+        self.informationLinkId = None
+        """ Applicable exception and supporting information.
+        List of `int` items. """
+        
+        self.locationAddress = None
+        """ Place of service.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.locationCodeableConcept = None
+        """ Place of service.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.locationReference = None
+        """ Place of service.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.modifier = None
+        """ Service/Product billing modifiers.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.net = None
+        """ Total item cost.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.procedureLinkId = None
+        """ Applicable procedures.
+        List of `int` items. """
+        
+        self.programCode = None
+        """ Program specific reason for item inclusion.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Count of Products or Services.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.revenue = None
+        """ Revenue or cost center code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Service instance.
+        Type `int`. """
+        
+        self.service = None
+        """ Billing Code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.servicedDate = None
+        """ Date or dates of Service.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.servicedPeriod = None
+        """ Date or dates of Service.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.subSite = None
+        """ Service Sub-location.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.udi = None
+        """ Unique Device Identifier.
+        List of `FHIRReference` items referencing `Device` (represented as `dict` in JSON). """
+        
+        self.unitPrice = None
+        """ Fee, charge or cost per point.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(ClaimItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimItem, self).elementProperties()
+        js.extend([
+            ("bodySite", "bodySite", codeableconcept.CodeableConcept, False, None, False),
+            ("careTeamLinkId", "careTeamLinkId", int, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("detail", "detail", ClaimItemDetail, True, None, False),
+            ("diagnosisLinkId", "diagnosisLinkId", int, True, None, False),
+            ("encounter", "encounter", fhirreference.FHIRReference, True, None, False),
+            ("factor", "factor", float, False, None, False),
+            ("informationLinkId", "informationLinkId", int, True, None, False),
+            ("locationAddress", "locationAddress", address.Address, False, "location", False),
+            ("locationCodeableConcept", "locationCodeableConcept", codeableconcept.CodeableConcept, False, "location", False),
+            ("locationReference", "locationReference", fhirreference.FHIRReference, False, "location", False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, True, None, False),
+            ("net", "net", money.Money, False, None, False),
+            ("procedureLinkId", "procedureLinkId", int, True, None, False),
+            ("programCode", "programCode", codeableconcept.CodeableConcept, True, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("revenue", "revenue", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+            ("service", "service", codeableconcept.CodeableConcept, False, None, False),
+            ("servicedDate", "servicedDate", fhirdate.FHIRDate, False, "serviced", False),
+            ("servicedPeriod", "servicedPeriod", period.Period, False, "serviced", False),
+            ("subSite", "subSite", codeableconcept.CodeableConcept, True, None, False),
+            ("udi", "udi", fhirreference.FHIRReference, True, None, False),
+            ("unitPrice", "unitPrice", money.Money, False, None, False),
+        ])
+        return js
+
+
+class ClaimItemDetail(backboneelement.BackboneElement):
+    """ Additional items.
+    
+    Second tier of goods and services.
+    """
+    
+    resource_type = "ClaimItemDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ Type of service or product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.factor = None
+        """ Price scaling factor.
+        Type `float`. """
+        
+        self.modifier = None
+        """ Service/Product billing modifiers.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.net = None
+        """ Total additional item cost.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.programCode = None
+        """ Program specific reason for item inclusion.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Count of Products or Services.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.revenue = None
+        """ Revenue or cost center code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Service instance.
+        Type `int`. """
+        
+        self.service = None
+        """ Billing Code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.subDetail = None
+        """ Additional items.
+        List of `ClaimItemDetailSubDetail` items (represented as `dict` in JSON). """
+        
+        self.udi = None
+        """ Unique Device Identifier.
+        List of `FHIRReference` items referencing `Device` (represented as `dict` in JSON). """
+        
+        self.unitPrice = None
+        """ Fee, charge or cost per point.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(ClaimItemDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimItemDetail, self).elementProperties()
+        js.extend([
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("factor", "factor", float, False, None, False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, True, None, False),
+            ("net", "net", money.Money, False, None, False),
+            ("programCode", "programCode", codeableconcept.CodeableConcept, True, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("revenue", "revenue", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+            ("service", "service", codeableconcept.CodeableConcept, False, None, False),
+            ("subDetail", "subDetail", ClaimItemDetailSubDetail, True, None, False),
+            ("udi", "udi", fhirreference.FHIRReference, True, None, False),
+            ("unitPrice", "unitPrice", money.Money, False, None, False),
+        ])
+        return js
+
+
+class ClaimItemDetailSubDetail(backboneelement.BackboneElement):
+    """ Additional items.
+    
+    Third tier of goods and services.
+    """
+    
+    resource_type = "ClaimItemDetailSubDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ Type of service or product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.factor = None
+        """ Price scaling factor.
+        Type `float`. """
+        
+        self.modifier = None
+        """ Service/Product billing modifiers.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.net = None
+        """ Net additional item cost.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.programCode = None
+        """ Program specific reason for item inclusion.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Count of Products or Services.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.revenue = None
+        """ Revenue or cost center code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Service instance.
+        Type `int`. """
+        
+        self.service = None
+        """ Billing Code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.udi = None
+        """ Unique Device Identifier.
+        List of `FHIRReference` items referencing `Device` (represented as `dict` in JSON). """
+        
+        self.unitPrice = None
+        """ Fee, charge or cost per point.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(ClaimItemDetailSubDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimItemDetailSubDetail, self).elementProperties()
+        js.extend([
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("factor", "factor", float, False, None, False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, True, None, False),
+            ("net", "net", money.Money, False, None, False),
+            ("programCode", "programCode", codeableconcept.CodeableConcept, True, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("revenue", "revenue", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+            ("service", "service", codeableconcept.CodeableConcept, False, None, False),
+            ("udi", "udi", fhirreference.FHIRReference, True, None, False),
+            ("unitPrice", "unitPrice", money.Money, False, None, False),
+        ])
+        return js
+
+
+class ClaimPayee(backboneelement.BackboneElement):
+    """ Party to be paid any benefits payable.
+    
+    The party to be reimbursed for the services.
+    """
+    
+    resource_type = "ClaimPayee"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.party = None
+        """ Party to receive the payable.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.resourceType = None
+        """ organization | patient | practitioner | relatedperson.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type of party: Subscriber, Provider, other.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ClaimPayee, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimPayee, self).elementProperties()
+        js.extend([
+            ("party", "party", fhirreference.FHIRReference, False, None, False),
+            ("resourceType", "resourceType", coding.Coding, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+        ])
+        return js
+
+
+class ClaimProcedure(backboneelement.BackboneElement):
+    """ Procedures performed.
+    
+    Ordered list of patient procedures performed to support the adjudication.
+    """
+    
+    resource_type = "ClaimProcedure"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.date = None
+        """ When the procedure was performed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.procedureCodeableConcept = None
+        """ Patient's list of procedures performed.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.procedureReference = None
+        """ Patient's list of procedures performed.
+        Type `FHIRReference` referencing `Procedure` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Procedure sequence for reference.
+        Type `int`. """
+        
+        super(ClaimProcedure, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimProcedure, self).elementProperties()
+        js.extend([
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("procedureCodeableConcept", "procedureCodeableConcept", codeableconcept.CodeableConcept, False, "procedure", True),
+            ("procedureReference", "procedureReference", fhirreference.FHIRReference, False, "procedure", True),
+            ("sequence", "sequence", int, False, None, True),
+        ])
+        return js
+
+
+class ClaimRelated(backboneelement.BackboneElement):
+    """ Related Claims which may be revelant to processing this claimn.
+    
+    Other claims which are related to this claim such as prior claim versions
+    or for related services.
+    """
+    
+    resource_type = "ClaimRelated"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.claim = None
+        """ Reference to the related claim.
+        Type `FHIRReference` referencing `Claim` (represented as `dict` in JSON). """
+        
+        self.reference = None
+        """ Related file or case reference.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.relationship = None
+        """ How the reference claim is related.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ClaimRelated, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimRelated, self).elementProperties()
+        js.extend([
+            ("claim", "claim", fhirreference.FHIRReference, False, None, False),
+            ("reference", "reference", identifier.Identifier, False, None, False),
+            ("relationship", "relationship", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/claim_tests.py b/fhirclient/models/claim_tests.py
new file mode 100644
index 0000000..ae5ce39
--- /dev/null
+++ b/fhirclient/models/claim_tests.py
@@ -0,0 +1,844 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import claim
+from .fhirdate import FHIRDate
+
+
+class ClaimTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Claim", js["resourceType"])
+        return claim.Claim(js)
+    
+    def testClaim1(self):
+        inst = self.instantiate_from("claim-example-institutional-rich.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Claim instance")
+        self.implClaim1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Claim", js["resourceType"])
+        inst2 = claim.Claim(js)
+        self.implClaim1(inst2)
+    
+    def implClaim1(self, inst):
+        self.assertEqual(inst.accident.date.date, FHIRDate("2014-07-09").date)
+        self.assertEqual(inst.accident.date.as_json(), "2014-07-09")
+        self.assertEqual(inst.accident.locationAddress.text, "Grouse Mountain Ski Hill")
+        self.assertEqual(inst.accident.type.coding[0].code, "SPT")
+        self.assertEqual(inst.accident.type.coding[0].display, "Sporting Accident")
+        self.assertEqual(inst.accident.type.coding[0].system, "http://hl7.org/fhir/v3/ActIncidentCode")
+        self.assertEqual(inst.billablePeriod.end.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.billablePeriod.end.as_json(), "2014-08-16")
+        self.assertEqual(inst.billablePeriod.start.date, FHIRDate("2014-08-15").date)
+        self.assertEqual(inst.billablePeriod.start.as_json(), "2014-08-15")
+        self.assertEqual(inst.careTeam[0].qualification.coding[0].code, "physician")
+        self.assertEqual(inst.careTeam[0].qualification.coding[0].system, "http://hl7.org/fhir/provider-qualification")
+        self.assertTrue(inst.careTeam[0].responsible)
+        self.assertEqual(inst.careTeam[0].role.coding[0].code, "primary")
+        self.assertEqual(inst.careTeam[0].role.coding[0].system, "http://hl7.org/fhir/claim-careteamrole")
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.diagnosis[0].diagnosisCodeableConcept.coding[0].code, "654456")
+        self.assertEqual(inst.diagnosis[0].packageCode.coding[0].code, "400")
+        self.assertEqual(inst.diagnosis[0].packageCode.coding[0].display, "Head trauma - concussion")
+        self.assertEqual(inst.diagnosis[0].packageCode.coding[0].system, "http://hl7.org/fhir/ex-diagnosisrelatedgroup")
+        self.assertEqual(inst.diagnosis[0].sequence, 1)
+        self.assertEqual(inst.diagnosis[0].type[0].coding[0].code, "admitting")
+        self.assertEqual(inst.diagnosis[0].type[0].coding[0].system, "http://hl7.org/fhir/ex-diagnosistype")
+        self.assertEqual(inst.employmentImpacted.end.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.employmentImpacted.end.as_json(), "2014-08-16")
+        self.assertEqual(inst.employmentImpacted.start.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.employmentImpacted.start.as_json(), "2014-08-16")
+        self.assertEqual(inst.hospitalization.end.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.hospitalization.end.as_json(), "2014-08-16")
+        self.assertEqual(inst.hospitalization.start.date, FHIRDate("2014-08-15").date)
+        self.assertEqual(inst.hospitalization.start.as_json(), "2014-08-15")
+        self.assertEqual(inst.id, "960151")
+        self.assertEqual(inst.identifier[0].system, "http://happyhospital.com/claim")
+        self.assertEqual(inst.identifier[0].value, "96123451")
+        self.assertEqual(inst.insurance[0].businessArrangement, "BA987123")
+        self.assertTrue(inst.insurance[0].focal)
+        self.assertEqual(inst.insurance[0].preAuthRef[0], "PA2014G56473")
+        self.assertEqual(inst.insurance[0].sequence, 1)
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 125.0)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "exam")
+        self.assertEqual(inst.item[0].service.coding[0].system, "http://hl7.org/fhir/ex-serviceproduct")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].unitPrice.value, 125.0)
+        self.assertEqual(inst.payee.type.coding[0].code, "provider")
+        self.assertEqual(inst.priority.coding[0].code, "normal")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Claim</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.total.code, "USD")
+        self.assertEqual(inst.total.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.total.value, 125.0)
+        self.assertEqual(inst.type.coding[0].code, "institutional")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+        self.assertEqual(inst.use, "complete")
+    
+    def testClaim2(self):
+        inst = self.instantiate_from("claim-example-institutional.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Claim instance")
+        self.implClaim2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Claim", js["resourceType"])
+        inst2 = claim.Claim(js)
+        self.implClaim2(inst2)
+    
+    def implClaim2(self, inst):
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.diagnosis[0].diagnosisCodeableConcept.coding[0].code, "654456")
+        self.assertEqual(inst.diagnosis[0].sequence, 1)
+        self.assertEqual(inst.id, "960150")
+        self.assertEqual(inst.identifier[0].system, "http://happyhospital.com/claim")
+        self.assertEqual(inst.identifier[0].value, "9612345")
+        self.assertTrue(inst.insurance[0].focal)
+        self.assertEqual(inst.insurance[0].sequence, 1)
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 125.0)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "exam")
+        self.assertEqual(inst.item[0].service.coding[0].system, "http://hl7.org/fhir/ex-serviceproduct")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].unitPrice.value, 125.0)
+        self.assertEqual(inst.payee.type.coding[0].code, "provider")
+        self.assertEqual(inst.priority.coding[0].code, "normal")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.subType[0].coding[0].code, "emergency")
+        self.assertEqual(inst.subType[0].coding[0].system, "http://hl7.org/fhir/ex-claimsubtype")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Claim</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.total.code, "USD")
+        self.assertEqual(inst.total.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.total.value, 125.0)
+        self.assertEqual(inst.type.coding[0].code, "institutional")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+        self.assertEqual(inst.use, "complete")
+    
+    def testClaim3(self):
+        inst = self.instantiate_from("claim-example-oral-average.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Claim instance")
+        self.implClaim3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Claim", js["resourceType"])
+        inst2 = claim.Claim(js)
+        self.implClaim3(inst2)
+    
+    def implClaim3(self, inst):
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.diagnosis[0].diagnosisCodeableConcept.coding[0].code, "123456")
+        self.assertEqual(inst.diagnosis[0].sequence, 1)
+        self.assertEqual(inst.id, "100151")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/claim")
+        self.assertEqual(inst.identifier[0].value, "12346")
+        self.assertEqual(inst.information[0].category.coding[0].code, "missingtooth")
+        self.assertEqual(inst.information[0].category.coding[0].system, "http://hl7.org/fhir/claiminformationcategory")
+        self.assertEqual(inst.information[0].code.coding[0].code, "15")
+        self.assertEqual(inst.information[0].code.coding[0].system, "http://hl7.org/fhir/ex-tooth")
+        self.assertEqual(inst.information[0].reason.coding[0].code, "e")
+        self.assertEqual(inst.information[0].reason.coding[0].system, "http://hl7.org/fhir/missingtoothreason")
+        self.assertEqual(inst.information[0].sequence, 1)
+        self.assertEqual(inst.information[0].timingDate.date, FHIRDate("2012-04-07").date)
+        self.assertEqual(inst.information[0].timingDate.as_json(), "2012-04-07")
+        self.assertEqual(inst.information[1].category.coding[0].code, "exception")
+        self.assertEqual(inst.information[1].category.coding[0].system, "http://hl7.org/fhir/claiminformationcategory")
+        self.assertEqual(inst.information[1].code.coding[0].code, "student")
+        self.assertEqual(inst.information[1].code.coding[0].system, "http://hl7.org/fhir/claim-exception")
+        self.assertEqual(inst.information[1].sequence, 2)
+        self.assertEqual(inst.information[1].valueString, "Happy Valley Community College")
+        self.assertTrue(inst.insurance[0].focal)
+        self.assertEqual(inst.insurance[0].sequence, 1)
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 135.57)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "1200")
+        self.assertEqual(inst.item[0].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].unitPrice.value, 135.57)
+        self.assertEqual(inst.item[1].bodySite.coding[0].code, "21")
+        self.assertEqual(inst.item[1].bodySite.coding[0].system, "http://fdi.org/fhir/oraltoothcodes")
+        self.assertEqual(inst.item[1].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[1].net.code, "USD")
+        self.assertEqual(inst.item[1].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[1].net.value, 105.0)
+        self.assertEqual(inst.item[1].sequence, 2)
+        self.assertEqual(inst.item[1].service.coding[0].code, "21211")
+        self.assertEqual(inst.item[1].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[1].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[1].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[1].subSite[0].coding[0].code, "L")
+        self.assertEqual(inst.item[1].subSite[0].coding[0].system, "http://fdi.org/fhir/oralsurfacecodes")
+        self.assertEqual(inst.item[1].unitPrice.code, "USD")
+        self.assertEqual(inst.item[1].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[1].unitPrice.value, 105.0)
+        self.assertEqual(inst.item[2].bodySite.coding[0].code, "36")
+        self.assertEqual(inst.item[2].bodySite.coding[0].system, "http://fdi.org/fhir/oraltoothcodes")
+        self.assertEqual(inst.item[2].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[2].detail[0].factor, 0.75)
+        self.assertEqual(inst.item[2].detail[0].net.code, "USD")
+        self.assertEqual(inst.item[2].detail[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[0].net.value, 750.0)
+        self.assertEqual(inst.item[2].detail[0].sequence, 1)
+        self.assertEqual(inst.item[2].detail[0].service.coding[0].code, "27211")
+        self.assertEqual(inst.item[2].detail[0].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[2].detail[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[2].detail[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[0].unitPrice.value, 1000.0)
+        self.assertEqual(inst.item[2].detail[1].net.code, "USD")
+        self.assertEqual(inst.item[2].detail[1].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[1].net.value, 350.0)
+        self.assertEqual(inst.item[2].detail[1].sequence, 2)
+        self.assertEqual(inst.item[2].detail[1].service.coding[0].code, "lab")
+        self.assertEqual(inst.item[2].detail[1].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[2].detail[1].unitPrice.code, "USD")
+        self.assertEqual(inst.item[2].detail[1].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[1].unitPrice.value, 350.0)
+        self.assertEqual(inst.item[2].net.code, "USD")
+        self.assertEqual(inst.item[2].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].net.value, 1100.0)
+        self.assertEqual(inst.item[2].sequence, 3)
+        self.assertEqual(inst.item[2].service.coding[0].code, "27211")
+        self.assertEqual(inst.item[2].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[2].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[2].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[2].unitPrice.code, "USD")
+        self.assertEqual(inst.item[2].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].unitPrice.value, 1100.0)
+        self.assertEqual(inst.payee.type.coding[0].code, "provider")
+        self.assertEqual(inst.priority.coding[0].code, "normal")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Oral Health Claim</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "oral")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+        self.assertEqual(inst.use, "complete")
+    
+    def testClaim4(self):
+        inst = self.instantiate_from("claim-example-oral-bridge.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Claim instance")
+        self.implClaim4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Claim", js["resourceType"])
+        inst2 = claim.Claim(js)
+        self.implClaim4(inst2)
+    
+    def implClaim4(self, inst):
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.contained[0].id, "device-bridge")
+        self.assertEqual(inst.contained[1].id, "referral")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "100156")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/claim")
+        self.assertEqual(inst.identifier[0].value, "123466")
+        self.assertEqual(inst.information[0].category.coding[0].code, "prosthesis")
+        self.assertEqual(inst.information[0].category.coding[0].system, "http://hl7.org/fhir/claiminformationcategory")
+        self.assertEqual(inst.information[0].code.coding[0].code, "2")
+        self.assertEqual(inst.information[0].code.coding[0].display, "Maryland Bridge")
+        self.assertEqual(inst.information[0].code.coding[0].system, "http://hl7.org/fhir/ex-oralprostho")
+        self.assertEqual(inst.information[0].sequence, 1)
+        self.assertEqual(inst.information[0].timingDate.date, FHIRDate("2001-04-07").date)
+        self.assertEqual(inst.information[0].timingDate.as_json(), "2001-04-07")
+        self.assertTrue(inst.insurance[0].focal)
+        self.assertEqual(inst.insurance[0].sequence, 1)
+        self.assertEqual(inst.item[0].bodySite.coding[0].code, "01")
+        self.assertEqual(inst.item[0].bodySite.coding[0].system, "http://fdi.org/fhir/oraltoothcodes")
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].factor, 0.75)
+        self.assertEqual(inst.item[0].informationLinkId[0], 1)
+        self.assertEqual(inst.item[0].locationCodeableConcept.coding[0].code, "11")
+        self.assertEqual(inst.item[0].locationCodeableConcept.coding[0].system, "http://hl7.org/fhir/ex-serviceplace")
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 1050.0)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "67221")
+        self.assertEqual(inst.item[0].service.coding[0].display, "Maryland Bridge")
+        self.assertEqual(inst.item[0].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].unitPrice.value, 1400.0)
+        self.assertEqual(inst.item[1].bodySite.coding[0].code, "21")
+        self.assertEqual(inst.item[1].bodySite.coding[0].system, "http://fdi.org/fhir/oraltoothcodes")
+        self.assertEqual(inst.item[1].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[1].locationCodeableConcept.coding[0].code, "11")
+        self.assertEqual(inst.item[1].locationCodeableConcept.coding[0].system, "http://hl7.org/fhir/ex-serviceplace")
+        self.assertEqual(inst.item[1].net.code, "USD")
+        self.assertEqual(inst.item[1].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[1].net.value, 105.0)
+        self.assertEqual(inst.item[1].sequence, 2)
+        self.assertEqual(inst.item[1].service.coding[0].code, "21211")
+        self.assertEqual(inst.item[1].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[1].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[1].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[1].subSite[0].coding[0].code, "L")
+        self.assertEqual(inst.item[1].subSite[0].coding[0].system, "http://fdi.org/fhir/oralsurfacecodes")
+        self.assertEqual(inst.item[1].unitPrice.code, "USD")
+        self.assertEqual(inst.item[1].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[1].unitPrice.value, 105.0)
+        self.assertEqual(inst.item[2].bodySite.coding[0].code, "24")
+        self.assertEqual(inst.item[2].bodySite.coding[0].system, "http://fdi.org/fhir/oraltoothcodes")
+        self.assertEqual(inst.item[2].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[2].detail[0].factor, 0.75)
+        self.assertEqual(inst.item[2].detail[0].net.code, "USD")
+        self.assertEqual(inst.item[2].detail[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[0].net.value, 750.0)
+        self.assertEqual(inst.item[2].detail[0].sequence, 1)
+        self.assertEqual(inst.item[2].detail[0].service.coding[0].code, "27211")
+        self.assertEqual(inst.item[2].detail[0].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[2].detail[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[2].detail[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[0].unitPrice.value, 1000.0)
+        self.assertEqual(inst.item[2].detail[1].net.code, "USD")
+        self.assertEqual(inst.item[2].detail[1].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[1].net.value, 350.0)
+        self.assertEqual(inst.item[2].detail[1].sequence, 2)
+        self.assertEqual(inst.item[2].detail[1].service.coding[0].code, "lab")
+        self.assertEqual(inst.item[2].detail[1].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[2].detail[1].unitPrice.code, "USD")
+        self.assertEqual(inst.item[2].detail[1].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[1].unitPrice.value, 350.0)
+        self.assertEqual(inst.item[2].locationCodeableConcept.coding[0].code, "11")
+        self.assertEqual(inst.item[2].locationCodeableConcept.coding[0].system, "http://hl7.org/fhir/ex-serviceplace")
+        self.assertEqual(inst.item[2].net.code, "USD")
+        self.assertEqual(inst.item[2].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].net.value, 1100.0)
+        self.assertEqual(inst.item[2].procedureLinkId[0], 1)
+        self.assertEqual(inst.item[2].sequence, 3)
+        self.assertEqual(inst.item[2].service.coding[0].code, "27211")
+        self.assertEqual(inst.item[2].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[2].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[2].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[2].unitPrice.code, "USD")
+        self.assertEqual(inst.item[2].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].unitPrice.value, 1100.0)
+        self.assertEqual(inst.payee.type.coding[0].code, "other")
+        self.assertEqual(inst.payee.type.coding[0].system, "http://hl7.org/fhir/payeetype")
+        self.assertEqual(inst.priority.coding[0].code, "normal")
+        self.assertEqual(inst.procedure[0].date.date, FHIRDate("2014-07-04").date)
+        self.assertEqual(inst.procedure[0].date.as_json(), "2014-07-04")
+        self.assertEqual(inst.procedure[0].procedureCodeableConcept.text, "Resection of gum to increase exposed tooth.")
+        self.assertEqual(inst.procedure[0].sequence, 1)
+        self.assertEqual(inst.related[0].reference.value, "CASE156746B")
+        self.assertEqual(inst.related[0].relationship.coding[0].code, "associated")
+        self.assertEqual(inst.related[0].relationship.coding[0].system, "http://hl7.org/fhir/ex-relatedclaimrelationship")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Oral Health Claim</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.total.code, "USD")
+        self.assertEqual(inst.total.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.total.value, 2255.0)
+        self.assertEqual(inst.type.coding[0].code, "oral")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+        self.assertEqual(inst.use, "complete")
+    
+    def testClaim5(self):
+        inst = self.instantiate_from("claim-example-oral-contained-identifier.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Claim instance")
+        self.implClaim5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Claim", js["resourceType"])
+        inst2 = claim.Claim(js)
+        self.implClaim5(inst2)
+    
+    def implClaim5(self, inst):
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.contained[0].id, "patient-1")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.diagnosis[0].diagnosisCodeableConcept.coding[0].code, "123456")
+        self.assertEqual(inst.diagnosis[0].sequence, 1)
+        self.assertEqual(inst.id, "100155")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/claim")
+        self.assertEqual(inst.identifier[0].value, "12347")
+        self.assertTrue(inst.insurance[0].focal)
+        self.assertEqual(inst.insurance[0].sequence, 1)
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 135.57)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "1200")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].unitPrice.value, 135.57)
+        self.assertEqual(inst.payee.type.coding[0].code, "provider")
+        self.assertEqual(inst.priority.coding[0].code, "normal")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">This example assumes a national health care scheme where patients, providers and organizations have known business identifiers.</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "oral")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+        self.assertEqual(inst.use, "complete")
+    
+    def testClaim6(self):
+        inst = self.instantiate_from("claim-example-oral-contained.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Claim instance")
+        self.implClaim6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Claim", js["resourceType"])
+        inst2 = claim.Claim(js)
+        self.implClaim6(inst2)
+    
+    def implClaim6(self, inst):
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.contained[0].id, "org-insurer")
+        self.assertEqual(inst.contained[1].id, "org-org")
+        self.assertEqual(inst.contained[2].id, "provider-1")
+        self.assertEqual(inst.contained[3].id, "patient-1")
+        self.assertEqual(inst.contained[4].id, "coverage-1")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.diagnosis[0].diagnosisCodeableConcept.coding[0].code, "123456")
+        self.assertEqual(inst.diagnosis[0].sequence, 1)
+        self.assertEqual(inst.id, "100152")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/claim")
+        self.assertEqual(inst.identifier[0].value, "12347")
+        self.assertTrue(inst.insurance[0].focal)
+        self.assertEqual(inst.insurance[0].sequence, 1)
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 135.57)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "1200")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].unitPrice.value, 135.57)
+        self.assertEqual(inst.payee.type.coding[0].code, "provider")
+        self.assertEqual(inst.priority.coding[0].code, "normal")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Oral Health Claim</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "oral")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+        self.assertEqual(inst.use, "complete")
+    
+    def testClaim7(self):
+        inst = self.instantiate_from("claim-example-oral-identifier.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Claim instance")
+        self.implClaim7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Claim", js["resourceType"])
+        inst2 = claim.Claim(js)
+        self.implClaim7(inst2)
+    
+    def implClaim7(self, inst):
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.diagnosis[0].diagnosisCodeableConcept.coding[0].code, "123456")
+        self.assertEqual(inst.diagnosis[0].sequence, 1)
+        self.assertEqual(inst.id, "100154")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/claim")
+        self.assertEqual(inst.identifier[0].value, "12347")
+        self.assertTrue(inst.insurance[0].focal)
+        self.assertEqual(inst.insurance[0].sequence, 1)
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 135.57)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "1200")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].unitPrice.value, 135.57)
+        self.assertEqual(inst.payee.type.coding[0].code, "provider")
+        self.assertEqual(inst.priority.coding[0].code, "normal")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">This example assumes a national health care scheme where patients, providers and organizations have known business identifiers.</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "oral")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+        self.assertEqual(inst.use, "complete")
+    
+    def testClaim8(self):
+        inst = self.instantiate_from("claim-example-oral-orthoplan.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Claim instance")
+        self.implClaim8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Claim", js["resourceType"])
+        inst2 = claim.Claim(js)
+        self.implClaim8(inst2)
+    
+    def implClaim8(self, inst):
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.created.date, FHIRDate("2015-03-16").date)
+        self.assertEqual(inst.created.as_json(), "2015-03-16")
+        self.assertEqual(inst.diagnosis[0].diagnosisCodeableConcept.coding[0].code, "123457")
+        self.assertEqual(inst.diagnosis[0].diagnosisCodeableConcept.coding[0].system, "http://hl7.org/fhir/sid/icd-10")
+        self.assertEqual(inst.diagnosis[0].sequence, 1)
+        self.assertEqual(inst.fundsReserve.coding[0].code, "provider")
+        self.assertEqual(inst.id, "100153")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/claim")
+        self.assertEqual(inst.identifier[0].value, "12355")
+        self.assertTrue(inst.insurance[0].focal)
+        self.assertEqual(inst.insurance[0].sequence, 1)
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].detail[0].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[0].net.value, 1000.0)
+        self.assertEqual(inst.item[0].detail[0].sequence, 1)
+        self.assertEqual(inst.item[0].detail[0].service.coding[0].code, "ORTHOEXAM")
+        self.assertEqual(inst.item[0].detail[0].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[0].detail[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].detail[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[0].unitPrice.value, 1000.0)
+        self.assertEqual(inst.item[0].detail[1].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[1].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[1].net.value, 1500.0)
+        self.assertEqual(inst.item[0].detail[1].sequence, 2)
+        self.assertEqual(inst.item[0].detail[1].service.coding[0].code, "ORTHODIAG")
+        self.assertEqual(inst.item[0].detail[1].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[0].detail[1].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].detail[1].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[1].unitPrice.value, 1500.0)
+        self.assertEqual(inst.item[0].detail[2].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[2].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[2].net.value, 500.0)
+        self.assertEqual(inst.item[0].detail[2].sequence, 3)
+        self.assertEqual(inst.item[0].detail[2].service.coding[0].code, "ORTHOINITIAL")
+        self.assertEqual(inst.item[0].detail[2].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[0].detail[2].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].detail[2].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[2].unitPrice.value, 500.0)
+        self.assertEqual(inst.item[0].detail[3].quantity.value, 24)
+        self.assertEqual(inst.item[0].detail[3].sequence, 4)
+        self.assertEqual(inst.item[0].detail[3].service.coding[0].code, "ORTHOMONTHS")
+        self.assertEqual(inst.item[0].detail[3].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[0].detail[4].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[4].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[4].net.value, 250.0)
+        self.assertEqual(inst.item[0].detail[4].quantity.value, 24)
+        self.assertEqual(inst.item[0].detail[4].sequence, 5)
+        self.assertEqual(inst.item[0].detail[4].service.coding[0].code, "ORTHOPERIODIC")
+        self.assertEqual(inst.item[0].detail[4].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[0].detail[4].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].detail[4].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[4].unitPrice.value, 250.0)
+        self.assertEqual(inst.item[0].diagnosisLinkId[0], 1)
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 9000.0)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "ORTHPLAN")
+        self.assertEqual(inst.item[0].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2015-05-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2015-05-16")
+        self.assertEqual(inst.item[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].unitPrice.value, 9000.0)
+        self.assertEqual(inst.item[1].bodySite.coding[0].code, "21")
+        self.assertEqual(inst.item[1].bodySite.coding[0].system, "http://fdi.org/fhir/oraltoothcodes")
+        self.assertEqual(inst.item[1].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[1].net.code, "USD")
+        self.assertEqual(inst.item[1].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[1].net.value, 105.0)
+        self.assertEqual(inst.item[1].sequence, 2)
+        self.assertEqual(inst.item[1].service.coding[0].code, "21211")
+        self.assertEqual(inst.item[1].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[1].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[1].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[1].subSite[0].coding[0].code, "L")
+        self.assertEqual(inst.item[1].subSite[0].coding[0].system, "http://fdi.org/fhir/oralsurfacecodes")
+        self.assertEqual(inst.item[1].unitPrice.code, "USD")
+        self.assertEqual(inst.item[1].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[1].unitPrice.value, 105.0)
+        self.assertEqual(inst.item[2].bodySite.coding[0].code, "36")
+        self.assertEqual(inst.item[2].bodySite.coding[0].system, "http://fdi.org/fhir/oraltoothcodes")
+        self.assertEqual(inst.item[2].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[2].detail[0].net.code, "USD")
+        self.assertEqual(inst.item[2].detail[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[0].net.value, 750.0)
+        self.assertEqual(inst.item[2].detail[0].sequence, 1)
+        self.assertEqual(inst.item[2].detail[0].service.coding[0].code, "27211")
+        self.assertEqual(inst.item[2].detail[0].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[2].detail[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[2].detail[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[0].unitPrice.value, 750.0)
+        self.assertEqual(inst.item[2].detail[1].net.code, "USD")
+        self.assertEqual(inst.item[2].detail[1].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[1].net.value, 350.0)
+        self.assertEqual(inst.item[2].detail[1].sequence, 2)
+        self.assertEqual(inst.item[2].detail[1].service.coding[0].code, "lab")
+        self.assertEqual(inst.item[2].detail[1].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[2].detail[1].unitPrice.code, "USD")
+        self.assertEqual(inst.item[2].detail[1].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].detail[1].unitPrice.value, 350.0)
+        self.assertEqual(inst.item[2].net.code, "USD")
+        self.assertEqual(inst.item[2].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].net.value, 1100.0)
+        self.assertEqual(inst.item[2].sequence, 3)
+        self.assertEqual(inst.item[2].service.coding[0].code, "27211")
+        self.assertEqual(inst.item[2].service.coding[0].system, "http://example.org/fhir/oralservicecodes")
+        self.assertEqual(inst.item[2].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[2].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[2].unitPrice.code, "USD")
+        self.assertEqual(inst.item[2].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[2].unitPrice.value, 1100.0)
+        self.assertEqual(inst.payee.type.coding[0].code, "provider")
+        self.assertEqual(inst.priority.coding[0].code, "normal")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Oral Health Claim</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "oral")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+        self.assertEqual(inst.use, "proposed")
+    
+    def testClaim9(self):
+        inst = self.instantiate_from("claim-example-pharmacy-compound.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Claim instance")
+        self.implClaim9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Claim", js["resourceType"])
+        inst2 = claim.Claim(js)
+        self.implClaim9(inst2)
+    
+    def implClaim9(self, inst):
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.diagnosis[0].diagnosisCodeableConcept.coding[0].code, "654456")
+        self.assertEqual(inst.diagnosis[0].sequence, 1)
+        self.assertEqual(inst.id, "760152")
+        self.assertEqual(inst.identifier[0].system, "http://happypharma.com/claim")
+        self.assertEqual(inst.identifier[0].value, "7612345")
+        self.assertEqual(inst.information[0].category.coding[0].code, "pharmacyrefill")
+        self.assertEqual(inst.information[0].code.coding[0].code, "new")
+        self.assertEqual(inst.information[0].code.coding[0].system, "http://hl7.org/fhir/pharmacy-refill")
+        self.assertEqual(inst.information[0].sequence, 1)
+        self.assertEqual(inst.information[1].category.coding[0].code, "pharmacyinformation")
+        self.assertEqual(inst.information[1].code.coding[0].code, "refillsremaining")
+        self.assertEqual(inst.information[1].code.coding[0].system, "http://hl7.org/fhir/pharmacy-information")
+        self.assertEqual(inst.information[1].sequence, 2)
+        self.assertEqual(inst.information[1].valueQuantity.value, 0)
+        self.assertEqual(inst.information[2].category.coding[0].code, "pharmacyinformation")
+        self.assertEqual(inst.information[2].code.coding[0].code, "dayssupply")
+        self.assertEqual(inst.information[2].code.coding[0].system, "http://hl7.org/fhir/pharmacy-information")
+        self.assertEqual(inst.information[2].sequence, 3)
+        self.assertEqual(inst.information[2].valueQuantity.value, 10)
+        self.assertEqual(inst.information[3].category.coding[0].code, "pharmacy")
+        self.assertEqual(inst.information[3].code.coding[0].code, "capsule")
+        self.assertEqual(inst.information[3].code.coding[0].system, "http://hl7.org/fhir/pharmacy-form")
+        self.assertEqual(inst.information[3].sequence, 4)
+        self.assertTrue(inst.insurance[0].focal)
+        self.assertEqual(inst.insurance[0].sequence, 1)
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].detail[0].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[0].net.value, 20.0)
+        self.assertEqual(inst.item[0].detail[0].quantity.unit, "mg")
+        self.assertEqual(inst.item[0].detail[0].quantity.value, 250)
+        self.assertEqual(inst.item[0].detail[0].sequence, 1)
+        self.assertEqual(inst.item[0].detail[0].service.coding[0].code, "44001")
+        self.assertEqual(inst.item[0].detail[0].service.coding[0].display, "Acetaminophen 250mg")
+        self.assertEqual(inst.item[0].detail[0].service.coding[0].system, "http://localdruglist.org")
+        self.assertEqual(inst.item[0].detail[0].subDetail[0].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[0].subDetail[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[0].subDetail[0].net.value, 20.0)
+        self.assertEqual(inst.item[0].detail[0].subDetail[0].sequence, 1)
+        self.assertEqual(inst.item[0].detail[0].subDetail[0].service.coding[0].code, "drugcost")
+        self.assertEqual(inst.item[0].detail[0].subDetail[0].service.coding[0].system, "http://hl7.org/fhir/ex-pharmaservice")
+        self.assertEqual(inst.item[0].detail[1].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[1].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[1].net.value, 25.0)
+        self.assertEqual(inst.item[0].detail[1].quantity.unit, "mg")
+        self.assertEqual(inst.item[0].detail[1].quantity.value, 50)
+        self.assertEqual(inst.item[0].detail[1].sequence, 2)
+        self.assertEqual(inst.item[0].detail[1].service.coding[0].code, "44035")
+        self.assertEqual(inst.item[0].detail[1].service.coding[0].display, "Phenacetin 50mg")
+        self.assertEqual(inst.item[0].detail[1].service.coding[0].system, "http://localdruglist.org")
+        self.assertEqual(inst.item[0].detail[1].subDetail[0].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[1].subDetail[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[1].subDetail[0].net.value, 25.0)
+        self.assertEqual(inst.item[0].detail[1].subDetail[0].sequence, 1)
+        self.assertEqual(inst.item[0].detail[1].subDetail[0].service.coding[0].code, "drugcost")
+        self.assertEqual(inst.item[0].detail[1].subDetail[0].service.coding[0].system, "http://hl7.org/fhir/ex-pharmaservice")
+        self.assertEqual(inst.item[0].detail[2].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[2].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[2].net.value, 28.0)
+        self.assertEqual(inst.item[0].detail[2].quantity.unit, "mg")
+        self.assertEqual(inst.item[0].detail[2].quantity.value, 25)
+        self.assertEqual(inst.item[0].detail[2].sequence, 3)
+        self.assertEqual(inst.item[0].detail[2].service.coding[0].code, "44057")
+        self.assertEqual(inst.item[0].detail[2].service.coding[0].display, "Codeine 25mg")
+        self.assertEqual(inst.item[0].detail[2].service.coding[0].system, "http://localdruglist.org")
+        self.assertEqual(inst.item[0].detail[2].subDetail[0].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[2].subDetail[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[2].subDetail[0].net.value, 28.0)
+        self.assertEqual(inst.item[0].detail[2].subDetail[0].sequence, 1)
+        self.assertEqual(inst.item[0].detail[2].subDetail[0].service.coding[0].code, "drugcost")
+        self.assertEqual(inst.item[0].detail[2].subDetail[0].service.coding[0].system, "http://hl7.org/fhir/ex-pharmaservice")
+        self.assertEqual(inst.item[0].detail[3].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[3].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[3].net.value, 22.0)
+        self.assertEqual(inst.item[0].detail[3].sequence, 2)
+        self.assertEqual(inst.item[0].detail[3].service.coding[0].code, "markup")
+        self.assertEqual(inst.item[0].detail[3].service.coding[0].system, "http://hl7.org/fhir/ex-pharmaservice")
+        self.assertEqual(inst.item[0].detail[4].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[4].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[4].net.value, 60.0)
+        self.assertEqual(inst.item[0].detail[4].sequence, 3)
+        self.assertEqual(inst.item[0].detail[4].service.coding[0].code, "compoundfee")
+        self.assertEqual(inst.item[0].detail[4].service.coding[0].system, "http://hl7.org/fhir/ex-pharmaservice")
+        self.assertEqual(inst.item[0].informationLinkId[0], 1)
+        self.assertEqual(inst.item[0].informationLinkId[1], 2)
+        self.assertEqual(inst.item[0].informationLinkId[2], 3)
+        self.assertEqual(inst.item[0].informationLinkId[3], 4)
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 155.0)
+        self.assertEqual(inst.item[0].quantity.code, "TAB")
+        self.assertEqual(inst.item[0].quantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.item[0].quantity.unit, "TAB")
+        self.assertEqual(inst.item[0].quantity.value, 30)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "compound")
+        self.assertEqual(inst.item[0].service.coding[0].display, "Custom compound")
+        self.assertEqual(inst.item[0].service.coding[0].system, "http://localdruglist.org")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.payee.type.coding[0].code, "provider")
+        self.assertEqual(inst.priority.coding[0].code, "stat")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Pharmacy Claim</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.total.code, "USD")
+        self.assertEqual(inst.total.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.total.value, 155.0)
+        self.assertEqual(inst.type.coding[0].code, "pharmacy")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+        self.assertEqual(inst.use, "complete")
+    
+    def testClaim10(self):
+        inst = self.instantiate_from("claim-example-pharmacy-medication.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Claim instance")
+        self.implClaim10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Claim", js["resourceType"])
+        inst2 = claim.Claim(js)
+        self.implClaim10(inst2)
+    
+    def implClaim10(self, inst):
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.diagnosis[0].diagnosisCodeableConcept.coding[0].code, "654456")
+        self.assertEqual(inst.diagnosis[0].sequence, 1)
+        self.assertEqual(inst.id, "760151")
+        self.assertEqual(inst.identifier[0].system, "http://happypharma.com/claim")
+        self.assertEqual(inst.identifier[0].value, "7612345")
+        self.assertEqual(inst.information[0].category.coding[0].code, "pharmacyrefill")
+        self.assertEqual(inst.information[0].code.coding[0].code, "new")
+        self.assertEqual(inst.information[0].code.coding[0].system, "http://hl7.org/fhir/pharmacy-refill")
+        self.assertEqual(inst.information[0].sequence, 1)
+        self.assertEqual(inst.information[1].category.coding[0].code, "pharmacyinformation")
+        self.assertEqual(inst.information[1].code.coding[0].code, "refillsremaining")
+        self.assertEqual(inst.information[1].code.coding[0].system, "http://hl7.org/fhir/pharmacy-information")
+        self.assertEqual(inst.information[1].sequence, 2)
+        self.assertEqual(inst.information[1].valueQuantity.value, 2)
+        self.assertEqual(inst.information[2].category.coding[0].code, "pharmacyinformation")
+        self.assertEqual(inst.information[2].code.coding[0].code, "dayssupply")
+        self.assertEqual(inst.information[2].code.coding[0].system, "http://hl7.org/fhir/pharmacy-information")
+        self.assertEqual(inst.information[2].sequence, 3)
+        self.assertEqual(inst.information[2].valueQuantity.value, 90)
+        self.assertTrue(inst.insurance[0].focal)
+        self.assertEqual(inst.insurance[0].sequence, 1)
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].detail[0].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[0].net.value, 45.0)
+        self.assertEqual(inst.item[0].detail[0].sequence, 1)
+        self.assertEqual(inst.item[0].detail[0].service.coding[0].code, "drugcost")
+        self.assertEqual(inst.item[0].detail[0].service.coding[0].system, "http://hl7.org/fhir/ex-pharmaservice")
+        self.assertEqual(inst.item[0].detail[1].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[1].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[1].net.value, 9.0)
+        self.assertEqual(inst.item[0].detail[1].sequence, 2)
+        self.assertEqual(inst.item[0].detail[1].service.coding[0].code, "markup")
+        self.assertEqual(inst.item[0].detail[1].service.coding[0].system, "http://hl7.org/fhir/ex-pharmaservice")
+        self.assertEqual(inst.item[0].detail[2].net.code, "USD")
+        self.assertEqual(inst.item[0].detail[2].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].detail[2].net.value, 36.0)
+        self.assertEqual(inst.item[0].detail[2].sequence, 3)
+        self.assertEqual(inst.item[0].detail[2].service.coding[0].code, "dispensefee")
+        self.assertEqual(inst.item[0].detail[2].service.coding[0].system, "http://hl7.org/fhir/ex-pharmaservice")
+        self.assertEqual(inst.item[0].informationLinkId[0], 1)
+        self.assertEqual(inst.item[0].informationLinkId[1], 2)
+        self.assertEqual(inst.item[0].informationLinkId[2], 3)
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 90.0)
+        self.assertEqual(inst.item[0].quantity.code, "TAB")
+        self.assertEqual(inst.item[0].quantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.item[0].quantity.unit, "TAB")
+        self.assertEqual(inst.item[0].quantity.value, 90)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "562721")
+        self.assertEqual(inst.item[0].service.coding[0].display, "Alprazolam 0.25mg (Xanax)")
+        self.assertEqual(inst.item[0].service.coding[0].system, "http://hl7.org/fhir/RxNorm")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.payee.type.coding[0].code, "provider")
+        self.assertEqual(inst.priority.coding[0].code, "stat")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Pharmacy Claim</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.total.code, "USD")
+        self.assertEqual(inst.total.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.total.value, 90.0)
+        self.assertEqual(inst.type.coding[0].code, "pharmacy")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+        self.assertEqual(inst.use, "complete")
+
diff --git a/fhirclient/models/claimresponse.py b/fhirclient/models/claimresponse.py
new file mode 100644
index 0000000..447aac7
--- /dev/null
+++ b/fhirclient/models/claimresponse.py
@@ -0,0 +1,682 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ClaimResponse) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ClaimResponse(domainresource.DomainResource):
+    """ Remittance resource.
+    
+    This resource provides the adjudication details from the processing of a
+    Claim resource.
+    """
+    
+    resource_type = "ClaimResponse"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.addItem = None
+        """ Insurer added line items.
+        List of `ClaimResponseAddItem` items (represented as `dict` in JSON). """
+        
+        self.communicationRequest = None
+        """ Request for additional information.
+        List of `FHIRReference` items referencing `CommunicationRequest` (represented as `dict` in JSON). """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.disposition = None
+        """ Disposition Message.
+        Type `str`. """
+        
+        self.error = None
+        """ Processing errors.
+        List of `ClaimResponseError` items (represented as `dict` in JSON). """
+        
+        self.form = None
+        """ Printed Form Identifier.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Response  number.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.insurance = None
+        """ Insurance or medical plan.
+        List of `ClaimResponseInsurance` items (represented as `dict` in JSON). """
+        
+        self.insurer = None
+        """ Insurance issuing organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.item = None
+        """ Line items.
+        List of `ClaimResponseItem` items (represented as `dict` in JSON). """
+        
+        self.outcome = None
+        """ complete | error | partial.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ The subject of the Products and Services.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.payeeType = None
+        """ Party to be paid any benefits payable.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.payment = None
+        """ Payment details, if paid.
+        Type `ClaimResponsePayment` (represented as `dict` in JSON). """
+        
+        self.processNote = None
+        """ Processing notes.
+        List of `ClaimResponseProcessNote` items (represented as `dict` in JSON). """
+        
+        self.request = None
+        """ Id of resource triggering adjudication.
+        Type `FHIRReference` referencing `Claim` (represented as `dict` in JSON). """
+        
+        self.requestOrganization = None
+        """ Responsible organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.requestProvider = None
+        """ Responsible practitioner.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.reserved = None
+        """ Funds reserved status.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        self.totalBenefit = None
+        """ Total benefit payable for the Claim.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.totalCost = None
+        """ Total Cost of service from the Claim.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.unallocDeductable = None
+        """ Unallocated deductible.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(ClaimResponse, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponse, self).elementProperties()
+        js.extend([
+            ("addItem", "addItem", ClaimResponseAddItem, True, None, False),
+            ("communicationRequest", "communicationRequest", fhirreference.FHIRReference, True, None, False),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("disposition", "disposition", str, False, None, False),
+            ("error", "error", ClaimResponseError, True, None, False),
+            ("form", "form", codeableconcept.CodeableConcept, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("insurance", "insurance", ClaimResponseInsurance, True, None, False),
+            ("insurer", "insurer", fhirreference.FHIRReference, False, None, False),
+            ("item", "item", ClaimResponseItem, True, None, False),
+            ("outcome", "outcome", codeableconcept.CodeableConcept, False, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, False),
+            ("payeeType", "payeeType", codeableconcept.CodeableConcept, False, None, False),
+            ("payment", "payment", ClaimResponsePayment, False, None, False),
+            ("processNote", "processNote", ClaimResponseProcessNote, True, None, False),
+            ("request", "request", fhirreference.FHIRReference, False, None, False),
+            ("requestOrganization", "requestOrganization", fhirreference.FHIRReference, False, None, False),
+            ("requestProvider", "requestProvider", fhirreference.FHIRReference, False, None, False),
+            ("reserved", "reserved", coding.Coding, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("totalBenefit", "totalBenefit", money.Money, False, None, False),
+            ("totalCost", "totalCost", money.Money, False, None, False),
+            ("unallocDeductable", "unallocDeductable", money.Money, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ClaimResponseAddItem(backboneelement.BackboneElement):
+    """ Insurer added line items.
+    
+    The first tier service adjudications for payor added services.
+    """
+    
+    resource_type = "ClaimResponseAddItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjudication = None
+        """ Added items adjudication.
+        List of `ClaimResponseItemAdjudication` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Type of service or product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.detail = None
+        """ Added items details.
+        List of `ClaimResponseAddItemDetail` items (represented as `dict` in JSON). """
+        
+        self.fee = None
+        """ Professional fee or Product charge.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.modifier = None
+        """ Service/Product billing modifiers.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.noteNumber = None
+        """ List of note numbers which apply.
+        List of `int` items. """
+        
+        self.revenue = None
+        """ Revenue or cost center code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequenceLinkId = None
+        """ Service instances.
+        List of `int` items. """
+        
+        self.service = None
+        """ Group, Service or Product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ClaimResponseAddItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponseAddItem, self).elementProperties()
+        js.extend([
+            ("adjudication", "adjudication", ClaimResponseItemAdjudication, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("detail", "detail", ClaimResponseAddItemDetail, True, None, False),
+            ("fee", "fee", money.Money, False, None, False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, True, None, False),
+            ("noteNumber", "noteNumber", int, True, None, False),
+            ("revenue", "revenue", codeableconcept.CodeableConcept, False, None, False),
+            ("sequenceLinkId", "sequenceLinkId", int, True, None, False),
+            ("service", "service", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ClaimResponseAddItemDetail(backboneelement.BackboneElement):
+    """ Added items details.
+    
+    The second tier service adjudications for payor added services.
+    """
+    
+    resource_type = "ClaimResponseAddItemDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjudication = None
+        """ Added items detail adjudication.
+        List of `ClaimResponseItemAdjudication` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Type of service or product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.fee = None
+        """ Professional fee or Product charge.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.modifier = None
+        """ Service/Product billing modifiers.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.noteNumber = None
+        """ List of note numbers which apply.
+        List of `int` items. """
+        
+        self.revenue = None
+        """ Revenue or cost center code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.service = None
+        """ Service or Product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ClaimResponseAddItemDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponseAddItemDetail, self).elementProperties()
+        js.extend([
+            ("adjudication", "adjudication", ClaimResponseItemAdjudication, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("fee", "fee", money.Money, False, None, False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, True, None, False),
+            ("noteNumber", "noteNumber", int, True, None, False),
+            ("revenue", "revenue", codeableconcept.CodeableConcept, False, None, False),
+            ("service", "service", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ClaimResponseError(backboneelement.BackboneElement):
+    """ Processing errors.
+    
+    Mutually exclusive with Services Provided (Item).
+    """
+    
+    resource_type = "ClaimResponseError"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Error code detailing processing issues.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.detailSequenceLinkId = None
+        """ Detail sequence number.
+        Type `int`. """
+        
+        self.sequenceLinkId = None
+        """ Item sequence number.
+        Type `int`. """
+        
+        self.subdetailSequenceLinkId = None
+        """ Subdetail sequence number.
+        Type `int`. """
+        
+        super(ClaimResponseError, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponseError, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("detailSequenceLinkId", "detailSequenceLinkId", int, False, None, False),
+            ("sequenceLinkId", "sequenceLinkId", int, False, None, False),
+            ("subdetailSequenceLinkId", "subdetailSequenceLinkId", int, False, None, False),
+        ])
+        return js
+
+
+class ClaimResponseInsurance(backboneelement.BackboneElement):
+    """ Insurance or medical plan.
+    
+    Financial instrument by which payment information for health care.
+    """
+    
+    resource_type = "ClaimResponseInsurance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.businessArrangement = None
+        """ Business agreement.
+        Type `str`. """
+        
+        self.claimResponse = None
+        """ Adjudication results.
+        Type `FHIRReference` referencing `ClaimResponse` (represented as `dict` in JSON). """
+        
+        self.coverage = None
+        """ Insurance information.
+        Type `FHIRReference` referencing `Coverage` (represented as `dict` in JSON). """
+        
+        self.focal = None
+        """ Is the focal Coverage.
+        Type `bool`. """
+        
+        self.preAuthRef = None
+        """ Pre-Authorization/Determination Reference.
+        List of `str` items. """
+        
+        self.sequence = None
+        """ Service instance identifier.
+        Type `int`. """
+        
+        super(ClaimResponseInsurance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponseInsurance, self).elementProperties()
+        js.extend([
+            ("businessArrangement", "businessArrangement", str, False, None, False),
+            ("claimResponse", "claimResponse", fhirreference.FHIRReference, False, None, False),
+            ("coverage", "coverage", fhirreference.FHIRReference, False, None, True),
+            ("focal", "focal", bool, False, None, True),
+            ("preAuthRef", "preAuthRef", str, True, None, False),
+            ("sequence", "sequence", int, False, None, True),
+        ])
+        return js
+
+
+class ClaimResponseItem(backboneelement.BackboneElement):
+    """ Line items.
+    
+    The first tier service adjudications for submitted services.
+    """
+    
+    resource_type = "ClaimResponseItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjudication = None
+        """ Adjudication details.
+        List of `ClaimResponseItemAdjudication` items (represented as `dict` in JSON). """
+        
+        self.detail = None
+        """ Detail line items.
+        List of `ClaimResponseItemDetail` items (represented as `dict` in JSON). """
+        
+        self.noteNumber = None
+        """ List of note numbers which apply.
+        List of `int` items. """
+        
+        self.sequenceLinkId = None
+        """ Service instance.
+        Type `int`. """
+        
+        super(ClaimResponseItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponseItem, self).elementProperties()
+        js.extend([
+            ("adjudication", "adjudication", ClaimResponseItemAdjudication, True, None, False),
+            ("detail", "detail", ClaimResponseItemDetail, True, None, False),
+            ("noteNumber", "noteNumber", int, True, None, False),
+            ("sequenceLinkId", "sequenceLinkId", int, False, None, True),
+        ])
+        return js
+
+
+class ClaimResponseItemAdjudication(backboneelement.BackboneElement):
+    """ Adjudication details.
+    
+    The adjudication results.
+    """
+    
+    resource_type = "ClaimResponseItemAdjudication"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.amount = None
+        """ Monetary amount.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Adjudication category such as co-pay, eligible, benefit, etc..
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reason = None
+        """ Explanation of Adjudication outcome.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.value = None
+        """ Non-monetary value.
+        Type `float`. """
+        
+        super(ClaimResponseItemAdjudication, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponseItemAdjudication, self).elementProperties()
+        js.extend([
+            ("amount", "amount", money.Money, False, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, True),
+            ("reason", "reason", codeableconcept.CodeableConcept, False, None, False),
+            ("value", "value", float, False, None, False),
+        ])
+        return js
+
+
+class ClaimResponseItemDetail(backboneelement.BackboneElement):
+    """ Detail line items.
+    
+    The second tier service adjudications for submitted services.
+    """
+    
+    resource_type = "ClaimResponseItemDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjudication = None
+        """ Detail level adjudication details.
+        List of `ClaimResponseItemAdjudication` items (represented as `dict` in JSON). """
+        
+        self.noteNumber = None
+        """ List of note numbers which apply.
+        List of `int` items. """
+        
+        self.sequenceLinkId = None
+        """ Service instance.
+        Type `int`. """
+        
+        self.subDetail = None
+        """ Subdetail line items.
+        List of `ClaimResponseItemDetailSubDetail` items (represented as `dict` in JSON). """
+        
+        super(ClaimResponseItemDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponseItemDetail, self).elementProperties()
+        js.extend([
+            ("adjudication", "adjudication", ClaimResponseItemAdjudication, True, None, False),
+            ("noteNumber", "noteNumber", int, True, None, False),
+            ("sequenceLinkId", "sequenceLinkId", int, False, None, True),
+            ("subDetail", "subDetail", ClaimResponseItemDetailSubDetail, True, None, False),
+        ])
+        return js
+
+
+class ClaimResponseItemDetailSubDetail(backboneelement.BackboneElement):
+    """ Subdetail line items.
+    
+    The third tier service adjudications for submitted services.
+    """
+    
+    resource_type = "ClaimResponseItemDetailSubDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjudication = None
+        """ Subdetail level adjudication details.
+        List of `ClaimResponseItemAdjudication` items (represented as `dict` in JSON). """
+        
+        self.noteNumber = None
+        """ List of note numbers which apply.
+        List of `int` items. """
+        
+        self.sequenceLinkId = None
+        """ Service instance.
+        Type `int`. """
+        
+        super(ClaimResponseItemDetailSubDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponseItemDetailSubDetail, self).elementProperties()
+        js.extend([
+            ("adjudication", "adjudication", ClaimResponseItemAdjudication, True, None, False),
+            ("noteNumber", "noteNumber", int, True, None, False),
+            ("sequenceLinkId", "sequenceLinkId", int, False, None, True),
+        ])
+        return js
+
+
+class ClaimResponsePayment(backboneelement.BackboneElement):
+    """ Payment details, if paid.
+    
+    Payment details for the claim if the claim has been paid.
+    """
+    
+    resource_type = "ClaimResponsePayment"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjustment = None
+        """ Payment adjustment for non-Claim issues.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.adjustmentReason = None
+        """ Explanation for the non-claim adjustment.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.amount = None
+        """ Payable amount after adjustment.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Expected data of Payment.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.identifier = None
+        """ Identifier of the payment instrument.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Partial or Complete.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ClaimResponsePayment, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponsePayment, self).elementProperties()
+        js.extend([
+            ("adjustment", "adjustment", money.Money, False, None, False),
+            ("adjustmentReason", "adjustmentReason", codeableconcept.CodeableConcept, False, None, False),
+            ("amount", "amount", money.Money, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ClaimResponseProcessNote(backboneelement.BackboneElement):
+    """ Processing notes.
+    
+    Note text.
+    """
+    
+    resource_type = "ClaimResponseProcessNote"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.language = None
+        """ Language if different from the resource.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.number = None
+        """ Sequence Number for this note.
+        Type `int`. """
+        
+        self.text = None
+        """ Note explanatory text.
+        Type `str`. """
+        
+        self.type = None
+        """ display | print | printoper.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ClaimResponseProcessNote, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClaimResponseProcessNote, self).elementProperties()
+        js.extend([
+            ("language", "language", codeableconcept.CodeableConcept, False, None, False),
+            ("number", "number", int, False, None, False),
+            ("text", "text", str, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
diff --git a/fhirclient/models/claimresponse_tests.py b/fhirclient/models/claimresponse_tests.py
new file mode 100644
index 0000000..2e9d56e
--- /dev/null
+++ b/fhirclient/models/claimresponse_tests.py
@@ -0,0 +1,78 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import claimresponse
+from .fhirdate import FHIRDate
+
+
+class ClaimResponseTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ClaimResponse", js["resourceType"])
+        return claimresponse.ClaimResponse(js)
+    
+    def testClaimResponse1(self):
+        inst = self.instantiate_from("claimresponse-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ClaimResponse instance")
+        self.implClaimResponse1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ClaimResponse", js["resourceType"])
+        inst2 = claimresponse.ClaimResponse(js)
+        self.implClaimResponse1(inst2)
+    
+    def implClaimResponse1(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.disposition, "Claim settled as per contract.")
+        self.assertEqual(inst.id, "R3500")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/remittance")
+        self.assertEqual(inst.identifier[0].value, "R3500")
+        self.assertEqual(inst.item[0].adjudication[0].amount.code, "USD")
+        self.assertEqual(inst.item[0].adjudication[0].amount.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].adjudication[0].amount.value, 135.57)
+        self.assertEqual(inst.item[0].adjudication[0].category.coding[0].code, "eligible")
+        self.assertEqual(inst.item[0].adjudication[1].amount.code, "USD")
+        self.assertEqual(inst.item[0].adjudication[1].amount.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].adjudication[1].amount.value, 10.0)
+        self.assertEqual(inst.item[0].adjudication[1].category.coding[0].code, "copay")
+        self.assertEqual(inst.item[0].adjudication[2].category.coding[0].code, "eligpercent")
+        self.assertEqual(inst.item[0].adjudication[2].value, 80.0)
+        self.assertEqual(inst.item[0].adjudication[3].amount.code, "USD")
+        self.assertEqual(inst.item[0].adjudication[3].amount.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].adjudication[3].amount.value, 100.47)
+        self.assertEqual(inst.item[0].adjudication[3].category.coding[0].code, "benefit")
+        self.assertEqual(inst.item[0].sequenceLinkId, 1)
+        self.assertEqual(inst.outcome.coding[0].code, "complete")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/remittance-outcome")
+        self.assertEqual(inst.payeeType.coding[0].code, "provider")
+        self.assertEqual(inst.payeeType.coding[0].system, "http://hl7.org/fhir/payeetype")
+        self.assertEqual(inst.payment.amount.code, "USD")
+        self.assertEqual(inst.payment.amount.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.payment.amount.value, 100.47)
+        self.assertEqual(inst.payment.date.date, FHIRDate("2014-08-31").date)
+        self.assertEqual(inst.payment.date.as_json(), "2014-08-31")
+        self.assertEqual(inst.payment.identifier.system, "http://www.BenefitsInc.com/fhir/paymentidentifier")
+        self.assertEqual(inst.payment.identifier.value, "201408-2-1569478")
+        self.assertEqual(inst.payment.type.coding[0].code, "complete")
+        self.assertEqual(inst.payment.type.coding[0].system, "http://hl7.org/fhir/ex-paymenttype")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the ClaimResponse</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.totalBenefit.code, "USD")
+        self.assertEqual(inst.totalBenefit.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.totalBenefit.value, 100.47)
+        self.assertEqual(inst.totalCost.code, "USD")
+        self.assertEqual(inst.totalCost.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.totalCost.value, 135.57)
+
diff --git a/fhirclient/models/clinicalimpression.py b/fhirclient/models/clinicalimpression.py
new file mode 100644
index 0000000..5971350
--- /dev/null
+++ b/fhirclient/models/clinicalimpression.py
@@ -0,0 +1,248 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ClinicalImpression) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ClinicalImpression(domainresource.DomainResource):
+    """ A clinical assessment performed when planning treatments and management
+    strategies for a patient.
+    
+    A record of a clinical assessment performed to determine what problem(s)
+    may affect the patient and before planning the treatments or management
+    strategies that are best to manage a patient's condition. Assessments are
+    often 1:1 with a clinical consultation / encounter,  but this varies
+    greatly depending on the clinical workflow. This resource is called
+    "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion
+    with the recording of assessment tools such as Apgar score.
+    """
+    
+    resource_type = "ClinicalImpression"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ Action taken as part of assessment procedure.
+        List of `FHIRReference` items referencing `ReferralRequest, ProcedureRequest, Procedure, MedicationRequest, Appointment` (represented as `dict` in JSON). """
+        
+        self.assessor = None
+        """ The clinician performing the assessment.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Kind of assessment performed.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or Episode created from.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ When the assessment was documented.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Why/how the assessment was performed.
+        Type `str`. """
+        
+        self.effectiveDateTime = None
+        """ Time of assessment.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.effectivePeriod = None
+        """ Time of assessment.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.finding = None
+        """ Possible or likely findings and diagnoses.
+        List of `ClinicalImpressionFinding` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.investigation = None
+        """ One or more sets of investigations (signs, symptions, etc.).
+        List of `ClinicalImpressionInvestigation` items (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Comments made about the ClinicalImpression.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.previous = None
+        """ Reference to last assessment.
+        Type `FHIRReference` referencing `ClinicalImpression` (represented as `dict` in JSON). """
+        
+        self.problem = None
+        """ Relevant impressions of patient state.
+        List of `FHIRReference` items referencing `Condition, AllergyIntolerance` (represented as `dict` in JSON). """
+        
+        self.prognosisCodeableConcept = None
+        """ Estimate of likely outcome.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.prognosisReference = None
+        """ RiskAssessment expressing likely outcome.
+        List of `FHIRReference` items referencing `RiskAssessment` (represented as `dict` in JSON). """
+        
+        self.protocol = None
+        """ Clinical Protocol followed.
+        List of `str` items. """
+        
+        self.status = None
+        """ draft | completed | entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ Patient or group assessed.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.summary = None
+        """ Summary of the assessment.
+        Type `str`. """
+        
+        super(ClinicalImpression, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClinicalImpression, self).elementProperties()
+        js.extend([
+            ("action", "action", fhirreference.FHIRReference, True, None, False),
+            ("assessor", "assessor", fhirreference.FHIRReference, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("effectiveDateTime", "effectiveDateTime", fhirdate.FHIRDate, False, "effective", False),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, "effective", False),
+            ("finding", "finding", ClinicalImpressionFinding, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("investigation", "investigation", ClinicalImpressionInvestigation, True, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("previous", "previous", fhirreference.FHIRReference, False, None, False),
+            ("problem", "problem", fhirreference.FHIRReference, True, None, False),
+            ("prognosisCodeableConcept", "prognosisCodeableConcept", codeableconcept.CodeableConcept, True, None, False),
+            ("prognosisReference", "prognosisReference", fhirreference.FHIRReference, True, None, False),
+            ("protocol", "protocol", str, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("summary", "summary", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ClinicalImpressionFinding(backboneelement.BackboneElement):
+    """ Possible or likely findings and diagnoses.
+    
+    Specific findings or diagnoses that was considered likely or relevant to
+    ongoing treatment.
+    """
+    
+    resource_type = "ClinicalImpressionFinding"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.basis = None
+        """ Which investigations support finding.
+        Type `str`. """
+        
+        self.itemCodeableConcept = None
+        """ What was found.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.itemReference = None
+        """ What was found.
+        Type `FHIRReference` referencing `Condition, Observation` (represented as `dict` in JSON). """
+        
+        super(ClinicalImpressionFinding, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClinicalImpressionFinding, self).elementProperties()
+        js.extend([
+            ("basis", "basis", str, False, None, False),
+            ("itemCodeableConcept", "itemCodeableConcept", codeableconcept.CodeableConcept, False, "item", True),
+            ("itemReference", "itemReference", fhirreference.FHIRReference, False, "item", True),
+        ])
+        return js
+
+
+class ClinicalImpressionInvestigation(backboneelement.BackboneElement):
+    """ One or more sets of investigations (signs, symptions, etc.).
+    
+    One or more sets of investigations (signs, symptions, etc.). The actual
+    grouping of investigations vary greatly depending on the type and context
+    of the assessment. These investigations may include data generated during
+    the assessment process, or data previously generated and recorded that is
+    pertinent to the outcomes.
+    """
+    
+    resource_type = "ClinicalImpressionInvestigation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ A name/code for the set.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.item = None
+        """ Record of a specific investigation.
+        List of `FHIRReference` items referencing `Observation, QuestionnaireResponse, FamilyMemberHistory, DiagnosticReport, RiskAssessment, ImagingStudy` (represented as `dict` in JSON). """
+        
+        super(ClinicalImpressionInvestigation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ClinicalImpressionInvestigation, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("item", "item", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/clinicalimpression_tests.py b/fhirclient/models/clinicalimpression_tests.py
new file mode 100644
index 0000000..c6188c9
--- /dev/null
+++ b/fhirclient/models/clinicalimpression_tests.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import clinicalimpression
+from .fhirdate import FHIRDate
+
+
+class ClinicalImpressionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ClinicalImpression", js["resourceType"])
+        return clinicalimpression.ClinicalImpression(js)
+    
+    def testClinicalImpression1(self):
+        inst = self.instantiate_from("clinicalimpression-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ClinicalImpression instance")
+        self.implClinicalImpression1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ClinicalImpression", js["resourceType"])
+        inst2 = clinicalimpression.ClinicalImpression(js)
+        self.implClinicalImpression1(inst2)
+    
+    def implClinicalImpression1(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2014-12-06T22:33:00+11:00").date)
+        self.assertEqual(inst.date.as_json(), "2014-12-06T22:33:00+11:00")
+        self.assertEqual(inst.description, "This 26 yo male patient is brought into ER by ambulance after being involved in a motor vehicle accident")
+        self.assertEqual(inst.effectivePeriod.end.date, FHIRDate("2014-12-06T22:33:00+11:00").date)
+        self.assertEqual(inst.effectivePeriod.end.as_json(), "2014-12-06T22:33:00+11:00")
+        self.assertEqual(inst.effectivePeriod.start.date, FHIRDate("2014-12-06T20:00:00+11:00").date)
+        self.assertEqual(inst.effectivePeriod.start.as_json(), "2014-12-06T20:00:00+11:00")
+        self.assertEqual(inst.finding[0].itemCodeableConcept.coding[0].code, "850.0")
+        self.assertEqual(inst.finding[0].itemCodeableConcept.coding[0].system, "http://hl7.org/fhir/sid/icd-9")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.investigation[0].code.text, "Initial Examination")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.summary, "provisional diagnoses of laceration of head and traumatic brain injury (TBI)")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/codeableconcept.py b/fhirclient/models/codeableconcept.py
new file mode 100644
index 0000000..4868869
--- /dev/null
+++ b/fhirclient/models/codeableconcept.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/CodeableConcept) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class CodeableConcept(element.Element):
+    """ Concept - reference to a terminology or just  text.
+    
+    A concept that may be defined by a formal reference to a terminology or
+    ontology or may be provided by text.
+    """
+    
+    resource_type = "CodeableConcept"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.coding = None
+        """ Code defined by a terminology system.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.text = None
+        """ Plain text representation of the concept.
+        Type `str`. """
+        
+        super(CodeableConcept, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CodeableConcept, self).elementProperties()
+        js.extend([
+            ("coding", "coding", coding.Coding, True, None, False),
+            ("text", "text", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
diff --git a/fhirclient/models/codesystem.py b/fhirclient/models/codesystem.py
new file mode 100644
index 0000000..369f70d
--- /dev/null
+++ b/fhirclient/models/codesystem.py
@@ -0,0 +1,439 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/CodeSystem) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class CodeSystem(domainresource.DomainResource):
+    """ A set of codes drawn from one or more code systems.
+    
+    A code system resource specifies a set of codes drawn from one or more code
+    systems.
+    """
+    
+    resource_type = "CodeSystem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.caseSensitive = None
+        """ If code comparison is case sensitive.
+        Type `bool`. """
+        
+        self.compositional = None
+        """ If code system defines a post-composition grammar.
+        Type `bool`. """
+        
+        self.concept = None
+        """ Concepts in the code system.
+        List of `CodeSystemConcept` items (represented as `dict` in JSON). """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.content = None
+        """ not-present | example | fragment | complete.
+        Type `str`. """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.count = None
+        """ Total concepts in the code system.
+        Type `int`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the code system.
+        Type `str`. """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.filter = None
+        """ Filter that can be used in a value set.
+        List of `CodeSystemFilter` items (represented as `dict` in JSON). """
+        
+        self.hierarchyMeaning = None
+        """ grouped-by | is-a | part-of | classified-with.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Additional identifier for the code system.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for code system (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this code system (computer friendly).
+        Type `str`. """
+        
+        self.property = None
+        """ Additional information supplied about each concept.
+        List of `CodeSystemProperty` items (represented as `dict` in JSON). """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this code system is defined.
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this code system (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this code system (globally unique)
+        (Coding.system).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.valueSet = None
+        """ Canonical URL for value set with entire code system.
+        Type `str`. """
+        
+        self.version = None
+        """ Business version of the code system (Coding.version).
+        Type `str`. """
+        
+        self.versionNeeded = None
+        """ If definitions are not stable.
+        Type `bool`. """
+        
+        super(CodeSystem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CodeSystem, self).elementProperties()
+        js.extend([
+            ("caseSensitive", "caseSensitive", bool, False, None, False),
+            ("compositional", "compositional", bool, False, None, False),
+            ("concept", "concept", CodeSystemConcept, True, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("content", "content", str, False, None, True),
+            ("copyright", "copyright", str, False, None, False),
+            ("count", "count", int, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("filter", "filter", CodeSystemFilter, True, None, False),
+            ("hierarchyMeaning", "hierarchyMeaning", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("property", "property", CodeSystemProperty, True, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("valueSet", "valueSet", str, False, None, False),
+            ("version", "version", str, False, None, False),
+            ("versionNeeded", "versionNeeded", bool, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class CodeSystemConcept(backboneelement.BackboneElement):
+    """ Concepts in the code system.
+    
+    Concepts that are in the code system. The concept definitions are
+    inherently hierarchical, but the definitions must be consulted to determine
+    what the meaning of the hierarchical relationships are.
+    """
+    
+    resource_type = "CodeSystemConcept"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Code that identifies concept.
+        Type `str`. """
+        
+        self.concept = None
+        """ Child Concepts (is-a/contains/categorizes).
+        List of `CodeSystemConcept` items (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Formal definition.
+        Type `str`. """
+        
+        self.designation = None
+        """ Additional representations for the concept.
+        List of `CodeSystemConceptDesignation` items (represented as `dict` in JSON). """
+        
+        self.display = None
+        """ Text to display to the user.
+        Type `str`. """
+        
+        self.property = None
+        """ Property value for the concept.
+        List of `CodeSystemConceptProperty` items (represented as `dict` in JSON). """
+        
+        super(CodeSystemConcept, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CodeSystemConcept, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("concept", "concept", CodeSystemConcept, True, None, False),
+            ("definition", "definition", str, False, None, False),
+            ("designation", "designation", CodeSystemConceptDesignation, True, None, False),
+            ("display", "display", str, False, None, False),
+            ("property", "property", CodeSystemConceptProperty, True, None, False),
+        ])
+        return js
+
+
+class CodeSystemConceptDesignation(backboneelement.BackboneElement):
+    """ Additional representations for the concept.
+    
+    Additional representations for the concept - other languages, aliases,
+    specialized purposes, used for particular purposes, etc.
+    """
+    
+    resource_type = "CodeSystemConceptDesignation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.language = None
+        """ Human language of the designation.
+        Type `str`. """
+        
+        self.use = None
+        """ Details how this designation would be used.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.value = None
+        """ The text value for this designation.
+        Type `str`. """
+        
+        super(CodeSystemConceptDesignation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CodeSystemConceptDesignation, self).elementProperties()
+        js.extend([
+            ("language", "language", str, False, None, False),
+            ("use", "use", coding.Coding, False, None, False),
+            ("value", "value", str, False, None, True),
+        ])
+        return js
+
+
+class CodeSystemConceptProperty(backboneelement.BackboneElement):
+    """ Property value for the concept.
+    
+    A property value for this concept.
+    """
+    
+    resource_type = "CodeSystemConceptProperty"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Reference to CodeSystem.property.code.
+        Type `str`. """
+        
+        self.valueBoolean = None
+        """ Value of the property for this concept.
+        Type `bool`. """
+        
+        self.valueCode = None
+        """ Value of the property for this concept.
+        Type `str`. """
+        
+        self.valueCoding = None
+        """ Value of the property for this concept.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.valueDateTime = None
+        """ Value of the property for this concept.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueInteger = None
+        """ Value of the property for this concept.
+        Type `int`. """
+        
+        self.valueString = None
+        """ Value of the property for this concept.
+        Type `str`. """
+        
+        super(CodeSystemConceptProperty, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CodeSystemConceptProperty, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("valueBoolean", "valueBoolean", bool, False, "value", True),
+            ("valueCode", "valueCode", str, False, "value", True),
+            ("valueCoding", "valueCoding", coding.Coding, False, "value", True),
+            ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", True),
+            ("valueInteger", "valueInteger", int, False, "value", True),
+            ("valueString", "valueString", str, False, "value", True),
+        ])
+        return js
+
+
+class CodeSystemFilter(backboneelement.BackboneElement):
+    """ Filter that can be used in a value set.
+    
+    A filter that can be used in a value set compose statement when selecting
+    concepts using a filter.
+    """
+    
+    resource_type = "CodeSystemFilter"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Code that identifies the filter.
+        Type `str`. """
+        
+        self.description = None
+        """ How or why the filter is used.
+        Type `str`. """
+        
+        self.operator = None
+        """ Operators that can be used with filter.
+        List of `str` items. """
+        
+        self.value = None
+        """ What to use for the value.
+        Type `str`. """
+        
+        super(CodeSystemFilter, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CodeSystemFilter, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("operator", "operator", str, True, None, True),
+            ("value", "value", str, False, None, True),
+        ])
+        return js
+
+
+class CodeSystemProperty(backboneelement.BackboneElement):
+    """ Additional information supplied about each concept.
+    
+    A property defines an additional slot through which additional information
+    can be provided about a concept.
+    """
+    
+    resource_type = "CodeSystemProperty"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Identifies the property on the concepts, and when referred to in
+        operations.
+        Type `str`. """
+        
+        self.description = None
+        """ Why the property is defined, and/or what it conveys.
+        Type `str`. """
+        
+        self.type = None
+        """ code | Coding | string | integer | boolean | dateTime.
+        Type `str`. """
+        
+        self.uri = None
+        """ Formal identifier for the property.
+        Type `str`. """
+        
+        super(CodeSystemProperty, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CodeSystemProperty, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("type", "type", str, False, None, True),
+            ("uri", "uri", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/codesystem_tests.py b/fhirclient/models/codesystem_tests.py
new file mode 100644
index 0000000..9715349
--- /dev/null
+++ b/fhirclient/models/codesystem_tests.py
@@ -0,0 +1,169 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import codesystem
+from .fhirdate import FHIRDate
+
+
+class CodeSystemTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("CodeSystem", js["resourceType"])
+        return codesystem.CodeSystem(js)
+    
+    def testCodeSystem1(self):
+        inst = self.instantiate_from("codesystem-example-summary.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CodeSystem instance")
+        self.implCodeSystem1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CodeSystem", js["resourceType"])
+        inst2 = codesystem.CodeSystem(js)
+        self.implCodeSystem1(inst2)
+    
+    def implCodeSystem1(self, inst):
+        self.assertTrue(inst.caseSensitive)
+        self.assertEqual(inst.contact[0].name, "FHIR project team")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.content, "not-present")
+        self.assertEqual(inst.count, 92)
+        self.assertEqual(inst.description, "This is an example code system summary for the ACME codes for body site.")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "summary")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "CA")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.name, "Code system summary example for ACME body sites")
+        self.assertEqual(inst.publisher, "HL7 International")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/CodeSystem/summary")
+        self.assertEqual(inst.useContext[0].code.code, "species")
+        self.assertEqual(inst.useContext[0].code.system, "http://example.org/CodeSystem/contexttype")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "337915000")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].display, "Homo sapiens (organism)")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+    
+    def testCodeSystem2(self):
+        inst = self.instantiate_from("codesystem-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CodeSystem instance")
+        self.implCodeSystem2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CodeSystem", js["resourceType"])
+        inst2 = codesystem.CodeSystem(js)
+        self.implCodeSystem2(inst2)
+    
+    def implCodeSystem2(self, inst):
+        self.assertTrue(inst.caseSensitive)
+        self.assertEqual(inst.concept[0].code, "chol-mmol")
+        self.assertEqual(inst.concept[0].definition, "Serum Cholesterol, in mmol/L")
+        self.assertEqual(inst.concept[0].designation[0].use.code, "internal-label")
+        self.assertEqual(inst.concept[0].designation[0].use.system, "http://acme.com/config/fhir/codesystems/internal")
+        self.assertEqual(inst.concept[0].designation[0].value, "From ACME POC Testing")
+        self.assertEqual(inst.concept[0].display, "SChol (mmol/L)")
+        self.assertEqual(inst.concept[1].code, "chol-mass")
+        self.assertEqual(inst.concept[1].definition, "Serum Cholesterol, in mg/L")
+        self.assertEqual(inst.concept[1].designation[0].use.code, "internal-label")
+        self.assertEqual(inst.concept[1].designation[0].use.system, "http://acme.com/config/fhir/codesystems/internal")
+        self.assertEqual(inst.concept[1].designation[0].value, "From Paragon Labs")
+        self.assertEqual(inst.concept[1].display, "SChol (mg/L)")
+        self.assertEqual(inst.concept[2].code, "chol")
+        self.assertEqual(inst.concept[2].definition, "Serum Cholesterol")
+        self.assertEqual(inst.concept[2].designation[0].use.code, "internal-label")
+        self.assertEqual(inst.concept[2].designation[0].use.system, "http://acme.com/config/fhir/codesystems/internal")
+        self.assertEqual(inst.concept[2].designation[0].value, "Obdurate Labs uses this with both kinds of units...")
+        self.assertEqual(inst.concept[2].display, "SChol")
+        self.assertEqual(inst.contact[0].name, "FHIR project team")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.content, "complete")
+        self.assertEqual(inst.date.date, FHIRDate("2016-01-28").date)
+        self.assertEqual(inst.date.as_json(), "2016-01-28")
+        self.assertEqual(inst.description, "This is an example code system that includes all the ACME codes for serum/plasma cholesterol from v2.36.")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier.system, "http://acme.com/identifiers/codesystems")
+        self.assertEqual(inst.identifier.value, "internal-cholesterol-inl")
+        self.assertEqual(inst.meta.profile[0], "http://hl7.org/fhir/StructureDefinition/shareablecodesystem")
+        self.assertEqual(inst.name, "ACME Codes for Cholesterol in Serum/Plasma")
+        self.assertEqual(inst.publisher, "HL7 International")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/CodeSystem/example")
+        self.assertEqual(inst.version, "20160128")
+    
+    def testCodeSystem3(self):
+        inst = self.instantiate_from("codesystem-list-example-codes.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CodeSystem instance")
+        self.implCodeSystem3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CodeSystem", js["resourceType"])
+        inst2 = codesystem.CodeSystem(js)
+        self.implCodeSystem3(inst2)
+    
+    def implCodeSystem3(self, inst):
+        self.assertTrue(inst.caseSensitive)
+        self.assertEqual(inst.concept[0].code, "alerts")
+        self.assertEqual(inst.concept[0].definition, "A list of alerts for the patient.")
+        self.assertEqual(inst.concept[0].display, "Alerts")
+        self.assertEqual(inst.concept[1].code, "adverserxns")
+        self.assertEqual(inst.concept[1].definition, "A list of part adverse reactions.")
+        self.assertEqual(inst.concept[1].display, "Adverse Reactions")
+        self.assertEqual(inst.concept[2].code, "allergies")
+        self.assertEqual(inst.concept[2].definition, "A list of Allergies for the patient.")
+        self.assertEqual(inst.concept[2].display, "Allergies")
+        self.assertEqual(inst.concept[3].code, "medications")
+        self.assertEqual(inst.concept[3].definition, "A list of medication statements for the patient.")
+        self.assertEqual(inst.concept[3].display, "Medication List")
+        self.assertEqual(inst.concept[4].code, "problems")
+        self.assertEqual(inst.concept[4].definition, "A list of problems that the patient is known of have (or have had in the past).")
+        self.assertEqual(inst.concept[4].display, "Problem List")
+        self.assertEqual(inst.concept[5].code, "worklist")
+        self.assertEqual(inst.concept[5].definition, "A list of items that constitute a set of work to be performed (typically this code would be specialized for more specific uses, such as a ward round list).")
+        self.assertEqual(inst.concept[5].display, "Worklist")
+        self.assertEqual(inst.concept[6].code, "waiting")
+        self.assertEqual(inst.concept[6].definition, "A list of items waiting for an event (perhaps a surgical patient waiting list).")
+        self.assertEqual(inst.concept[6].display, "Waiting List")
+        self.assertEqual(inst.concept[7].code, "protocols")
+        self.assertEqual(inst.concept[7].definition, "A set of protocols to be followed.")
+        self.assertEqual(inst.concept[7].display, "Protocols")
+        self.assertEqual(inst.concept[8].code, "plans")
+        self.assertEqual(inst.concept[8].definition, "A set of care plans that apply in a particular context of care.")
+        self.assertEqual(inst.concept[8].display, "Care Plans")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.content, "complete")
+        self.assertEqual(inst.description, "Example use codes for the List resource - typical kinds of use.")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.extension[0].url, "http://hl7.org/fhir/StructureDefinition/structuredefinition-ballot-status")
+        self.assertEqual(inst.extension[0].valueString, "Informative")
+        self.assertEqual(inst.extension[1].url, "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm")
+        self.assertEqual(inst.extension[1].valueInteger, 1)
+        self.assertEqual(inst.extension[2].url, "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg")
+        self.assertEqual(inst.extension[2].valueCode, "fhir")
+        self.assertEqual(inst.id, "list-example-codes")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:oid:2.16.840.1.113883.4.642.1.308")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2017-03-21T21:41:32.180+00:00").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2017-03-21T21:41:32.180+00:00")
+        self.assertEqual(inst.meta.profile[0], "http://hl7.org/fhir/StructureDefinition/shareablecodesystem")
+        self.assertEqual(inst.name, "Example Use Codes for List")
+        self.assertEqual(inst.publisher, "FHIR Project")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/list-example-use-codes")
+        self.assertEqual(inst.valueSet, "http://hl7.org/fhir/ValueSet/list-example-codes")
+        self.assertEqual(inst.version, "3.0.0")
+
diff --git a/fhirclient/models/coding.py b/fhirclient/models/coding.py
new file mode 100644
index 0000000..099f6ba
--- /dev/null
+++ b/fhirclient/models/coding.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Coding) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Coding(element.Element):
+    """ A reference to a code defined by a terminology system.
+    """
+    
+    resource_type = "Coding"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Symbol in syntax defined by the system.
+        Type `str`. """
+        
+        self.display = None
+        """ Representation defined by the system.
+        Type `str`. """
+        
+        self.system = None
+        """ Identity of the terminology system.
+        Type `str`. """
+        
+        self.userSelected = None
+        """ If this coding was chosen directly by the user.
+        Type `bool`. """
+        
+        self.version = None
+        """ Version of the system - if relevant.
+        Type `str`. """
+        
+        super(Coding, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Coding, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, False),
+            ("display", "display", str, False, None, False),
+            ("system", "system", str, False, None, False),
+            ("userSelected", "userSelected", bool, False, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
diff --git a/fhirclient/models/communication.py b/fhirclient/models/communication.py
new file mode 100644
index 0000000..024d6ff
--- /dev/null
+++ b/fhirclient/models/communication.py
@@ -0,0 +1,204 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Communication) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Communication(domainresource.DomainResource):
+    """ A record of information transmitted from a sender to a receiver.
+    
+    An occurrence of information being transmitted; e.g. an alert that was sent
+    to a responsible provider, a public health agency was notified about a
+    reportable condition.
+    """
+    
+    resource_type = "Communication"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.basedOn = None
+        """ Request fulfilled by this communication.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Message category.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or episode leading to message.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Instantiates protocol or definition.
+        List of `FHIRReference` items referencing `PlanDefinition, ActivityDefinition` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Unique identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.medium = None
+        """ A channel of communication.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.notDone = None
+        """ Communication did not occur.
+        Type `bool`. """
+        
+        self.notDoneReason = None
+        """ Why communication did not occur.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Comments made about the communication.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Part of this action.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.payload = None
+        """ Message payload.
+        List of `CommunicationPayload` items (represented as `dict` in JSON). """
+        
+        self.reasonCode = None
+        """ Indication for message.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Why was communication done?.
+        List of `FHIRReference` items referencing `Condition, Observation` (represented as `dict` in JSON). """
+        
+        self.received = None
+        """ When received.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.recipient = None
+        """ Message recipient.
+        List of `FHIRReference` items referencing `Device, Organization, Patient, Practitioner, RelatedPerson, Group` (represented as `dict` in JSON). """
+        
+        self.sender = None
+        """ Message sender.
+        Type `FHIRReference` referencing `Device, Organization, Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.sent = None
+        """ When sent.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.status = None
+        """ preparation | in-progress | suspended | aborted | completed |
+        entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ Focus of message.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.topic = None
+        """ Focal resources.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(Communication, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Communication, self).elementProperties()
+        js.extend([
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("medium", "medium", codeableconcept.CodeableConcept, True, None, False),
+            ("notDone", "notDone", bool, False, None, False),
+            ("notDoneReason", "notDoneReason", codeableconcept.CodeableConcept, False, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, True, None, False),
+            ("payload", "payload", CommunicationPayload, True, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("received", "received", fhirdate.FHIRDate, False, None, False),
+            ("recipient", "recipient", fhirreference.FHIRReference, True, None, False),
+            ("sender", "sender", fhirreference.FHIRReference, False, None, False),
+            ("sent", "sent", fhirdate.FHIRDate, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("topic", "topic", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class CommunicationPayload(backboneelement.BackboneElement):
+    """ Message payload.
+    
+    Text, attachment(s), or resource(s) that was communicated to the recipient.
+    """
+    
+    resource_type = "CommunicationPayload"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contentAttachment = None
+        """ Message part content.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.contentReference = None
+        """ Message part content.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.contentString = None
+        """ Message part content.
+        Type `str`. """
+        
+        super(CommunicationPayload, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CommunicationPayload, self).elementProperties()
+        js.extend([
+            ("contentAttachment", "contentAttachment", attachment.Attachment, False, "content", True),
+            ("contentReference", "contentReference", fhirreference.FHIRReference, False, "content", True),
+            ("contentString", "contentString", str, False, "content", True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/communication_tests.py b/fhirclient/models/communication_tests.py
new file mode 100644
index 0000000..e9eb5aa
--- /dev/null
+++ b/fhirclient/models/communication_tests.py
@@ -0,0 +1,123 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import communication
+from .fhirdate import FHIRDate
+
+
+class CommunicationTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Communication", js["resourceType"])
+        return communication.Communication(js)
+    
+    def testCommunication1(self):
+        inst = self.instantiate_from("communication-example-fm-attachment.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Communication instance")
+        self.implCommunication1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Communication", js["resourceType"])
+        inst2 = communication.Communication(js)
+        self.implCommunication1(inst2)
+    
+    def implCommunication1(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "SolicitedAttachment")
+        self.assertEqual(inst.category[0].coding[0].system, "http://acme.org/messagetypes")
+        self.assertEqual(inst.id, "fm-attachment")
+        self.assertEqual(inst.identifier[0].system, "http://www.providerco.com/communication")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.payload[0].contentAttachment.contentType, "application/pdf")
+        self.assertEqual(inst.payload[0].contentAttachment.creation.date, FHIRDate("2010-02-01T11:50:23-05:00").date)
+        self.assertEqual(inst.payload[0].contentAttachment.creation.as_json(), "2010-02-01T11:50:23-05:00")
+        self.assertEqual(inst.payload[0].contentAttachment.data, "SGVsbG8=")
+        self.assertEqual(inst.payload[0].contentAttachment.title, "accident notes 20100201.pdf")
+        self.assertEqual(inst.payload[1].contentAttachment.contentType, "application/pdf")
+        self.assertEqual(inst.payload[1].contentAttachment.creation.date, FHIRDate("2010-02-01T10:57:34+01:00").date)
+        self.assertEqual(inst.payload[1].contentAttachment.creation.as_json(), "2010-02-01T10:57:34+01:00")
+        self.assertEqual(inst.payload[1].contentAttachment.hash, "SGVsbG8gdGhlcmU=")
+        self.assertEqual(inst.payload[1].contentAttachment.size, 104274)
+        self.assertEqual(inst.payload[1].contentAttachment.url, "http://happyvalley.com/docs/AB12345")
+        self.assertEqual(inst.sent.date, FHIRDate("2016-06-12T18:01:10-08:00").date)
+        self.assertEqual(inst.sent.as_json(), "2016-06-12T18:01:10-08:00")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Attachment which is unsolicited</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCommunication2(self):
+        inst = self.instantiate_from("communication-example-fm-solicited-attachment.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Communication instance")
+        self.implCommunication2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Communication", js["resourceType"])
+        inst2 = communication.Communication(js)
+        self.implCommunication2(inst2)
+    
+    def implCommunication2(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "SolicitedAttachment")
+        self.assertEqual(inst.category[0].coding[0].system, "http://acme.org/messagetypes")
+        self.assertEqual(inst.contained[0].id, "provider")
+        self.assertEqual(inst.contained[1].id, "payor")
+        self.assertEqual(inst.contained[2].id, "request")
+        self.assertEqual(inst.id, "fm-solicited")
+        self.assertEqual(inst.identifier[0].system, "http://www.providerco.com/communication")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.payload[0].contentAttachment.contentType, "application/pdf")
+        self.assertEqual(inst.payload[0].contentAttachment.creation.date, FHIRDate("2010-02-01T11:50:23-05:00").date)
+        self.assertEqual(inst.payload[0].contentAttachment.creation.as_json(), "2010-02-01T11:50:23-05:00")
+        self.assertEqual(inst.payload[0].contentAttachment.data, "SGVsbG8=")
+        self.assertEqual(inst.payload[0].contentAttachment.title, "accident notes 20100201.pdf")
+        self.assertEqual(inst.payload[1].contentAttachment.contentType, "application/pdf")
+        self.assertEqual(inst.payload[1].contentAttachment.creation.date, FHIRDate("2010-02-01T10:57:34+01:00").date)
+        self.assertEqual(inst.payload[1].contentAttachment.creation.as_json(), "2010-02-01T10:57:34+01:00")
+        self.assertEqual(inst.payload[1].contentAttachment.hash, "SGVsbG8gdGhlcmU=")
+        self.assertEqual(inst.payload[1].contentAttachment.size, 104274)
+        self.assertEqual(inst.payload[1].contentAttachment.url, "http://happyvalley.com/docs/AB12345")
+        self.assertEqual(inst.sent.date, FHIRDate("2016-06-12T18:01:10-08:00").date)
+        self.assertEqual(inst.sent.as_json(), "2016-06-12T18:01:10-08:00")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Attachment in response to a Request</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCommunication3(self):
+        inst = self.instantiate_from("communication-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Communication instance")
+        self.implCommunication3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Communication", js["resourceType"])
+        inst2 = communication.Communication(js)
+        self.implCommunication3(inst2)
+    
+    def implCommunication3(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "Alert")
+        self.assertEqual(inst.category[0].coding[0].system, "http://acme.org/messagetypes")
+        self.assertEqual(inst.category[0].text, "Alert")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:1.3.4.5.6.7")
+        self.assertEqual(inst.identifier[0].type.text, "Paging System")
+        self.assertEqual(inst.identifier[0].value, "2345678901")
+        self.assertEqual(inst.medium[0].coding[0].code, "WRITTEN")
+        self.assertEqual(inst.medium[0].coding[0].display, "written")
+        self.assertEqual(inst.medium[0].coding[0].system, "http://hl7.org/fhir/v3/ParticipationMode")
+        self.assertEqual(inst.medium[0].text, "written")
+        self.assertEqual(inst.payload[0].contentString, "Patient 1 has a very high serum potassium value (7.2 mmol/L on 2014-Dec-12 at 5:55 pm)")
+        self.assertEqual(inst.received.date, FHIRDate("2014-12-12T18:01:11-08:00").date)
+        self.assertEqual(inst.received.as_json(), "2014-12-12T18:01:11-08:00")
+        self.assertEqual(inst.sent.date, FHIRDate("2014-12-12T18:01:10-08:00").date)
+        self.assertEqual(inst.sent.as_json(), "2014-12-12T18:01:10-08:00")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Patient has very high serum potassium</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/communicationrequest.py b/fhirclient/models/communicationrequest.py
new file mode 100644
index 0000000..dd30758
--- /dev/null
+++ b/fhirclient/models/communicationrequest.py
@@ -0,0 +1,249 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/CommunicationRequest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class CommunicationRequest(domainresource.DomainResource):
+    """ A request for information to be sent to a receiver.
+    
+    A request to convey information; e.g. the CDS system proposes that an alert
+    be sent to a responsible provider, the CDS system proposes that the public
+    health agency be notified about a reportable condition.
+    """
+    
+    resource_type = "CommunicationRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authoredOn = None
+        """ When request transitioned to being actionable.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.basedOn = None
+        """ Fulfills plan or proposal.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Message category.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or episode leading to message.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.groupIdentifier = None
+        """ Composite request this is part of.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Unique identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.medium = None
+        """ A channel of communication.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Comments made about communication request.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.occurrenceDateTime = None
+        """ When scheduled.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.occurrencePeriod = None
+        """ When scheduled.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.payload = None
+        """ Message payload.
+        List of `CommunicationRequestPayload` items (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ Message urgency.
+        Type `str`. """
+        
+        self.reasonCode = None
+        """ Why is communication needed?.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Why is communication needed?.
+        List of `FHIRReference` items referencing `Condition, Observation` (represented as `dict` in JSON). """
+        
+        self.recipient = None
+        """ Message recipient.
+        List of `FHIRReference` items referencing `Device, Organization, Patient, Practitioner, RelatedPerson, Group, CareTeam` (represented as `dict` in JSON). """
+        
+        self.replaces = None
+        """ Request(s) replaced by this request.
+        List of `FHIRReference` items referencing `CommunicationRequest` (represented as `dict` in JSON). """
+        
+        self.requester = None
+        """ Who/what is requesting service.
+        Type `CommunicationRequestRequester` (represented as `dict` in JSON). """
+        
+        self.sender = None
+        """ Message sender.
+        Type `FHIRReference` referencing `Device, Organization, Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | suspended | cancelled | completed | entered-in-
+        error | unknown.
+        Type `str`. """
+        
+        self.subject = None
+        """ Focus of message.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.topic = None
+        """ Focal resources.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(CommunicationRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CommunicationRequest, self).elementProperties()
+        js.extend([
+            ("authoredOn", "authoredOn", fhirdate.FHIRDate, False, None, False),
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("groupIdentifier", "groupIdentifier", identifier.Identifier, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("medium", "medium", codeableconcept.CodeableConcept, True, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("occurrenceDateTime", "occurrenceDateTime", fhirdate.FHIRDate, False, "occurrence", False),
+            ("occurrencePeriod", "occurrencePeriod", period.Period, False, "occurrence", False),
+            ("payload", "payload", CommunicationRequestPayload, True, None, False),
+            ("priority", "priority", str, False, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("recipient", "recipient", fhirreference.FHIRReference, True, None, False),
+            ("replaces", "replaces", fhirreference.FHIRReference, True, None, False),
+            ("requester", "requester", CommunicationRequestRequester, False, None, False),
+            ("sender", "sender", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("topic", "topic", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class CommunicationRequestPayload(backboneelement.BackboneElement):
+    """ Message payload.
+    
+    Text, attachment(s), or resource(s) to be communicated to the recipient.
+    """
+    
+    resource_type = "CommunicationRequestPayload"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contentAttachment = None
+        """ Message part content.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.contentReference = None
+        """ Message part content.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.contentString = None
+        """ Message part content.
+        Type `str`. """
+        
+        super(CommunicationRequestPayload, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CommunicationRequestPayload, self).elementProperties()
+        js.extend([
+            ("contentAttachment", "contentAttachment", attachment.Attachment, False, "content", True),
+            ("contentReference", "contentReference", fhirreference.FHIRReference, False, "content", True),
+            ("contentString", "contentString", str, False, "content", True),
+        ])
+        return js
+
+
+class CommunicationRequestRequester(backboneelement.BackboneElement):
+    """ Who/what is requesting service.
+    
+    The individual who initiated the request and has responsibility for its
+    activation.
+    """
+    
+    resource_type = "CommunicationRequestRequester"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.agent = None
+        """ Individual making the request.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, RelatedPerson, Device` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization agent is acting for.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(CommunicationRequestRequester, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CommunicationRequestRequester, self).elementProperties()
+        js.extend([
+            ("agent", "agent", fhirreference.FHIRReference, False, None, True),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/communicationrequest_tests.py b/fhirclient/models/communicationrequest_tests.py
new file mode 100644
index 0000000..2163323
--- /dev/null
+++ b/fhirclient/models/communicationrequest_tests.py
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import communicationrequest
+from .fhirdate import FHIRDate
+
+
+class CommunicationRequestTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("CommunicationRequest", js["resourceType"])
+        return communicationrequest.CommunicationRequest(js)
+    
+    def testCommunicationRequest1(self):
+        inst = self.instantiate_from("communicationrequest-example-fm-solicit-attachment.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CommunicationRequest instance")
+        self.implCommunicationRequest1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CommunicationRequest", js["resourceType"])
+        inst2 = communicationrequest.CommunicationRequest(js)
+        self.implCommunicationRequest1(inst2)
+    
+    def implCommunicationRequest1(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2016-06-10T11:01:10-08:00").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2016-06-10T11:01:10-08:00")
+        self.assertEqual(inst.category[0].coding[0].code, "SolicitedAttachmentRequest")
+        self.assertEqual(inst.category[0].coding[0].system, "http://acme.org/messagetypes")
+        self.assertEqual(inst.contained[0].id, "provider")
+        self.assertEqual(inst.contained[1].id, "payor")
+        self.assertEqual(inst.contained[2].id, "requester")
+        self.assertEqual(inst.groupIdentifier.value, "12345")
+        self.assertEqual(inst.id, "fm-solicit")
+        self.assertEqual(inst.identifier[0].system, "http://www.jurisdiction.com/insurer/123456")
+        self.assertEqual(inst.identifier[0].value, "ABC123")
+        self.assertEqual(inst.medium[0].coding[0].code, "WRITTEN")
+        self.assertEqual(inst.medium[0].coding[0].display, "written")
+        self.assertEqual(inst.medium[0].coding[0].system, "http://hl7.org/fhir/v3/ParticipationMode")
+        self.assertEqual(inst.medium[0].text, "written")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2016-06-10T11:01:10-08:00").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2016-06-10T11:01:10-08:00")
+        self.assertEqual(inst.payload[0].contentString, "Please provide the accident report and any associated pictures to support your Claim# DEF5647.")
+        self.assertEqual(inst.priority, "routine")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Request for Accident Report</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCommunicationRequest2(self):
+        inst = self.instantiate_from("communicationrequest-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CommunicationRequest instance")
+        self.implCommunicationRequest2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CommunicationRequest", js["resourceType"])
+        inst2 = communicationrequest.CommunicationRequest(js)
+        self.implCommunicationRequest2(inst2)
+    
+    def implCommunicationRequest2(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">To be filled out at a later time</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/compartmentdefinition.py b/fhirclient/models/compartmentdefinition.py
new file mode 100644
index 0000000..810e642
--- /dev/null
+++ b/fhirclient/models/compartmentdefinition.py
@@ -0,0 +1,170 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/CompartmentDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class CompartmentDefinition(domainresource.DomainResource):
+    """ Compartment Definition for a resource.
+    
+    A compartment definition that defines how resources are accessed on a
+    server.
+    """
+    
+    resource_type = "CompartmentDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Patient | Encounter | RelatedPerson | Practitioner | Device.
+        Type `str`. """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the compartment definition.
+        Type `str`. """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for compartment definition (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this compartment definition (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this compartment definition is defined.
+        Type `str`. """
+        
+        self.resource = None
+        """ How a resource is related to the compartment.
+        List of `CompartmentDefinitionResource` items (represented as `dict` in JSON). """
+        
+        self.search = None
+        """ Whether the search syntax is supported.
+        Type `bool`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this compartment definition (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this compartment definition (globally
+        unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        super(CompartmentDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CompartmentDefinition, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("name", "name", str, False, None, True),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("resource", "resource", CompartmentDefinitionResource, True, None, False),
+            ("search", "search", bool, False, None, True),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, True),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class CompartmentDefinitionResource(backboneelement.BackboneElement):
+    """ How a resource is related to the compartment.
+    
+    Information about how a resource is related to the compartment.
+    """
+    
+    resource_type = "CompartmentDefinitionResource"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Name of resource type.
+        Type `str`. """
+        
+        self.documentation = None
+        """ Additional documentation about the resource and compartment.
+        Type `str`. """
+        
+        self.param = None
+        """ Search Parameter Name, or chained parameters.
+        List of `str` items. """
+        
+        super(CompartmentDefinitionResource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CompartmentDefinitionResource, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("documentation", "documentation", str, False, None, False),
+            ("param", "param", str, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/compartmentdefinition_tests.py b/fhirclient/models/compartmentdefinition_tests.py
new file mode 100644
index 0000000..6ca75ce
--- /dev/null
+++ b/fhirclient/models/compartmentdefinition_tests.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import compartmentdefinition
+from .fhirdate import FHIRDate
+
+
+class CompartmentDefinitionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("CompartmentDefinition", js["resourceType"])
+        return compartmentdefinition.CompartmentDefinition(js)
+    
+    def testCompartmentDefinition1(self):
+        inst = self.instantiate_from("compartmentdefinition-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a CompartmentDefinition instance")
+        self.implCompartmentDefinition1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("CompartmentDefinition", js["resourceType"])
+        inst2 = compartmentdefinition.CompartmentDefinition(js)
+        self.implCompartmentDefinition1(inst2)
+    
+    def implCompartmentDefinition1(self, inst):
+        self.assertEqual(inst.code, "Device")
+        self.assertEqual(inst.contact[0].name, "[string]")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.date.date, FHIRDate("2017-02-24").date)
+        self.assertEqual(inst.date.as_json(), "2017-02-24")
+        self.assertEqual(inst.description, "The set of resources associated with a particular Device (example with Communication and CommunicationRequest resourses only).")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United States of America (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.name, "EXAMPLE")
+        self.assertEqual(inst.publisher, "Health Level Seven International (FHIR Infrastructure)")
+        self.assertEqual(inst.purpose, "Provides an example of a FHIR compartment definition based on the Device resource type.")
+        self.assertEqual(inst.resource[0].code, "Communication")
+        self.assertEqual(inst.resource[0].documentation, "The device used as the message sender and recipient")
+        self.assertEqual(inst.resource[0].param[0], "sender")
+        self.assertEqual(inst.resource[0].param[1], "recipient")
+        self.assertEqual(inst.resource[1].code, "CommunicationRequest")
+        self.assertEqual(inst.resource[1].documentation, "The device used as the message sender and recipient")
+        self.assertEqual(inst.resource[1].param[0], "sender")
+        self.assertEqual(inst.resource[1].param[1], "recipient")
+        self.assertTrue(inst.search)
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Base FHIR compartment definition for Device(example)")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/CompartmentDefinition/example")
+        self.assertEqual(inst.useContext[0].code.code, "focus")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "Device")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "http://hl7.org/fhir/resource-types")
+
diff --git a/fhirclient/models/composition.py b/fhirclient/models/composition.py
new file mode 100644
index 0000000..c109b14
--- /dev/null
+++ b/fhirclient/models/composition.py
@@ -0,0 +1,330 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Composition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Composition(domainresource.DomainResource):
+    """ A set of resources composed into a single coherent clinical statement with
+    clinical attestation.
+    
+    A set of healthcare-related information that is assembled together into a
+    single logical document that provides a single coherent statement of
+    meaning, establishes its own context and that has clinical attestation with
+    regard to who is making the statement. While a Composition defines the
+    structure, it does not actually contain the content: rather the full
+    content of a document is contained in a Bundle, of which the Composition is
+    the first resource contained.
+    """
+    
+    resource_type = "Composition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.attester = None
+        """ Attests to accuracy of composition.
+        List of `CompositionAttester` items (represented as `dict` in JSON). """
+        
+        self.author = None
+        """ Who and/or what authored the composition.
+        List of `FHIRReference` items referencing `Practitioner, Device, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.class_fhir = None
+        """ Categorization of Composition.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.confidentiality = None
+        """ As defined by affinity domain.
+        Type `str`. """
+        
+        self.custodian = None
+        """ Organization which maintains the composition.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Composition editing time.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.encounter = None
+        """ Context of the Composition.
+        Type `FHIRReference` referencing `Encounter` (represented as `dict` in JSON). """
+        
+        self.event = None
+        """ The clinical service(s) being documented.
+        List of `CompositionEvent` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Logical identifier of composition (version-independent).
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.relatesTo = None
+        """ Relationships to other compositions/documents.
+        List of `CompositionRelatesTo` items (represented as `dict` in JSON). """
+        
+        self.section = None
+        """ Composition is broken into sections.
+        List of `CompositionSection` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ preliminary | final | amended | entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who and/or what the composition is about.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.title = None
+        """ Human Readable name/title.
+        Type `str`. """
+        
+        self.type = None
+        """ Kind of composition (LOINC if possible).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(Composition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Composition, self).elementProperties()
+        js.extend([
+            ("attester", "attester", CompositionAttester, True, None, False),
+            ("author", "author", fhirreference.FHIRReference, True, None, True),
+            ("class_fhir", "class", codeableconcept.CodeableConcept, False, None, False),
+            ("confidentiality", "confidentiality", str, False, None, False),
+            ("custodian", "custodian", fhirreference.FHIRReference, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, True),
+            ("encounter", "encounter", fhirreference.FHIRReference, False, None, False),
+            ("event", "event", CompositionEvent, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("relatesTo", "relatesTo", CompositionRelatesTo, True, None, False),
+            ("section", "section", CompositionSection, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("title", "title", str, False, None, True),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class CompositionAttester(backboneelement.BackboneElement):
+    """ Attests to accuracy of composition.
+    
+    A participant who has attested to the accuracy of the composition/document.
+    """
+    
+    resource_type = "CompositionAttester"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.mode = None
+        """ personal | professional | legal | official.
+        List of `str` items. """
+        
+        self.party = None
+        """ Who attested the composition.
+        Type `FHIRReference` referencing `Patient, Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.time = None
+        """ When the composition was attested.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(CompositionAttester, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CompositionAttester, self).elementProperties()
+        js.extend([
+            ("mode", "mode", str, True, None, True),
+            ("party", "party", fhirreference.FHIRReference, False, None, False),
+            ("time", "time", fhirdate.FHIRDate, False, None, False),
+        ])
+        return js
+
+
+class CompositionEvent(backboneelement.BackboneElement):
+    """ The clinical service(s) being documented.
+    
+    The clinical service, such as a colonoscopy or an appendectomy, being
+    documented.
+    """
+    
+    resource_type = "CompositionEvent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Code(s) that apply to the event being documented.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.detail = None
+        """ The event(s) being documented.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ The period covered by the documentation.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(CompositionEvent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CompositionEvent, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, True, None, False),
+            ("detail", "detail", fhirreference.FHIRReference, True, None, False),
+            ("period", "period", period.Period, False, None, False),
+        ])
+        return js
+
+
+class CompositionRelatesTo(backboneelement.BackboneElement):
+    """ Relationships to other compositions/documents.
+    
+    Relationships that this composition has with other compositions or
+    documents that already exist.
+    """
+    
+    resource_type = "CompositionRelatesTo"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ replaces | transforms | signs | appends.
+        Type `str`. """
+        
+        self.targetIdentifier = None
+        """ Target of the relationship.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.targetReference = None
+        """ Target of the relationship.
+        Type `FHIRReference` referencing `Composition` (represented as `dict` in JSON). """
+        
+        super(CompositionRelatesTo, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CompositionRelatesTo, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("targetIdentifier", "targetIdentifier", identifier.Identifier, False, "target", True),
+            ("targetReference", "targetReference", fhirreference.FHIRReference, False, "target", True),
+        ])
+        return js
+
+
+class CompositionSection(backboneelement.BackboneElement):
+    """ Composition is broken into sections.
+    
+    The root of the sections that make up the composition.
+    """
+    
+    resource_type = "CompositionSection"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Classification of section (recommended).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.emptyReason = None
+        """ Why the section is empty.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.entry = None
+        """ A reference to data that supports this section.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.mode = None
+        """ working | snapshot | changes.
+        Type `str`. """
+        
+        self.orderedBy = None
+        """ Order of section entries.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.section = None
+        """ Nested Section.
+        List of `CompositionSection` items (represented as `dict` in JSON). """
+        
+        self.text = None
+        """ Text summary of the section, for human interpretation.
+        Type `Narrative` (represented as `dict` in JSON). """
+        
+        self.title = None
+        """ Label for section (e.g. for ToC).
+        Type `str`. """
+        
+        super(CompositionSection, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CompositionSection, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("emptyReason", "emptyReason", codeableconcept.CodeableConcept, False, None, False),
+            ("entry", "entry", fhirreference.FHIRReference, True, None, False),
+            ("mode", "mode", str, False, None, False),
+            ("orderedBy", "orderedBy", codeableconcept.CodeableConcept, False, None, False),
+            ("section", "section", CompositionSection, True, None, False),
+            ("text", "text", narrative.Narrative, False, None, False),
+            ("title", "title", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import narrative
+except ImportError:
+    narrative = sys.modules[__package__ + '.narrative']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/composition_tests.py b/fhirclient/models/composition_tests.py
new file mode 100644
index 0000000..5d4cc7b
--- /dev/null
+++ b/fhirclient/models/composition_tests.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import composition
+from .fhirdate import FHIRDate
+
+
+class CompositionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Composition", js["resourceType"])
+        return composition.Composition(js)
+    
+    def testComposition1(self):
+        inst = self.instantiate_from("composition-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Composition instance")
+        self.implComposition1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Composition", js["resourceType"])
+        inst2 = composition.Composition(js)
+        self.implComposition1(inst2)
+    
+    def implComposition1(self, inst):
+        self.assertEqual(inst.attester[0].mode[0], "legal")
+        self.assertEqual(inst.attester[0].time.date, FHIRDate("2012-01-04T09:10:14Z").date)
+        self.assertEqual(inst.attester[0].time.as_json(), "2012-01-04T09:10:14Z")
+        self.assertEqual(inst.class_fhir.coding[0].code, "LP173421-1")
+        self.assertEqual(inst.class_fhir.coding[0].display, "Report")
+        self.assertEqual(inst.class_fhir.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.confidentiality, "N")
+        self.assertEqual(inst.date.date, FHIRDate("2012-01-04T09:10:14Z").date)
+        self.assertEqual(inst.date.as_json(), "2012-01-04T09:10:14Z")
+        self.assertEqual(inst.event[0].code[0].coding[0].code, "HEALTHREC")
+        self.assertEqual(inst.event[0].code[0].coding[0].display, "health record")
+        self.assertEqual(inst.event[0].code[0].coding[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.event[0].period.end.date, FHIRDate("2012-11-12").date)
+        self.assertEqual(inst.event[0].period.end.as_json(), "2012-11-12")
+        self.assertEqual(inst.event[0].period.start.date, FHIRDate("2010-07-18").date)
+        self.assertEqual(inst.event[0].period.start.as_json(), "2010-07-18")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier.system, "http://healthintersections.com.au/test")
+        self.assertEqual(inst.identifier.value, "1")
+        self.assertEqual(inst.relatesTo[0].code, "replaces")
+        self.assertEqual(inst.relatesTo[1].code, "appends")
+        self.assertEqual(inst.relatesTo[1].targetIdentifier.system, "http://example.org/fhir/NamingSystem/document-ids")
+        self.assertEqual(inst.relatesTo[1].targetIdentifier.value, "ABC123")
+        self.assertEqual(inst.section[0].code.coding[0].code, "11348-0")
+        self.assertEqual(inst.section[0].code.coding[0].display, "History of past illness Narrative")
+        self.assertEqual(inst.section[0].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.section[0].mode, "snapshot")
+        self.assertEqual(inst.section[0].orderedBy.coding[0].code, "event-date")
+        self.assertEqual(inst.section[0].orderedBy.coding[0].display, "Sorted by Event Date")
+        self.assertEqual(inst.section[0].orderedBy.coding[0].system, "http://hl7.org/fhir/list-order")
+        self.assertEqual(inst.section[0].text.status, "generated")
+        self.assertEqual(inst.section[0].title, "History of present illness")
+        self.assertEqual(inst.section[1].code.coding[0].code, "10157-6")
+        self.assertEqual(inst.section[1].code.coding[0].display, "History of family member diseases Narrative")
+        self.assertEqual(inst.section[1].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.section[1].emptyReason.coding[0].code, "withheld")
+        self.assertEqual(inst.section[1].emptyReason.coding[0].display, "Information Withheld")
+        self.assertEqual(inst.section[1].emptyReason.coding[0].system, "http://hl7.org/fhir/list-empty-reason")
+        self.assertEqual(inst.section[1].mode, "snapshot")
+        self.assertEqual(inst.section[1].text.status, "generated")
+        self.assertEqual(inst.section[1].title, "History of family member diseases")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Consultation Note")
+        self.assertEqual(inst.type.coding[0].code, "11488-4")
+        self.assertEqual(inst.type.coding[0].display, "Consult note")
+        self.assertEqual(inst.type.coding[0].system, "http://loinc.org")
+
diff --git a/fhirclient/models/conceptmap.py b/fhirclient/models/conceptmap.py
new file mode 100644
index 0000000..2e91fae
--- /dev/null
+++ b/fhirclient/models/conceptmap.py
@@ -0,0 +1,407 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ConceptMap) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ConceptMap(domainresource.DomainResource):
+    """ A map from one set of concepts to one or more other concepts.
+    
+    A statement of relationships from one set of concepts to one or more other
+    concepts - either code systems or data elements, or classes in class
+    models.
+    """
+    
+    resource_type = "ConceptMap"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the concept map.
+        Type `str`. """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.group = None
+        """ Same source and target systems.
+        List of `ConceptMapGroup` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Additional identifier for the concept map.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for concept map (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this concept map (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this concept map is defined.
+        Type `str`. """
+        
+        self.sourceReference = None
+        """ Identifies the source of the concepts which are being mapped.
+        Type `FHIRReference` referencing `ValueSet` (represented as `dict` in JSON). """
+        
+        self.sourceUri = None
+        """ Identifies the source of the concepts which are being mapped.
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.targetReference = None
+        """ Provides context to the mappings.
+        Type `FHIRReference` referencing `ValueSet` (represented as `dict` in JSON). """
+        
+        self.targetUri = None
+        """ Provides context to the mappings.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this concept map (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this concept map (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the concept map.
+        Type `str`. """
+        
+        super(ConceptMap, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConceptMap, self).elementProperties()
+        js.extend([
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("group", "group", ConceptMapGroup, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("sourceReference", "sourceReference", fhirreference.FHIRReference, False, "source", False),
+            ("sourceUri", "sourceUri", str, False, "source", False),
+            ("status", "status", str, False, None, True),
+            ("targetReference", "targetReference", fhirreference.FHIRReference, False, "target", False),
+            ("targetUri", "targetUri", str, False, "target", False),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ConceptMapGroup(backboneelement.BackboneElement):
+    """ Same source and target systems.
+    
+    A group of mappings that all have the same source and target system.
+    """
+    
+    resource_type = "ConceptMapGroup"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.element = None
+        """ Mappings for a concept from the source set.
+        List of `ConceptMapGroupElement` items (represented as `dict` in JSON). """
+        
+        self.source = None
+        """ Code System (if value set crosses code systems).
+        Type `str`. """
+        
+        self.sourceVersion = None
+        """ Specific version of the  code system.
+        Type `str`. """
+        
+        self.target = None
+        """ System of the target (if necessary).
+        Type `str`. """
+        
+        self.targetVersion = None
+        """ Specific version of the  code system.
+        Type `str`. """
+        
+        self.unmapped = None
+        """ When no match in the mappings.
+        Type `ConceptMapGroupUnmapped` (represented as `dict` in JSON). """
+        
+        super(ConceptMapGroup, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConceptMapGroup, self).elementProperties()
+        js.extend([
+            ("element", "element", ConceptMapGroupElement, True, None, True),
+            ("source", "source", str, False, None, False),
+            ("sourceVersion", "sourceVersion", str, False, None, False),
+            ("target", "target", str, False, None, False),
+            ("targetVersion", "targetVersion", str, False, None, False),
+            ("unmapped", "unmapped", ConceptMapGroupUnmapped, False, None, False),
+        ])
+        return js
+
+
+class ConceptMapGroupElement(backboneelement.BackboneElement):
+    """ Mappings for a concept from the source set.
+    
+    Mappings for an individual concept in the source to one or more concepts in
+    the target.
+    """
+    
+    resource_type = "ConceptMapGroupElement"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Identifies element being mapped.
+        Type `str`. """
+        
+        self.display = None
+        """ Display for the code.
+        Type `str`. """
+        
+        self.target = None
+        """ Concept in target system for element.
+        List of `ConceptMapGroupElementTarget` items (represented as `dict` in JSON). """
+        
+        super(ConceptMapGroupElement, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConceptMapGroupElement, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, False),
+            ("display", "display", str, False, None, False),
+            ("target", "target", ConceptMapGroupElementTarget, True, None, False),
+        ])
+        return js
+
+
+class ConceptMapGroupElementTarget(backboneelement.BackboneElement):
+    """ Concept in target system for element.
+    
+    A concept from the target value set that this concept maps to.
+    """
+    
+    resource_type = "ConceptMapGroupElementTarget"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Code that identifies the target element.
+        Type `str`. """
+        
+        self.comment = None
+        """ Description of status/issues in mapping.
+        Type `str`. """
+        
+        self.dependsOn = None
+        """ Other elements required for this mapping (from context).
+        List of `ConceptMapGroupElementTargetDependsOn` items (represented as `dict` in JSON). """
+        
+        self.display = None
+        """ Display for the code.
+        Type `str`. """
+        
+        self.equivalence = None
+        """ relatedto | equivalent | equal | wider | subsumes | narrower |
+        specializes | inexact | unmatched | disjoint.
+        Type `str`. """
+        
+        self.product = None
+        """ Other concepts that this mapping also produces.
+        List of `ConceptMapGroupElementTargetDependsOn` items (represented as `dict` in JSON). """
+        
+        super(ConceptMapGroupElementTarget, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConceptMapGroupElementTarget, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, False),
+            ("comment", "comment", str, False, None, False),
+            ("dependsOn", "dependsOn", ConceptMapGroupElementTargetDependsOn, True, None, False),
+            ("display", "display", str, False, None, False),
+            ("equivalence", "equivalence", str, False, None, False),
+            ("product", "product", ConceptMapGroupElementTargetDependsOn, True, None, False),
+        ])
+        return js
+
+
+class ConceptMapGroupElementTargetDependsOn(backboneelement.BackboneElement):
+    """ Other elements required for this mapping (from context).
+    
+    A set of additional dependencies for this mapping to hold. This mapping is
+    only applicable if the specified element can be resolved, and it has the
+    specified value.
+    """
+    
+    resource_type = "ConceptMapGroupElementTargetDependsOn"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Value of the referenced element.
+        Type `str`. """
+        
+        self.display = None
+        """ Display for the code.
+        Type `str`. """
+        
+        self.property = None
+        """ Reference to property mapping depends on.
+        Type `str`. """
+        
+        self.system = None
+        """ Code System (if necessary).
+        Type `str`. """
+        
+        super(ConceptMapGroupElementTargetDependsOn, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConceptMapGroupElementTargetDependsOn, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("display", "display", str, False, None, False),
+            ("property", "property", str, False, None, True),
+            ("system", "system", str, False, None, False),
+        ])
+        return js
+
+
+class ConceptMapGroupUnmapped(backboneelement.BackboneElement):
+    """ When no match in the mappings.
+    
+    What to do when there is no match in the mappings in the group.
+    """
+    
+    resource_type = "ConceptMapGroupUnmapped"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Fixed code when mode = fixed.
+        Type `str`. """
+        
+        self.display = None
+        """ Display for the code.
+        Type `str`. """
+        
+        self.mode = None
+        """ provided | fixed | other-map.
+        Type `str`. """
+        
+        self.url = None
+        """ Canonical URL for other concept map.
+        Type `str`. """
+        
+        super(ConceptMapGroupUnmapped, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConceptMapGroupUnmapped, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, False),
+            ("display", "display", str, False, None, False),
+            ("mode", "mode", str, False, None, True),
+            ("url", "url", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/conceptmap_tests.py b/fhirclient/models/conceptmap_tests.py
new file mode 100644
index 0000000..028e54b
--- /dev/null
+++ b/fhirclient/models/conceptmap_tests.py
@@ -0,0 +1,189 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import conceptmap
+from .fhirdate import FHIRDate
+
+
+class ConceptMapTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ConceptMap", js["resourceType"])
+        return conceptmap.ConceptMap(js)
+    
+    def testConceptMap1(self):
+        inst = self.instantiate_from("conceptmap-example-2.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ConceptMap instance")
+        self.implConceptMap1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ConceptMap", js["resourceType"])
+        inst2 = conceptmap.ConceptMap(js)
+        self.implConceptMap1(inst2)
+    
+    def implConceptMap1(self, inst):
+        self.assertEqual(inst.contact[0].name, "FHIR project team (example)")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.date.date, FHIRDate("2012-06-13").date)
+        self.assertEqual(inst.date.as_json(), "2012-06-13")
+        self.assertEqual(inst.description, "An example mapping")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.group[0].element[0].code, "code")
+        self.assertEqual(inst.group[0].element[0].display, "Example Code")
+        self.assertEqual(inst.group[0].element[0].target[0].code, "code2")
+        self.assertEqual(inst.group[0].element[0].target[0].dependsOn[0].code, "some-code")
+        self.assertEqual(inst.group[0].element[0].target[0].dependsOn[0].display, "Something Coded")
+        self.assertEqual(inst.group[0].element[0].target[0].dependsOn[0].property, "http://example.org/fhir/DataElement/example")
+        self.assertEqual(inst.group[0].element[0].target[0].dependsOn[0].system, "http://example.org/fhir/example3")
+        self.assertEqual(inst.group[0].element[0].target[0].display, "Some Example Code")
+        self.assertEqual(inst.group[0].element[0].target[0].equivalence, "equivalent")
+        self.assertEqual(inst.group[0].source, "http://example.org/fhir/example1")
+        self.assertEqual(inst.group[0].target, "http://example.org/fhir/example2")
+        self.assertEqual(inst.group[0].unmapped.mode, "other-map")
+        self.assertEqual(inst.group[0].unmapped.url, "http://example.org/fhir/ConceptMap/map2")
+        self.assertEqual(inst.id, "example2")
+        self.assertEqual(inst.name, "FHIR-exanple-2")
+        self.assertEqual(inst.publisher, "HL7, Inc")
+        self.assertEqual(inst.purpose, "To illustrate mapping features")
+        self.assertEqual(inst.sourceUri, "http://example.org/fhir/example1")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.targetUri, "http://example.org/fhir/example2")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "FHIR Example 2")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/ConceptMap/example2")
+    
+    def testConceptMap2(self):
+        inst = self.instantiate_from("conceptmap-example-specimen-type.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ConceptMap instance")
+        self.implConceptMap2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ConceptMap", js["resourceType"])
+        inst2 = conceptmap.ConceptMap(js)
+        self.implConceptMap2(inst2)
+    
+    def implConceptMap2(self, inst):
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.contact[1].telecom[0].system, "url")
+        self.assertEqual(inst.contact[1].telecom[0].value, "http://www.phconnect.org/group/laboratorymessagingcommunityofpractice/forum/attachment/download?id=3649725%3AUploadedFile%3A145786")
+        self.assertEqual(inst.date.date, FHIRDate("2013-07-25").date)
+        self.assertEqual(inst.date.as_json(), "2013-07-25")
+        self.assertFalse(inst.experimental)
+        self.assertEqual(inst.group[0].element[0].code, "ACNE")
+        self.assertEqual(inst.group[0].element[0].target[0].code, "309068002")
+        self.assertEqual(inst.group[0].element[1].code, "ACNFLD")
+        self.assertEqual(inst.group[0].element[1].target[0].code, "119323008")
+        self.assertEqual(inst.group[0].element[1].target[0].comment, "HL7 term is a historical term. mapped to Pus")
+        self.assertEqual(inst.group[0].element[1].target[0].product[0].code, "47002008")
+        self.assertEqual(inst.group[0].element[1].target[0].product[0].property, "TypeModifier")
+        self.assertEqual(inst.group[0].element[1].target[0].product[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.group[0].element[2].code, "AIRS")
+        self.assertEqual(inst.group[0].element[2].target[0].code, "446302006")
+        self.assertEqual(inst.group[0].element[3].code, "ALL")
+        self.assertEqual(inst.group[0].element[3].target[0].code, "119376003")
+        self.assertEqual(inst.group[0].element[3].target[0].product[0].code, "7970006")
+        self.assertEqual(inst.group[0].element[3].target[0].product[0].property, "TypeModifier")
+        self.assertEqual(inst.group[0].element[3].target[0].product[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.group[0].element[4].code, "AMP")
+        self.assertEqual(inst.group[0].element[4].target[0].code, "408654003")
+        self.assertEqual(inst.group[0].element[4].target[0].product[0].code, "81723002")
+        self.assertEqual(inst.group[0].element[4].target[0].product[0].property, "http://snomed.info/id/246380002")
+        self.assertEqual(inst.group[0].element[4].target[0].product[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.group[0].element[5].code, "ANGI")
+        self.assertEqual(inst.group[0].element[5].target[0].code, "119312009")
+        self.assertEqual(inst.group[0].element[5].target[0].comment, "TBD in detail")
+        self.assertEqual(inst.group[0].element[6].code, "ARTC")
+        self.assertEqual(inst.group[0].element[6].target[0].code, "119312009")
+        self.assertEqual(inst.group[0].element[6].target[0].comment, "TBD in detail")
+        self.assertEqual(inst.group[0].element[7].code, "ASERU")
+        self.assertEqual(inst.group[0].element[7].target[0].comment, "pending")
+        self.assertEqual(inst.group[0].element[7].target[0].equivalence, "unmatched")
+        self.assertEqual(inst.group[0].element[8].code, "ASP")
+        self.assertEqual(inst.group[0].element[8].target[0].code, "119295008")
+        self.assertEqual(inst.group[0].element[8].target[0].product[0].code, "14766002")
+        self.assertEqual(inst.group[0].element[8].target[0].product[0].property, "http://snomed.info/id/246380002")
+        self.assertEqual(inst.group[0].element[8].target[0].product[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.group[0].element[9].code, "ATTE")
+        self.assertEqual(inst.group[0].element[9].target[0].comment, "TBD")
+        self.assertEqual(inst.group[0].element[9].target[0].equivalence, "unmatched")
+        self.assertEqual(inst.group[0].source, "http://hl7.org/fhir/v2/0487")
+        self.assertEqual(inst.group[0].target, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "102")
+        self.assertEqual(inst.name, "Specimen mapping from v2 table 0487 to SNOMED CT")
+        self.assertEqual(inst.publisher, "FHIR project team (original source: LabMCoP)")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/ConceptMap/102")
+        self.assertEqual(inst.version, "20130725")
+    
+    def testConceptMap3(self):
+        inst = self.instantiate_from("conceptmap-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ConceptMap instance")
+        self.implConceptMap3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ConceptMap", js["resourceType"])
+        inst2 = conceptmap.ConceptMap(js)
+        self.implConceptMap3(inst2)
+    
+    def implConceptMap3(self, inst):
+        self.assertEqual(inst.contact[0].name, "FHIR project team (example)")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.copyright, "Creative Commons 0")
+        self.assertEqual(inst.date.date, FHIRDate("2012-06-13").date)
+        self.assertEqual(inst.date.as_json(), "2012-06-13")
+        self.assertEqual(inst.description, "A mapping between the FHIR and HL7 v3 AddressUse Code systems")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.group[0].element[0].code, "home")
+        self.assertEqual(inst.group[0].element[0].display, "home")
+        self.assertEqual(inst.group[0].element[0].target[0].code, "H")
+        self.assertEqual(inst.group[0].element[0].target[0].display, "home")
+        self.assertEqual(inst.group[0].element[1].code, "work")
+        self.assertEqual(inst.group[0].element[1].display, "work")
+        self.assertEqual(inst.group[0].element[1].target[0].code, "WP")
+        self.assertEqual(inst.group[0].element[1].target[0].display, "work place")
+        self.assertEqual(inst.group[0].element[2].code, "temp")
+        self.assertEqual(inst.group[0].element[2].display, "temp")
+        self.assertEqual(inst.group[0].element[2].target[0].code, "TMP")
+        self.assertEqual(inst.group[0].element[2].target[0].display, "temporary address")
+        self.assertEqual(inst.group[0].element[3].code, "old")
+        self.assertEqual(inst.group[0].element[3].display, "old")
+        self.assertEqual(inst.group[0].element[3].target[0].code, "BAD")
+        self.assertEqual(inst.group[0].element[3].target[0].comment, "In the HL7 v3 AD, old is handled by the usablePeriod element, but you have to provide a time, there's no simple equivalent of flagging an address as old")
+        self.assertEqual(inst.group[0].element[3].target[0].display, "bad address")
+        self.assertEqual(inst.group[0].element[3].target[0].equivalence, "disjoint")
+        self.assertEqual(inst.group[0].source, "http://hl7.org/fhir/address-use")
+        self.assertEqual(inst.group[0].target, "http://hl7.org/fhir/v3/AddressUse")
+        self.assertEqual(inst.group[0].unmapped.code, "temp")
+        self.assertEqual(inst.group[0].unmapped.display, "temp")
+        self.assertEqual(inst.group[0].unmapped.mode, "fixed")
+        self.assertEqual(inst.id, "101")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:uuid:53cd62ee-033e-414c-9f58-3ca97b5ffc3b")
+        self.assertEqual(inst.name, "FHIR-v3-Address-Use")
+        self.assertEqual(inst.publisher, "HL7, Inc")
+        self.assertEqual(inst.purpose, "To help implementers map from HL7 v3/CDA to FHIR")
+        self.assertEqual(inst.sourceUri, "http://hl7.org/fhir/ValueSet/address-use")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.targetUri, "http://hl7.org/fhir/ValueSet/v3-AddressUse")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "FHIR/v3 Address Use Mapping")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/ConceptMap/101")
+        self.assertEqual(inst.useContext[0].code.code, "venue")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.text, "for CDA Usage")
+        self.assertEqual(inst.version, "20120613")
+
diff --git a/fhirclient/models/condition.py b/fhirclient/models/condition.py
new file mode 100644
index 0000000..b7a90e3
--- /dev/null
+++ b/fhirclient/models/condition.py
@@ -0,0 +1,268 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Condition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Condition(domainresource.DomainResource):
+    """ Detailed information about conditions, problems or diagnoses.
+    
+    A clinical condition, problem, diagnosis, or other event, situation, issue,
+    or clinical concept that has risen to a level of concern.
+    """
+    
+    resource_type = "Condition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.abatementAge = None
+        """ If/when in resolution/remission.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.abatementBoolean = None
+        """ If/when in resolution/remission.
+        Type `bool`. """
+        
+        self.abatementDateTime = None
+        """ If/when in resolution/remission.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.abatementPeriod = None
+        """ If/when in resolution/remission.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.abatementRange = None
+        """ If/when in resolution/remission.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.abatementString = None
+        """ If/when in resolution/remission.
+        Type `str`. """
+        
+        self.assertedDate = None
+        """ Date record was believed accurate.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.asserter = None
+        """ Person who asserts this condition.
+        Type `FHIRReference` referencing `Practitioner, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.bodySite = None
+        """ Anatomical location, if relevant.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ problem-list-item | encounter-diagnosis.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.clinicalStatus = None
+        """ active | recurrence | inactive | remission | resolved.
+        Type `str`. """
+        
+        self.code = None
+        """ Identification of the condition, problem or diagnosis.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or episode when condition first asserted.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.evidence = None
+        """ Supporting evidence.
+        List of `ConditionEvidence` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External Ids for this condition.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Additional information about the Condition.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.onsetAge = None
+        """ Estimated or actual date,  date-time, or age.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.onsetDateTime = None
+        """ Estimated or actual date,  date-time, or age.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.onsetPeriod = None
+        """ Estimated or actual date,  date-time, or age.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.onsetRange = None
+        """ Estimated or actual date,  date-time, or age.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.onsetString = None
+        """ Estimated or actual date,  date-time, or age.
+        Type `str`. """
+        
+        self.severity = None
+        """ Subjective severity of condition.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.stage = None
+        """ Stage/grade, usually assessed formally.
+        Type `ConditionStage` (represented as `dict` in JSON). """
+        
+        self.subject = None
+        """ Who has the condition?.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.verificationStatus = None
+        """ provisional | differential | confirmed | refuted | entered-in-error
+        | unknown.
+        Type `str`. """
+        
+        super(Condition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Condition, self).elementProperties()
+        js.extend([
+            ("abatementAge", "abatementAge", age.Age, False, "abatement", False),
+            ("abatementBoolean", "abatementBoolean", bool, False, "abatement", False),
+            ("abatementDateTime", "abatementDateTime", fhirdate.FHIRDate, False, "abatement", False),
+            ("abatementPeriod", "abatementPeriod", period.Period, False, "abatement", False),
+            ("abatementRange", "abatementRange", range.Range, False, "abatement", False),
+            ("abatementString", "abatementString", str, False, "abatement", False),
+            ("assertedDate", "assertedDate", fhirdate.FHIRDate, False, None, False),
+            ("asserter", "asserter", fhirreference.FHIRReference, False, None, False),
+            ("bodySite", "bodySite", codeableconcept.CodeableConcept, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("clinicalStatus", "clinicalStatus", str, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("evidence", "evidence", ConditionEvidence, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("onsetAge", "onsetAge", age.Age, False, "onset", False),
+            ("onsetDateTime", "onsetDateTime", fhirdate.FHIRDate, False, "onset", False),
+            ("onsetPeriod", "onsetPeriod", period.Period, False, "onset", False),
+            ("onsetRange", "onsetRange", range.Range, False, "onset", False),
+            ("onsetString", "onsetString", str, False, "onset", False),
+            ("severity", "severity", codeableconcept.CodeableConcept, False, None, False),
+            ("stage", "stage", ConditionStage, False, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("verificationStatus", "verificationStatus", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ConditionEvidence(backboneelement.BackboneElement):
+    """ Supporting evidence.
+    
+    Supporting Evidence / manifestations that are the basis on which this
+    condition is suspected or confirmed.
+    """
+    
+    resource_type = "ConditionEvidence"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Manifestation/symptom.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.detail = None
+        """ Supporting information found elsewhere.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(ConditionEvidence, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConditionEvidence, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, True, None, False),
+            ("detail", "detail", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+class ConditionStage(backboneelement.BackboneElement):
+    """ Stage/grade, usually assessed formally.
+    
+    Clinical stage or grade of a condition. May include formal severity
+    assessments.
+    """
+    
+    resource_type = "ConditionStage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.assessment = None
+        """ Formal record of assessment.
+        List of `FHIRReference` items referencing `ClinicalImpression, DiagnosticReport, Observation` (represented as `dict` in JSON). """
+        
+        self.summary = None
+        """ Simple summary (disease specific).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ConditionStage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConditionStage, self).elementProperties()
+        js.extend([
+            ("assessment", "assessment", fhirreference.FHIRReference, True, None, False),
+            ("summary", "summary", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import age
+except ImportError:
+    age = sys.modules[__package__ + '.age']
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
diff --git a/fhirclient/models/condition_tests.py b/fhirclient/models/condition_tests.py
new file mode 100644
index 0000000..c7d1d4b
--- /dev/null
+++ b/fhirclient/models/condition_tests.py
@@ -0,0 +1,354 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import condition
+from .fhirdate import FHIRDate
+
+
+class ConditionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Condition", js["resourceType"])
+        return condition.Condition(js)
+    
+    def testCondition1(self):
+        inst = self.instantiate_from("condition-example-f001-heart.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Condition instance")
+        self.implCondition1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Condition", js["resourceType"])
+        inst2 = condition.Condition(js)
+        self.implCondition1(inst2)
+    
+    def implCondition1(self, inst):
+        self.assertEqual(inst.assertedDate.date, FHIRDate("2011-10-05").date)
+        self.assertEqual(inst.assertedDate.as_json(), "2011-10-05")
+        self.assertEqual(inst.bodySite[0].coding[0].code, "40768004")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Left thorax")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.bodySite[0].text, "heart structure")
+        self.assertEqual(inst.category[0].coding[0].code, "439401001")
+        self.assertEqual(inst.category[0].coding[0].display, "diagnosis")
+        self.assertEqual(inst.category[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.clinicalStatus, "active")
+        self.assertEqual(inst.code.coding[0].code, "368009")
+        self.assertEqual(inst.code.coding[0].display, "Heart valve disorder")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].code, "426396005")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].display, "Cardiac chest pain")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f001")
+        self.assertEqual(inst.onsetDateTime.date, FHIRDate("2011-08-05").date)
+        self.assertEqual(inst.onsetDateTime.as_json(), "2011-08-05")
+        self.assertEqual(inst.severity.coding[0].code, "6736007")
+        self.assertEqual(inst.severity.coding[0].display, "Moderate")
+        self.assertEqual(inst.severity.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.verificationStatus, "confirmed")
+    
+    def testCondition2(self):
+        inst = self.instantiate_from("condition-example-f002-lung.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Condition instance")
+        self.implCondition2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Condition", js["resourceType"])
+        inst2 = condition.Condition(js)
+        self.implCondition2(inst2)
+    
+    def implCondition2(self, inst):
+        self.assertEqual(inst.assertedDate.date, FHIRDate("2012-06-03").date)
+        self.assertEqual(inst.assertedDate.as_json(), "2012-06-03")
+        self.assertEqual(inst.bodySite[0].coding[0].code, "51185008")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Thorax")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[0].code, "439401001")
+        self.assertEqual(inst.category[0].coding[0].display, "diagnosis")
+        self.assertEqual(inst.category[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.clinicalStatus, "active")
+        self.assertEqual(inst.code.coding[0].code, "254637007")
+        self.assertEqual(inst.code.coding[0].display, "NSCLC - Non-small cell lung cancer")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].code, "169069000")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].display, "CT of thorax")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f002")
+        self.assertEqual(inst.onsetDateTime.date, FHIRDate("2011-05-05").date)
+        self.assertEqual(inst.onsetDateTime.as_json(), "2011-05-05")
+        self.assertEqual(inst.severity.coding[0].code, "24484000")
+        self.assertEqual(inst.severity.coding[0].display, "Severe")
+        self.assertEqual(inst.severity.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.stage.summary.coding[0].code, "258219007")
+        self.assertEqual(inst.stage.summary.coding[0].display, "stage II")
+        self.assertEqual(inst.stage.summary.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.verificationStatus, "confirmed")
+    
+    def testCondition3(self):
+        inst = self.instantiate_from("condition-example-f003-abscess.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Condition instance")
+        self.implCondition3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Condition", js["resourceType"])
+        inst2 = condition.Condition(js)
+        self.implCondition3(inst2)
+    
+    def implCondition3(self, inst):
+        self.assertEqual(inst.assertedDate.date, FHIRDate("2012-02-20").date)
+        self.assertEqual(inst.assertedDate.as_json(), "2012-02-20")
+        self.assertEqual(inst.bodySite[0].coding[0].code, "280193007")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Entire retropharyngeal area")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[0].code, "439401001")
+        self.assertEqual(inst.category[0].coding[0].display, "diagnosis")
+        self.assertEqual(inst.category[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.clinicalStatus, "active")
+        self.assertEqual(inst.code.coding[0].code, "18099001")
+        self.assertEqual(inst.code.coding[0].display, "Retropharyngeal abscess")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].code, "169068008")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].display, "CT of neck")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f003")
+        self.assertEqual(inst.onsetDateTime.date, FHIRDate("2012-02-27").date)
+        self.assertEqual(inst.onsetDateTime.as_json(), "2012-02-27")
+        self.assertEqual(inst.severity.coding[0].code, "371923003")
+        self.assertEqual(inst.severity.coding[0].display, "Mild to moderate")
+        self.assertEqual(inst.severity.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.verificationStatus, "confirmed")
+    
+    def testCondition4(self):
+        inst = self.instantiate_from("condition-example-f201-fever.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Condition instance")
+        self.implCondition4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Condition", js["resourceType"])
+        inst2 = condition.Condition(js)
+        self.implCondition4(inst2)
+    
+    def implCondition4(self, inst):
+        self.assertEqual(inst.abatementString, "around April 9, 2013")
+        self.assertEqual(inst.assertedDate.date, FHIRDate("2013-04-04").date)
+        self.assertEqual(inst.assertedDate.as_json(), "2013-04-04")
+        self.assertEqual(inst.bodySite[0].coding[0].code, "38266002")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Entire body as a whole")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[0].code, "55607006")
+        self.assertEqual(inst.category[0].coding[0].display, "Problem")
+        self.assertEqual(inst.category[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[1].code, "problem-list-item")
+        self.assertEqual(inst.category[0].coding[1].system, "http://hl7.org/fhir/condition-category")
+        self.assertEqual(inst.clinicalStatus, "resolved")
+        self.assertEqual(inst.code.coding[0].code, "386661006")
+        self.assertEqual(inst.code.coding[0].display, "Fever")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].code, "258710007")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].display, "degrees C")
+        self.assertEqual(inst.evidence[0].code[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.onsetDateTime.date, FHIRDate("2013-04-02").date)
+        self.assertEqual(inst.onsetDateTime.as_json(), "2013-04-02")
+        self.assertEqual(inst.severity.coding[0].code, "255604002")
+        self.assertEqual(inst.severity.coding[0].display, "Mild")
+        self.assertEqual(inst.severity.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.verificationStatus, "confirmed")
+    
+    def testCondition5(self):
+        inst = self.instantiate_from("condition-example-f202-malignancy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Condition instance")
+        self.implCondition5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Condition", js["resourceType"])
+        inst2 = condition.Condition(js)
+        self.implCondition5(inst2)
+    
+    def implCondition5(self, inst):
+        self.assertEqual(inst.abatementAge.code, "a")
+        self.assertEqual(inst.abatementAge.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.abatementAge.unit, "years")
+        self.assertEqual(inst.abatementAge.value, 54)
+        self.assertEqual(inst.assertedDate.date, FHIRDate("2012-12-01").date)
+        self.assertEqual(inst.assertedDate.as_json(), "2012-12-01")
+        self.assertEqual(inst.bodySite[0].coding[0].code, "361355005")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Entire head and neck")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[0].code, "encounter-diagnosis")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/condition-category")
+        self.assertEqual(inst.clinicalStatus, "resolved")
+        self.assertEqual(inst.code.coding[0].code, "363346000")
+        self.assertEqual(inst.code.coding[0].display, "Malignant neoplastic disease")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f202")
+        self.assertEqual(inst.meta.security[0].code, "TBOO")
+        self.assertEqual(inst.meta.security[0].display, "taboo")
+        self.assertEqual(inst.meta.security[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.onsetAge.code, "a")
+        self.assertEqual(inst.onsetAge.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.onsetAge.unit, "years")
+        self.assertEqual(inst.onsetAge.value, 52)
+        self.assertEqual(inst.severity.coding[0].code, "24484000")
+        self.assertEqual(inst.severity.coding[0].display, "Severe")
+        self.assertEqual(inst.severity.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.verificationStatus, "confirmed")
+    
+    def testCondition6(self):
+        inst = self.instantiate_from("condition-example-f203-sepsis.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Condition instance")
+        self.implCondition6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Condition", js["resourceType"])
+        inst2 = condition.Condition(js)
+        self.implCondition6(inst2)
+    
+    def implCondition6(self, inst):
+        self.assertEqual(inst.assertedDate.date, FHIRDate("2013-03-11").date)
+        self.assertEqual(inst.assertedDate.as_json(), "2013-03-11")
+        self.assertEqual(inst.bodySite[0].coding[0].code, "281158006")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Pulmonary vascular structure")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[0].code, "55607006")
+        self.assertEqual(inst.category[0].coding[0].display, "Problem")
+        self.assertEqual(inst.category[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[1].code, "problem-list-item")
+        self.assertEqual(inst.category[0].coding[1].system, "http://hl7.org/fhir/condition-category")
+        self.assertEqual(inst.clinicalStatus, "active")
+        self.assertEqual(inst.code.coding[0].code, "10001005")
+        self.assertEqual(inst.code.coding[0].display, "Bacterial sepsis")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f203")
+        self.assertEqual(inst.onsetDateTime.date, FHIRDate("2013-03-08").date)
+        self.assertEqual(inst.onsetDateTime.as_json(), "2013-03-08")
+        self.assertEqual(inst.severity.coding[0].code, "371924009")
+        self.assertEqual(inst.severity.coding[0].display, "Moderate to severe")
+        self.assertEqual(inst.severity.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.verificationStatus, "confirmed")
+    
+    def testCondition7(self):
+        inst = self.instantiate_from("condition-example-f204-renal.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Condition instance")
+        self.implCondition7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Condition", js["resourceType"])
+        inst2 = condition.Condition(js)
+        self.implCondition7(inst2)
+    
+    def implCondition7(self, inst):
+        self.assertEqual(inst.abatementDateTime.date, FHIRDate("2013-03-20").date)
+        self.assertEqual(inst.abatementDateTime.as_json(), "2013-03-20")
+        self.assertEqual(inst.assertedDate.date, FHIRDate("2013-03-11").date)
+        self.assertEqual(inst.assertedDate.as_json(), "2013-03-11")
+        self.assertEqual(inst.bodySite[0].coding[0].code, "181414000")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Kidney")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[0].code, "55607006")
+        self.assertEqual(inst.category[0].coding[0].display, "Problem")
+        self.assertEqual(inst.category[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[1].code, "problem-list-item")
+        self.assertEqual(inst.category[0].coding[1].system, "http://hl7.org/fhir/condition-category")
+        self.assertEqual(inst.clinicalStatus, "active")
+        self.assertEqual(inst.code.coding[0].code, "36225005")
+        self.assertEqual(inst.code.coding[0].display, "Acute renal insufficiency specified as due to procedure")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f204")
+        self.assertEqual(inst.note[0].text, "The patient is anuric.")
+        self.assertEqual(inst.onsetDateTime.date, FHIRDate("2013-03-11").date)
+        self.assertEqual(inst.onsetDateTime.as_json(), "2013-03-11")
+        self.assertEqual(inst.severity.coding[0].code, "24484000")
+        self.assertEqual(inst.severity.coding[0].display, "Severe")
+        self.assertEqual(inst.severity.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.stage.summary.coding[0].code, "14803004")
+        self.assertEqual(inst.stage.summary.coding[0].display, "Temporary")
+        self.assertEqual(inst.stage.summary.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.verificationStatus, "differential")
+    
+    def testCondition8(self):
+        inst = self.instantiate_from("condition-example-f205-infection.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Condition instance")
+        self.implCondition8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Condition", js["resourceType"])
+        inst2 = condition.Condition(js)
+        self.implCondition8(inst2)
+    
+    def implCondition8(self, inst):
+        self.assertEqual(inst.assertedDate.date, FHIRDate("2013-04-04").date)
+        self.assertEqual(inst.assertedDate.as_json(), "2013-04-04")
+        self.assertEqual(inst.clinicalStatus, "active")
+        self.assertEqual(inst.code.coding[0].code, "87628006")
+        self.assertEqual(inst.code.coding[0].display, "Bacterial infectious disease")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f205")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.verificationStatus, "differential")
+    
+    def testCondition9(self):
+        inst = self.instantiate_from("condition-example-family-history.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Condition instance")
+        self.implCondition9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Condition", js["resourceType"])
+        inst2 = condition.Condition(js)
+        self.implCondition9(inst2)
+    
+    def implCondition9(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "problem-list-item")
+        self.assertEqual(inst.category[0].coding[0].display, "Problem List Item")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/condition-category")
+        self.assertEqual(inst.clinicalStatus, "active")
+        self.assertEqual(inst.code.coding[0].code, "312824007")
+        self.assertEqual(inst.code.coding[0].display, "Family history of cancer of colon")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "family-history")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Family history of cancer of colon</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testCondition10(self):
+        inst = self.instantiate_from("condition-example-stroke.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Condition instance")
+        self.implCondition10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Condition", js["resourceType"])
+        inst2 = condition.Condition(js)
+        self.implCondition10(inst2)
+    
+    def implCondition10(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "encounter-diagnosis")
+        self.assertEqual(inst.category[0].coding[0].display, "Encounter Diagnosis")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/condition-category")
+        self.assertEqual(inst.clinicalStatus, "active")
+        self.assertEqual(inst.code.coding[0].code, "422504002")
+        self.assertEqual(inst.code.coding[0].display, "Ischemic stroke (disorder)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Stroke")
+        self.assertEqual(inst.id, "stroke")
+        self.assertEqual(inst.onsetDateTime.date, FHIRDate("2010-07-18").date)
+        self.assertEqual(inst.onsetDateTime.as_json(), "2010-07-18")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ischemic stroke, July 18, 2010</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.verificationStatus, "confirmed")
+
diff --git a/fhirclient/models/consent.py b/fhirclient/models/consent.py
new file mode 100644
index 0000000..2319044
--- /dev/null
+++ b/fhirclient/models/consent.py
@@ -0,0 +1,425 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Consent) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Consent(domainresource.DomainResource):
+    """ A healthcare consumer's policy choices to permits or denies recipients or
+    roles to perform actions for specific purposes and periods of time.
+    
+    A record of a healthcare consumer’s policy choices, which permits or denies
+    identified recipient(s) or recipient role(s) to perform one or more actions
+    within a given policy context, for specific purposes and periods of time.
+    """
+    
+    resource_type = "Consent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ Actions controlled by this consent.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.actor = None
+        """ Who|what controlled by this consent (or group, by role).
+        List of `ConsentActor` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Classification of the consent statement - for indexing/retrieval.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.consentingParty = None
+        """ Who is agreeing to the policy and exceptions.
+        List of `FHIRReference` items referencing `Organization, Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.data = None
+        """ Data controlled by this consent.
+        List of `ConsentData` items (represented as `dict` in JSON). """
+        
+        self.dataPeriod = None
+        """ Timeframe for data controlled by this consent.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.dateTime = None
+        """ When this Consent was created or indexed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.except_fhir = None
+        """ Additional rule -  addition or removal of permissions.
+        List of `ConsentExcept` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Identifier for this record (external references).
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Custodian of the consent.
+        List of `FHIRReference` items referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ Who the consent applies to.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Period that this consent applies.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.policy = None
+        """ Policies covered by this consent.
+        List of `ConsentPolicy` items (represented as `dict` in JSON). """
+        
+        self.policyRule = None
+        """ Policy that this consents to.
+        Type `str`. """
+        
+        self.purpose = None
+        """ Context of activities for which the agreement is made.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.securityLabel = None
+        """ Security Labels that define affected resources.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.sourceAttachment = None
+        """ Source from which this consent is taken.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.sourceIdentifier = None
+        """ Source from which this consent is taken.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.sourceReference = None
+        """ Source from which this consent is taken.
+        Type `FHIRReference` referencing `Consent, DocumentReference, Contract, QuestionnaireResponse` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | proposed | active | rejected | inactive | entered-in-error.
+        Type `str`. """
+        
+        super(Consent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Consent, self).elementProperties()
+        js.extend([
+            ("action", "action", codeableconcept.CodeableConcept, True, None, False),
+            ("actor", "actor", ConsentActor, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("consentingParty", "consentingParty", fhirreference.FHIRReference, True, None, False),
+            ("data", "data", ConsentData, True, None, False),
+            ("dataPeriod", "dataPeriod", period.Period, False, None, False),
+            ("dateTime", "dateTime", fhirdate.FHIRDate, False, None, False),
+            ("except_fhir", "except", ConsentExcept, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, True, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("period", "period", period.Period, False, None, False),
+            ("policy", "policy", ConsentPolicy, True, None, False),
+            ("policyRule", "policyRule", str, False, None, False),
+            ("purpose", "purpose", coding.Coding, True, None, False),
+            ("securityLabel", "securityLabel", coding.Coding, True, None, False),
+            ("sourceAttachment", "sourceAttachment", attachment.Attachment, False, "source", False),
+            ("sourceIdentifier", "sourceIdentifier", identifier.Identifier, False, "source", False),
+            ("sourceReference", "sourceReference", fhirreference.FHIRReference, False, "source", False),
+            ("status", "status", str, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ConsentActor(backboneelement.BackboneElement):
+    """ Who|what controlled by this consent (or group, by role).
+    
+    Who or what is controlled by this consent. Use group to identify a set of
+    actors by some property they share (e.g. 'admitting officers').
+    """
+    
+    resource_type = "ConsentActor"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.reference = None
+        """ Resource for the actor (or group, by role).
+        Type `FHIRReference` referencing `Device, Group, CareTeam, Organization, Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ How the actor is involved.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ConsentActor, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConsentActor, self).elementProperties()
+        js.extend([
+            ("reference", "reference", fhirreference.FHIRReference, False, None, True),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, True),
+        ])
+        return js
+
+
+class ConsentData(backboneelement.BackboneElement):
+    """ Data controlled by this consent.
+    
+    The resources controlled by this consent, if specific resources are
+    referenced.
+    """
+    
+    resource_type = "ConsentData"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.meaning = None
+        """ instance | related | dependents | authoredby.
+        Type `str`. """
+        
+        self.reference = None
+        """ The actual data reference.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(ConsentData, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConsentData, self).elementProperties()
+        js.extend([
+            ("meaning", "meaning", str, False, None, True),
+            ("reference", "reference", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+class ConsentExcept(backboneelement.BackboneElement):
+    """ Additional rule -  addition or removal of permissions.
+    
+    An exception to the base policy of this consent. An exception can be an
+    addition or removal of access permissions.
+    """
+    
+    resource_type = "ConsentExcept"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ Actions controlled by this exception.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.actor = None
+        """ Who|what controlled by this exception (or group, by role).
+        List of `ConsentExceptActor` items (represented as `dict` in JSON). """
+        
+        self.class_fhir = None
+        """ e.g. Resource Type, Profile, or CDA etc.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ e.g. LOINC or SNOMED CT code, etc in the content.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.data = None
+        """ Data controlled by this exception.
+        List of `ConsentExceptData` items (represented as `dict` in JSON). """
+        
+        self.dataPeriod = None
+        """ Timeframe for data controlled by this exception.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Timeframe for this exception.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.purpose = None
+        """ Context of activities covered by this exception.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.securityLabel = None
+        """ Security Labels that define affected resources.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ deny | permit.
+        Type `str`. """
+        
+        super(ConsentExcept, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConsentExcept, self).elementProperties()
+        js.extend([
+            ("action", "action", codeableconcept.CodeableConcept, True, None, False),
+            ("actor", "actor", ConsentExceptActor, True, None, False),
+            ("class_fhir", "class", coding.Coding, True, None, False),
+            ("code", "code", coding.Coding, True, None, False),
+            ("data", "data", ConsentExceptData, True, None, False),
+            ("dataPeriod", "dataPeriod", period.Period, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("purpose", "purpose", coding.Coding, True, None, False),
+            ("securityLabel", "securityLabel", coding.Coding, True, None, False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+class ConsentExceptActor(backboneelement.BackboneElement):
+    """ Who|what controlled by this exception (or group, by role).
+    
+    Who or what is controlled by this Exception. Use group to identify a set of
+    actors by some property they share (e.g. 'admitting officers').
+    """
+    
+    resource_type = "ConsentExceptActor"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.reference = None
+        """ Resource for the actor (or group, by role).
+        Type `FHIRReference` referencing `Device, Group, CareTeam, Organization, Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ How the actor is involved.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ConsentExceptActor, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConsentExceptActor, self).elementProperties()
+        js.extend([
+            ("reference", "reference", fhirreference.FHIRReference, False, None, True),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, True),
+        ])
+        return js
+
+
+class ConsentExceptData(backboneelement.BackboneElement):
+    """ Data controlled by this exception.
+    
+    The resources controlled by this exception, if specific resources are
+    referenced.
+    """
+    
+    resource_type = "ConsentExceptData"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.meaning = None
+        """ instance | related | dependents | authoredby.
+        Type `str`. """
+        
+        self.reference = None
+        """ The actual data reference.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(ConsentExceptData, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConsentExceptData, self).elementProperties()
+        js.extend([
+            ("meaning", "meaning", str, False, None, True),
+            ("reference", "reference", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+class ConsentPolicy(backboneelement.BackboneElement):
+    """ Policies covered by this consent.
+    
+    The references to the policies that are included in this consent scope.
+    Policies may be organizational, but are often defined jurisdictionally, or
+    in law.
+    """
+    
+    resource_type = "ConsentPolicy"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authority = None
+        """ Enforcement source for policy.
+        Type `str`. """
+        
+        self.uri = None
+        """ Specific policy covered by this consent.
+        Type `str`. """
+        
+        super(ConsentPolicy, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ConsentPolicy, self).elementProperties()
+        js.extend([
+            ("authority", "authority", str, False, None, False),
+            ("uri", "uri", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/consent_tests.py b/fhirclient/models/consent_tests.py
new file mode 100644
index 0000000..fef3817
--- /dev/null
+++ b/fhirclient/models/consent_tests.py
@@ -0,0 +1,341 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import consent
+from .fhirdate import FHIRDate
+
+
+class ConsentTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Consent", js["resourceType"])
+        return consent.Consent(js)
+    
+    def testConsent1(self):
+        inst = self.instantiate_from("consent-example-Emergency.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Consent instance")
+        self.implConsent1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Consent", js["resourceType"])
+        inst2 = consent.Consent(js)
+        self.implConsent1(inst2)
+    
+    def implConsent1(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.dateTime.as_json(), "2015-11-18")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].code, "CST")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[0].purpose[0].code, "ETREAT")
+        self.assertEqual(inst.except_fhir[0].purpose[0].system, "http://hl7.org/fhir/v3/ActReason")
+        self.assertEqual(inst.except_fhir[0].type, "permit")
+        self.assertEqual(inst.except_fhir[1].actor[0].role.coding[0].code, "CST")
+        self.assertEqual(inst.except_fhir[1].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[1].type, "deny")
+        self.assertEqual(inst.id, "consent-example-Emergency")
+        self.assertEqual(inst.policyRule, "http://hl7.org/fhir/ConsentPolicy/opt-out")
+        self.assertEqual(inst.sourceAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testConsent2(self):
+        inst = self.instantiate_from("consent-example-grantor.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Consent instance")
+        self.implConsent2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Consent", js["resourceType"])
+        inst2 = consent.Consent(js)
+        self.implConsent2(inst2)
+    
+    def implConsent2(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.dateTime.as_json(), "2015-11-18")
+        self.assertEqual(inst.except_fhir[0].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[0].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].code, "CST")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[0].actor[1].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[0].actor[1].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[0].type, "permit")
+        self.assertEqual(inst.id, "consent-example-grantor")
+        self.assertEqual(inst.policyRule, "http://hl7.org/fhir/ConsentPolicy/opt-out")
+        self.assertEqual(inst.sourceAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testConsent3(self):
+        inst = self.instantiate_from("consent-example-notAuthor.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Consent instance")
+        self.implConsent3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Consent", js["resourceType"])
+        inst2 = consent.Consent(js)
+        self.implConsent3(inst2)
+    
+    def implConsent3(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.dateTime.as_json(), "2015-11-18")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].code, "CST")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[0].type, "deny")
+        self.assertEqual(inst.id, "consent-example-notAuthor")
+        self.assertEqual(inst.policyRule, "http://hl7.org/fhir/ConsentPolicy/opt-in")
+        self.assertEqual(inst.sourceAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testConsent4(self):
+        inst = self.instantiate_from("consent-example-notOrg.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Consent instance")
+        self.implConsent4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Consent", js["resourceType"])
+        inst2 = consent.Consent(js)
+        self.implConsent4(inst2)
+    
+    def implConsent4(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.dateTime.as_json(), "2015-11-18")
+        self.assertEqual(inst.except_fhir[0].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[0].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[0].action[1].coding[0].code, "correct")
+        self.assertEqual(inst.except_fhir[0].action[1].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[0].type, "deny")
+        self.assertEqual(inst.id, "consent-example-notOrg")
+        self.assertEqual(inst.policyRule, "http://hl7.org/fhir/ConsentPolicy/opt-in")
+        self.assertEqual(inst.sourceAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testConsent5(self):
+        inst = self.instantiate_from("consent-example-notThem.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Consent instance")
+        self.implConsent5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Consent", js["resourceType"])
+        inst2 = consent.Consent(js)
+        self.implConsent5(inst2)
+    
+    def implConsent5(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.dateTime.as_json(), "2015-11-18")
+        self.assertEqual(inst.except_fhir[0].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[0].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[0].action[1].coding[0].code, "correct")
+        self.assertEqual(inst.except_fhir[0].action[1].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[0].type, "deny")
+        self.assertEqual(inst.id, "consent-example-notThem")
+        self.assertEqual(inst.policyRule, "http://hl7.org/fhir/ConsentPolicy/opt-in")
+        self.assertEqual(inst.sourceAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testConsent6(self):
+        inst = self.instantiate_from("consent-example-notThis.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Consent instance")
+        self.implConsent6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Consent", js["resourceType"])
+        inst2 = consent.Consent(js)
+        self.implConsent6(inst2)
+    
+    def implConsent6(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.dateTime.as_json(), "2015-11-18")
+        self.assertEqual(inst.except_fhir[0].data[0].meaning, "related")
+        self.assertEqual(inst.except_fhir[0].type, "deny")
+        self.assertEqual(inst.id, "consent-example-notThis")
+        self.assertEqual(inst.policyRule, "http://hl7.org/fhir/ConsentPolicy/opt-in")
+        self.assertEqual(inst.sourceAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testConsent7(self):
+        inst = self.instantiate_from("consent-example-notTime.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Consent instance")
+        self.implConsent7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Consent", js["resourceType"])
+        inst2 = consent.Consent(js)
+        self.implConsent7(inst2)
+    
+    def implConsent7(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.dateTime.as_json(), "2015-11-18")
+        self.assertEqual(inst.except_fhir[0].period.end.date, FHIRDate("2015-02-01").date)
+        self.assertEqual(inst.except_fhir[0].period.end.as_json(), "2015-02-01")
+        self.assertEqual(inst.except_fhir[0].period.start.date, FHIRDate("2015-01-01").date)
+        self.assertEqual(inst.except_fhir[0].period.start.as_json(), "2015-01-01")
+        self.assertEqual(inst.except_fhir[0].type, "deny")
+        self.assertEqual(inst.id, "consent-example-notTime")
+        self.assertEqual(inst.policyRule, "http://hl7.org/fhir/ConsentPolicy/opt-in")
+        self.assertEqual(inst.sourceAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testConsent8(self):
+        inst = self.instantiate_from("consent-example-Out.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Consent instance")
+        self.implConsent8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Consent", js["resourceType"])
+        inst2 = consent.Consent(js)
+        self.implConsent8(inst2)
+    
+    def implConsent8(self, inst):
+        self.assertEqual(inst.actor[0].role.coding[0].code, "CST")
+        self.assertEqual(inst.actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.dateTime.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.dateTime.as_json(), "2015-11-18")
+        self.assertEqual(inst.id, "consent-example-Out")
+        self.assertEqual(inst.policyRule, "http://hl7.org/fhir/ConsentPolicy/opt-out")
+        self.assertEqual(inst.sourceAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testConsent9(self):
+        inst = self.instantiate_from("consent-example-pkb.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Consent instance")
+        self.implConsent9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Consent", js["resourceType"])
+        inst2 = consent.Consent(js)
+        self.implConsent9(inst2)
+    
+    def implConsent9(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2016-06-16").date)
+        self.assertEqual(inst.dateTime.as_json(), "2016-06-16")
+        self.assertEqual(inst.except_fhir[0].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[0].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[0].securityLabel[0].code, "N")
+        self.assertEqual(inst.except_fhir[0].securityLabel[0].system, "http://hl7.org/fhir/v3/Confidentiality")
+        self.assertEqual(inst.except_fhir[0].type, "permit")
+        self.assertEqual(inst.except_fhir[1].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[1].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[1].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[1].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[1].securityLabel[0].code, "PSY")
+        self.assertEqual(inst.except_fhir[1].securityLabel[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.except_fhir[1].type, "permit")
+        self.assertEqual(inst.except_fhir[2].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[2].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[2].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[2].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[2].securityLabel[0].code, "SOC")
+        self.assertEqual(inst.except_fhir[2].securityLabel[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.except_fhir[2].type, "permit")
+        self.assertEqual(inst.except_fhir[3].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[3].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[3].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[3].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[3].securityLabel[0].code, "N")
+        self.assertEqual(inst.except_fhir[3].securityLabel[0].system, "http://hl7.org/fhir/v3/Confidentiality")
+        self.assertEqual(inst.except_fhir[3].type, "permit")
+        self.assertEqual(inst.except_fhir[4].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[4].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[4].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[4].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[4].securityLabel[0].code, "PSY")
+        self.assertEqual(inst.except_fhir[4].securityLabel[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.except_fhir[4].type, "permit")
+        self.assertEqual(inst.except_fhir[5].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[5].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[5].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[5].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[5].securityLabel[0].code, "SOC")
+        self.assertEqual(inst.except_fhir[5].securityLabel[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.except_fhir[5].type, "permit")
+        self.assertEqual(inst.except_fhir[6].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[6].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[6].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[6].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[6].securityLabel[0].code, "SEX")
+        self.assertEqual(inst.except_fhir[6].securityLabel[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.except_fhir[6].type, "permit")
+        self.assertEqual(inst.except_fhir[7].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[7].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[7].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[7].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[7].securityLabel[0].code, "N")
+        self.assertEqual(inst.except_fhir[7].securityLabel[0].system, "http://hl7.org/fhir/v3/Confidentiality")
+        self.assertEqual(inst.except_fhir[7].type, "permit")
+        self.assertEqual(inst.except_fhir[8].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[8].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[8].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[8].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[8].securityLabel[0].code, "PSY")
+        self.assertEqual(inst.except_fhir[8].securityLabel[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.except_fhir[8].type, "permit")
+        self.assertEqual(inst.except_fhir[9].action[0].coding[0].code, "access")
+        self.assertEqual(inst.except_fhir[9].action[0].coding[0].system, "http://hl7.org/fhir/consentaction")
+        self.assertEqual(inst.except_fhir[9].actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.except_fhir[9].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[9].securityLabel[0].code, "SOC")
+        self.assertEqual(inst.except_fhir[9].securityLabel[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.except_fhir[9].type, "permit")
+        self.assertEqual(inst.id, "consent-example-pkb")
+        self.assertEqual(inst.policyRule, "http://hl7.org/fhir/ConsentPolicy/opt-out")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testConsent10(self):
+        inst = self.instantiate_from("consent-example-signature.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Consent instance")
+        self.implConsent10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Consent", js["resourceType"])
+        inst2 = consent.Consent(js)
+        self.implConsent10(inst2)
+    
+    def implConsent10(self, inst):
+        self.assertEqual(inst.actor[0].role.coding[0].code, "PRCP")
+        self.assertEqual(inst.actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.category[0].coding[0].code, "HIPAA-Auth")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/consentcategorycodes")
+        self.assertEqual(inst.dateTime.date, FHIRDate("2016-05-26T00:41:10-04:00").date)
+        self.assertEqual(inst.dateTime.as_json(), "2016-05-26T00:41:10-04:00")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].code, "AUT")
+        self.assertEqual(inst.except_fhir[0].actor[0].role.coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.except_fhir[0].class_fhir[0].code, "application/hl7-cda+xml")
+        self.assertEqual(inst.except_fhir[0].class_fhir[0].system, "urn:ietf:bcp:13")
+        self.assertEqual(inst.except_fhir[0].code[0].code, "34133-9")
+        self.assertEqual(inst.except_fhir[0].code[0].system, "http://loinc.org")
+        self.assertEqual(inst.except_fhir[0].code[1].code, "18842-5")
+        self.assertEqual(inst.except_fhir[0].code[1].system, "http://loinc.org")
+        self.assertEqual(inst.except_fhir[0].type, "permit")
+        self.assertEqual(inst.id, "consent-example-signature")
+        self.assertEqual(inst.identifier.system, "urn:oid:2.16.840.1.113883.3.72.5.9.1")
+        self.assertEqual(inst.identifier.value, "494e0c7a-a69e-4fb4-9d02-6aae747790d7")
+        self.assertEqual(inst.period.end.date, FHIRDate("2016-10-10").date)
+        self.assertEqual(inst.period.end.as_json(), "2016-10-10")
+        self.assertEqual(inst.period.start.date, FHIRDate("2015-10-10").date)
+        self.assertEqual(inst.period.start.as_json(), "2015-10-10")
+        self.assertEqual(inst.policyRule, "http://hl7.org/fhir/ConsentPolicy/opt-in")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/contactdetail.py b/fhirclient/models/contactdetail.py
new file mode 100644
index 0000000..c8d41d0
--- /dev/null
+++ b/fhirclient/models/contactdetail.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ContactDetail) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class ContactDetail(element.Element):
+    """ Contact information.
+    
+    Specifies contact information for a person or organization.
+    """
+    
+    resource_type = "ContactDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.name = None
+        """ Name of an individual to contact.
+        Type `str`. """
+        
+        self.telecom = None
+        """ Contact details for individual or organization.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        super(ContactDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContactDetail, self).elementProperties()
+        js.extend([
+            ("name", "name", str, False, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
diff --git a/fhirclient/models/contactpoint.py b/fhirclient/models/contactpoint.py
new file mode 100644
index 0000000..eb3e63e
--- /dev/null
+++ b/fhirclient/models/contactpoint.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ContactPoint) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class ContactPoint(element.Element):
+    """ Details of a Technology mediated contact point (phone, fax, email, etc.).
+    
+    Details for all kinds of technology mediated contact points for a person or
+    organization, including telephone, email, etc.
+    """
+    
+    resource_type = "ContactPoint"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.period = None
+        """ Time period when the contact point was/is in use.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.rank = None
+        """ Specify preferred order of use (1 = highest).
+        Type `int`. """
+        
+        self.system = None
+        """ phone | fax | email | pager | url | sms | other.
+        Type `str`. """
+        
+        self.use = None
+        """ home | work | temp | old | mobile - purpose of this contact point.
+        Type `str`. """
+        
+        self.value = None
+        """ The actual contact point details.
+        Type `str`. """
+        
+        super(ContactPoint, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContactPoint, self).elementProperties()
+        js.extend([
+            ("period", "period", period.Period, False, None, False),
+            ("rank", "rank", int, False, None, False),
+            ("system", "system", str, False, None, False),
+            ("use", "use", str, False, None, False),
+            ("value", "value", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/contract.py b/fhirclient/models/contract.py
new file mode 100644
index 0000000..9e48c0d
--- /dev/null
+++ b/fhirclient/models/contract.py
@@ -0,0 +1,655 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Contract) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Contract(domainresource.DomainResource):
+    """ Legal Agreement.
+    
+    A formal agreement between parties regarding the conduct of business,
+    exchange of information or other matters.
+    """
+    
+    resource_type = "Contract"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ Action stipulated by this Contract.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.actionReason = None
+        """ Rationale for the stiplulated action.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.agent = None
+        """ Entity being ascribed responsibility.
+        List of `ContractAgent` items (represented as `dict` in JSON). """
+        
+        self.applies = None
+        """ Effective time.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.authority = None
+        """ Authority under which this Contract has standing.
+        List of `FHIRReference` items referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.bindingAttachment = None
+        """ Binding Contract.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.bindingReference = None
+        """ Binding Contract.
+        Type `FHIRReference` referencing `Composition, DocumentReference, QuestionnaireResponse` (represented as `dict` in JSON). """
+        
+        self.contentDerivative = None
+        """ Content derived from the basal information.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.decisionType = None
+        """ Decision by Grantor.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.domain = None
+        """ Domain in which this Contract applies.
+        List of `FHIRReference` items referencing `Location` (represented as `dict` in JSON). """
+        
+        self.friendly = None
+        """ Contract Friendly Language.
+        List of `ContractFriendly` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Contract number.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.issued = None
+        """ When this Contract was issued.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.legal = None
+        """ Contract Legal Language.
+        List of `ContractLegal` items (represented as `dict` in JSON). """
+        
+        self.rule = None
+        """ Computable Contract Language.
+        List of `ContractRule` items (represented as `dict` in JSON). """
+        
+        self.securityLabel = None
+        """ Security Labels that define affected resources.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.signer = None
+        """ Contract Signatory.
+        List of `ContractSigner` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ amended | appended | cancelled | disputed | entered-in-error |
+        executable | executed | negotiable | offered | policy | rejected |
+        renewed | revoked | resolved | terminated.
+        Type `str`. """
+        
+        self.subType = None
+        """ Subtype within the context of type.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.subject = None
+        """ Contract Target Entity.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.term = None
+        """ Contract Term List.
+        List of `ContractTerm` items (represented as `dict` in JSON). """
+        
+        self.topic = None
+        """ Context of the Contract.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type or form.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valuedItem = None
+        """ Contract Valued Item List.
+        List of `ContractValuedItem` items (represented as `dict` in JSON). """
+        
+        super(Contract, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Contract, self).elementProperties()
+        js.extend([
+            ("action", "action", codeableconcept.CodeableConcept, True, None, False),
+            ("actionReason", "actionReason", codeableconcept.CodeableConcept, True, None, False),
+            ("agent", "agent", ContractAgent, True, None, False),
+            ("applies", "applies", period.Period, False, None, False),
+            ("authority", "authority", fhirreference.FHIRReference, True, None, False),
+            ("bindingAttachment", "bindingAttachment", attachment.Attachment, False, "binding", False),
+            ("bindingReference", "bindingReference", fhirreference.FHIRReference, False, "binding", False),
+            ("contentDerivative", "contentDerivative", codeableconcept.CodeableConcept, False, None, False),
+            ("decisionType", "decisionType", codeableconcept.CodeableConcept, False, None, False),
+            ("domain", "domain", fhirreference.FHIRReference, True, None, False),
+            ("friendly", "friendly", ContractFriendly, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("issued", "issued", fhirdate.FHIRDate, False, None, False),
+            ("legal", "legal", ContractLegal, True, None, False),
+            ("rule", "rule", ContractRule, True, None, False),
+            ("securityLabel", "securityLabel", coding.Coding, True, None, False),
+            ("signer", "signer", ContractSigner, True, None, False),
+            ("status", "status", str, False, None, False),
+            ("subType", "subType", codeableconcept.CodeableConcept, True, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, True, None, False),
+            ("term", "term", ContractTerm, True, None, False),
+            ("topic", "topic", fhirreference.FHIRReference, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+            ("valuedItem", "valuedItem", ContractValuedItem, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ContractAgent(backboneelement.BackboneElement):
+    """ Entity being ascribed responsibility.
+    
+    An actor taking a role in an activity for which it can be assigned some
+    degree of responsibility for the activity taking place.
+    """
+    
+    resource_type = "ContractAgent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actor = None
+        """ Contract Agent Type.
+        Type `FHIRReference` referencing `Contract, Device, Group, Location, Organization, Patient, Practitioner, RelatedPerson, Substance` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ Role type of the agent.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(ContractAgent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContractAgent, self).elementProperties()
+        js.extend([
+            ("actor", "actor", fhirreference.FHIRReference, False, None, True),
+            ("role", "role", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+class ContractFriendly(backboneelement.BackboneElement):
+    """ Contract Friendly Language.
+    
+    The "patient friendly language" versionof the Contract in whole or in
+    parts. "Patient friendly language" means the representation of the Contract
+    and Contract Provisions in a manner that is readily accessible and
+    understandable by a layperson in accordance with best practices for
+    communication styles that ensure that those agreeing to or signing the
+    Contract understand the roles, actions, obligations, responsibilities, and
+    implication of the agreement.
+    """
+    
+    resource_type = "ContractFriendly"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contentAttachment = None
+        """ Easily comprehended representation of this Contract.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.contentReference = None
+        """ Easily comprehended representation of this Contract.
+        Type `FHIRReference` referencing `Composition, DocumentReference, QuestionnaireResponse` (represented as `dict` in JSON). """
+        
+        super(ContractFriendly, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContractFriendly, self).elementProperties()
+        js.extend([
+            ("contentAttachment", "contentAttachment", attachment.Attachment, False, "content", True),
+            ("contentReference", "contentReference", fhirreference.FHIRReference, False, "content", True),
+        ])
+        return js
+
+
+class ContractLegal(backboneelement.BackboneElement):
+    """ Contract Legal Language.
+    
+    List of Legal expressions or representations of this Contract.
+    """
+    
+    resource_type = "ContractLegal"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contentAttachment = None
+        """ Contract Legal Text.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.contentReference = None
+        """ Contract Legal Text.
+        Type `FHIRReference` referencing `Composition, DocumentReference, QuestionnaireResponse` (represented as `dict` in JSON). """
+        
+        super(ContractLegal, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContractLegal, self).elementProperties()
+        js.extend([
+            ("contentAttachment", "contentAttachment", attachment.Attachment, False, "content", True),
+            ("contentReference", "contentReference", fhirreference.FHIRReference, False, "content", True),
+        ])
+        return js
+
+
+class ContractRule(backboneelement.BackboneElement):
+    """ Computable Contract Language.
+    
+    List of Computable Policy Rule Language Representations of this Contract.
+    """
+    
+    resource_type = "ContractRule"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contentAttachment = None
+        """ Computable Contract Rules.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.contentReference = None
+        """ Computable Contract Rules.
+        Type `FHIRReference` referencing `DocumentReference` (represented as `dict` in JSON). """
+        
+        super(ContractRule, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContractRule, self).elementProperties()
+        js.extend([
+            ("contentAttachment", "contentAttachment", attachment.Attachment, False, "content", True),
+            ("contentReference", "contentReference", fhirreference.FHIRReference, False, "content", True),
+        ])
+        return js
+
+
+class ContractSigner(backboneelement.BackboneElement):
+    """ Contract Signatory.
+    
+    Parties with legal standing in the Contract, including the principal
+    parties, the grantor(s) and grantee(s), which are any person or
+    organization bound by the contract, and any ancillary parties, which
+    facilitate the execution of the contract such as a notary or witness.
+    """
+    
+    resource_type = "ContractSigner"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.party = None
+        """ Contract Signatory Party.
+        Type `FHIRReference` referencing `Organization, Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.signature = None
+        """ Contract Documentation Signature.
+        List of `Signature` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Contract Signatory Role.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(ContractSigner, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContractSigner, self).elementProperties()
+        js.extend([
+            ("party", "party", fhirreference.FHIRReference, False, None, True),
+            ("signature", "signature", signature.Signature, True, None, True),
+            ("type", "type", coding.Coding, False, None, True),
+        ])
+        return js
+
+
+class ContractTerm(backboneelement.BackboneElement):
+    """ Contract Term List.
+    
+    One or more Contract Provisions, which may be related and conveyed as a
+    group, and may contain nested groups.
+    """
+    
+    resource_type = "ContractTerm"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ Contract Term Activity.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.actionReason = None
+        """ Purpose for the Contract Term Action.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.agent = None
+        """ Contract Term Agent List.
+        List of `ContractTermAgent` items (represented as `dict` in JSON). """
+        
+        self.applies = None
+        """ Contract Term Effective Time.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.group = None
+        """ Nested Contract Term Group.
+        List of `ContractTerm` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Contract Term Number.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.issued = None
+        """ Contract Term Issue Date Time.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.securityLabel = None
+        """ Security Labels that define affected terms.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.subType = None
+        """ Contract Term Type specific classification.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.text = None
+        """ Human readable Contract term text.
+        Type `str`. """
+        
+        self.topic = None
+        """ Context of the Contract term.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Contract Term Type or Form.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valuedItem = None
+        """ Contract Term Valued Item List.
+        List of `ContractTermValuedItem` items (represented as `dict` in JSON). """
+        
+        super(ContractTerm, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContractTerm, self).elementProperties()
+        js.extend([
+            ("action", "action", codeableconcept.CodeableConcept, True, None, False),
+            ("actionReason", "actionReason", codeableconcept.CodeableConcept, True, None, False),
+            ("agent", "agent", ContractTermAgent, True, None, False),
+            ("applies", "applies", period.Period, False, None, False),
+            ("group", "group", ContractTerm, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("issued", "issued", fhirdate.FHIRDate, False, None, False),
+            ("securityLabel", "securityLabel", coding.Coding, True, None, False),
+            ("subType", "subType", codeableconcept.CodeableConcept, False, None, False),
+            ("text", "text", str, False, None, False),
+            ("topic", "topic", fhirreference.FHIRReference, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+            ("valuedItem", "valuedItem", ContractTermValuedItem, True, None, False),
+        ])
+        return js
+
+
+class ContractTermAgent(backboneelement.BackboneElement):
+    """ Contract Term Agent List.
+    
+    An actor taking a role in an activity for which it can be assigned some
+    degree of responsibility for the activity taking place.
+    """
+    
+    resource_type = "ContractTermAgent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actor = None
+        """ Contract Term Agent Subject.
+        Type `FHIRReference` referencing `Contract, Device, Group, Location, Organization, Patient, Practitioner, RelatedPerson, Substance` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ Type of the Contract Term Agent.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(ContractTermAgent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContractTermAgent, self).elementProperties()
+        js.extend([
+            ("actor", "actor", fhirreference.FHIRReference, False, None, True),
+            ("role", "role", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+class ContractTermValuedItem(backboneelement.BackboneElement):
+    """ Contract Term Valued Item List.
+    
+    Contract Provision Valued Item List.
+    """
+    
+    resource_type = "ContractTermValuedItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.effectiveTime = None
+        """ Contract Term Valued Item Effective Tiem.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.entityCodeableConcept = None
+        """ Contract Term Valued Item Type.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.entityReference = None
+        """ Contract Term Valued Item Type.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.factor = None
+        """ Contract Term Valued Item Price Scaling Factor.
+        Type `float`. """
+        
+        self.identifier = None
+        """ Contract Term Valued Item Number.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.net = None
+        """ Total Contract Term Valued Item Value.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.points = None
+        """ Contract Term Valued Item Difficulty Scaling Factor.
+        Type `float`. """
+        
+        self.quantity = None
+        """ Contract Term Valued Item Count.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.unitPrice = None
+        """ Contract Term Valued Item fee, charge, or cost.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(ContractTermValuedItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContractTermValuedItem, self).elementProperties()
+        js.extend([
+            ("effectiveTime", "effectiveTime", fhirdate.FHIRDate, False, None, False),
+            ("entityCodeableConcept", "entityCodeableConcept", codeableconcept.CodeableConcept, False, "entity", False),
+            ("entityReference", "entityReference", fhirreference.FHIRReference, False, "entity", False),
+            ("factor", "factor", float, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("net", "net", money.Money, False, None, False),
+            ("points", "points", float, False, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("unitPrice", "unitPrice", money.Money, False, None, False),
+        ])
+        return js
+
+
+class ContractValuedItem(backboneelement.BackboneElement):
+    """ Contract Valued Item List.
+    """
+    
+    resource_type = "ContractValuedItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.effectiveTime = None
+        """ Contract Valued Item Effective Tiem.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.entityCodeableConcept = None
+        """ Contract Valued Item Type.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.entityReference = None
+        """ Contract Valued Item Type.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.factor = None
+        """ Contract Valued Item Price Scaling Factor.
+        Type `float`. """
+        
+        self.identifier = None
+        """ Contract Valued Item Number.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.net = None
+        """ Total Contract Valued Item Value.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.points = None
+        """ Contract Valued Item Difficulty Scaling Factor.
+        Type `float`. """
+        
+        self.quantity = None
+        """ Count of Contract Valued Items.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.unitPrice = None
+        """ Contract Valued Item fee, charge, or cost.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(ContractValuedItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ContractValuedItem, self).elementProperties()
+        js.extend([
+            ("effectiveTime", "effectiveTime", fhirdate.FHIRDate, False, None, False),
+            ("entityCodeableConcept", "entityCodeableConcept", codeableconcept.CodeableConcept, False, "entity", False),
+            ("entityReference", "entityReference", fhirreference.FHIRReference, False, "entity", False),
+            ("factor", "factor", float, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("net", "net", money.Money, False, None, False),
+            ("points", "points", float, False, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("unitPrice", "unitPrice", money.Money, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import signature
+except ImportError:
+    signature = sys.modules[__package__ + '.signature']
diff --git a/fhirclient/models/contract_tests.py b/fhirclient/models/contract_tests.py
new file mode 100644
index 0000000..f85d226
--- /dev/null
+++ b/fhirclient/models/contract_tests.py
@@ -0,0 +1,256 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import contract
+from .fhirdate import FHIRDate
+
+
+class ContractTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Contract", js["resourceType"])
+        return contract.Contract(js)
+    
+    def testContract1(self):
+        inst = self.instantiate_from("contract-example-42cfr-part2.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Contract instance")
+        self.implContract1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Contract", js["resourceType"])
+        inst2 = contract.Contract(js)
+        self.implContract1(inst2)
+    
+    def implContract1(self, inst):
+        self.assertEqual(inst.agent[0].role[0].coding[0].code, "IR")
+        self.assertEqual(inst.agent[0].role[0].coding[0].display, "Recipient")
+        self.assertEqual(inst.agent[0].role[0].coding[0].system, "http://org.mdhhs.fhir.consent-actor-type")
+        self.assertEqual(inst.agent[0].role[0].text, "Recipient of restricted health information")
+        self.assertEqual(inst.agent[1].role[0].coding[0].code, "IS")
+        self.assertEqual(inst.agent[1].role[0].coding[0].display, "Sender")
+        self.assertEqual(inst.agent[1].role[0].coding[0].system, "http://org.mdhhs.fhir.consent-actor-type")
+        self.assertEqual(inst.agent[1].role[0].text, "Sender of restricted health information")
+        self.assertEqual(inst.id, "C-2121")
+        self.assertEqual(inst.issued.date, FHIRDate("2031-11-01T21:18:27-04:00").date)
+        self.assertEqual(inst.issued.as_json(), "2031-11-01T21:18:27-04:00")
+        self.assertEqual(inst.legal[0].contentAttachment.contentType, "application/pdf")
+        self.assertEqual(inst.legal[0].contentAttachment.language, "en-US")
+        self.assertEqual(inst.legal[0].contentAttachment.title, "MDHHS-5515 Consent To Share Your Health Information")
+        self.assertEqual(inst.legal[0].contentAttachment.url, "http://org.mihin.ecms/ConsentDirective-2121")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2016-07-19T18:18:42.108-04:00").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2016-07-19T18:18:42.108-04:00")
+        self.assertEqual(inst.meta.versionId, "1")
+        self.assertEqual(inst.securityLabel[0].code, "R")
+        self.assertEqual(inst.securityLabel[0].display, "Restricted")
+        self.assertEqual(inst.securityLabel[0].system, "http://hl7.org/fhir/v3/Confidentiality")
+        self.assertEqual(inst.securityLabel[1].code, "ETH")
+        self.assertEqual(inst.securityLabel[1].display, "substance abuse information sensitivity")
+        self.assertEqual(inst.securityLabel[1].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.securityLabel[2].code, "42CFRPart2")
+        self.assertEqual(inst.securityLabel[2].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.securityLabel[3].code, "TREAT")
+        self.assertEqual(inst.securityLabel[3].display, "treatment")
+        self.assertEqual(inst.securityLabel[3].system, "http://hl7.org/fhir/v3/ActReason")
+        self.assertEqual(inst.securityLabel[4].code, "HPAYMT")
+        self.assertEqual(inst.securityLabel[4].display, "healthcare payment")
+        self.assertEqual(inst.securityLabel[4].system, "http://hl7.org/fhir/v3/ActReason")
+        self.assertEqual(inst.securityLabel[5].code, "HOPERAT")
+        self.assertEqual(inst.securityLabel[5].display, "healthcare operations")
+        self.assertEqual(inst.securityLabel[5].system, "http://hl7.org/fhir/v3/ActReason")
+        self.assertEqual(inst.securityLabel[6].code, "PERSISTLABEL")
+        self.assertEqual(inst.securityLabel[6].display, "persist security label")
+        self.assertEqual(inst.securityLabel[6].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.securityLabel[7].code, "PRIVMARK")
+        self.assertEqual(inst.securityLabel[7].display, "privacy mark")
+        self.assertEqual(inst.securityLabel[7].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.securityLabel[8].code, "NORDSCLCD")
+        self.assertEqual(inst.securityLabel[8].display, "no redisclosure without consent directive")
+        self.assertEqual(inst.securityLabel[8].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.signer[0].signature[0].type[0].code, "1.2.840.10065.1.12.1.1")
+        self.assertEqual(inst.signer[0].signature[0].type[0].system, "urn:iso-astm:E1762-95:2013")
+        self.assertEqual(inst.signer[0].signature[0].when.date, FHIRDate("2017-02-08T10:57:34+01:00").date)
+        self.assertEqual(inst.signer[0].signature[0].when.as_json(), "2017-02-08T10:57:34+01:00")
+        self.assertEqual(inst.signer[0].type.code, "SELF")
+        self.assertEqual(inst.signer[0].type.system, "http://org.mdhhs.fhir.consent-signer-type")
+        self.assertEqual(inst.subType[0].coding[0].code, "MDHHS-5515")
+        self.assertEqual(inst.subType[0].coding[0].display, "Michigan MDHHS-5515 Consent to Share Behavioral Health Information for Care Coordination Purposes")
+        self.assertEqual(inst.subType[0].coding[0].system, "http://hl7.org/fhir/consentcategorycodes")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "OPTIN")
+        self.assertEqual(inst.type.coding[0].system, "http://org.mdhhs.fhir.consentdirective-type")
+        self.assertEqual(inst.type.text, "Opt-in consent directive")
+    
+    def testContract2(self):
+        inst = self.instantiate_from("contract-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Contract instance")
+        self.implContract2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Contract", js["resourceType"])
+        inst2 = contract.Contract(js)
+        self.implContract2(inst2)
+    
+    def implContract2(self, inst):
+        self.assertEqual(inst.id, "C-123")
+        self.assertEqual(inst.identifier.system, "http://happyvalley.com/contract")
+        self.assertEqual(inst.identifier.value, "12347")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the contract</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testContract3(self):
+        inst = self.instantiate_from("pcd-example-notAuthor.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Contract instance")
+        self.implContract3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Contract", js["resourceType"])
+        inst2 = contract.Contract(js)
+        self.implContract3(inst2)
+    
+    def implContract3(self, inst):
+        self.assertEqual(inst.friendly[0].contentAttachment.title, "The terms of the consent in friendly consumer speak.")
+        self.assertEqual(inst.id, "pcd-example-notAuthor")
+        self.assertEqual(inst.issued.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.issued.as_json(), "2015-11-18")
+        self.assertEqual(inst.legal[0].contentAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.subType[0].coding[0].code, "Opt-In")
+        self.assertEqual(inst.subType[0].coding[0].display, "Default Authorization with exceptions.")
+        self.assertEqual(inst.subType[0].coding[0].system, "http://www.infoway-inforoute.ca.org/Consent-subtype-codes")
+        self.assertEqual(inst.term[0].text, "Withhold all data authored by Good Health provider.")
+        self.assertEqual(inst.term[0].type.coding[0].code, "withhold-authored-by")
+        self.assertEqual(inst.term[0].type.coding[0].display, "Withhold all data authored by specified actor entity.")
+        self.assertEqual(inst.term[0].type.coding[0].system, "http://example.org/fhir/consent-term-type-codes")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "57016-8")
+        self.assertEqual(inst.type.coding[0].system, "http://loinc.org")
+    
+    def testContract4(self):
+        inst = self.instantiate_from("pcd-example-notLabs.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Contract instance")
+        self.implContract4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Contract", js["resourceType"])
+        inst2 = contract.Contract(js)
+        self.implContract4(inst2)
+    
+    def implContract4(self, inst):
+        self.assertEqual(inst.friendly[0].contentAttachment.title, "The terms of the consent in friendly consumer speak.")
+        self.assertEqual(inst.id, "pcd-example-notLabs")
+        self.assertEqual(inst.issued.date, FHIRDate("2014-08-17").date)
+        self.assertEqual(inst.issued.as_json(), "2014-08-17")
+        self.assertEqual(inst.legal[0].contentAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.subType[0].coding[0].code, "Opt-In")
+        self.assertEqual(inst.subType[0].coding[0].display, "Default Authorization with exceptions.")
+        self.assertEqual(inst.subType[0].coding[0].system, "http://www.infoway-inforoute.ca.org/Consent-subtype-codes")
+        self.assertEqual(inst.term[0].subType.coding[0].code, "ProcedureRequest")
+        self.assertEqual(inst.term[0].subType.coding[0].system, "http://hl7.org/fhir/resource-types")
+        self.assertEqual(inst.term[0].text, "Withhold orders from any provider.")
+        self.assertEqual(inst.term[0].type.coding[0].code, "withhold-object-type")
+        self.assertEqual(inst.term[0].type.coding[0].system, "http://example.org/fhir/consent-term-type-codes")
+        self.assertEqual(inst.term[1].subType.coding[0].code, "DiagnosticReport")
+        self.assertEqual(inst.term[1].subType.coding[0].system, "http://hl7.org/fhir/resource-types")
+        self.assertEqual(inst.term[1].text, "Withhold order results from any provider.")
+        self.assertEqual(inst.term[1].type.coding[0].code, "withhold-object-type")
+        self.assertEqual(inst.term[1].type.coding[0].system, "http://example.org/fhir/consent-term-type-codes")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "57016-8")
+        self.assertEqual(inst.type.coding[0].system, "http://loinc.org")
+    
+    def testContract5(self):
+        inst = self.instantiate_from("pcd-example-notOrg.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Contract instance")
+        self.implContract5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Contract", js["resourceType"])
+        inst2 = contract.Contract(js)
+        self.implContract5(inst2)
+    
+    def implContract5(self, inst):
+        self.assertEqual(inst.friendly[0].contentAttachment.title, "The terms of the consent in friendly consumer speak.")
+        self.assertEqual(inst.id, "pcd-example-notOrg")
+        self.assertEqual(inst.issued.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.issued.as_json(), "2015-11-18")
+        self.assertEqual(inst.legal[0].contentAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.subType[0].coding[0].code, "Opt-In")
+        self.assertEqual(inst.subType[0].coding[0].display, "Default Authorization with exceptions.")
+        self.assertEqual(inst.subType[0].coding[0].system, "http://www.infoway-inforoute.ca.org/Consent-subtype-codes")
+        self.assertEqual(inst.term[0].text, "Withhold this order and any results or related objects from any provider.")
+        self.assertEqual(inst.term[0].type.coding[0].code, "withhold-from")
+        self.assertEqual(inst.term[0].type.coding[0].display, "Withhold all data from specified actor entity.")
+        self.assertEqual(inst.term[0].type.coding[0].system, "http://example.org/fhir/consent-term-type-codes")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "57016-8")
+        self.assertEqual(inst.type.coding[0].system, "http://loinc.org")
+    
+    def testContract6(self):
+        inst = self.instantiate_from("pcd-example-notThem.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Contract instance")
+        self.implContract6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Contract", js["resourceType"])
+        inst2 = contract.Contract(js)
+        self.implContract6(inst2)
+    
+    def implContract6(self, inst):
+        self.assertEqual(inst.friendly[0].contentAttachment.title, "The terms of the consent in friendly consumer speak.")
+        self.assertEqual(inst.id, "pcd-example-notThem")
+        self.assertEqual(inst.issued.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.issued.as_json(), "2015-11-18")
+        self.assertEqual(inst.legal[0].contentAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.signer[0].signature[0].type[0].code, "1.2.840.10065.1.12.1.1")
+        self.assertEqual(inst.signer[0].signature[0].type[0].system, "urn:iso-astm:E1762-95:2013")
+        self.assertEqual(inst.signer[0].signature[0].when.date, FHIRDate("2013-06-08T10:57:34-07:00").date)
+        self.assertEqual(inst.signer[0].signature[0].when.as_json(), "2013-06-08T10:57:34-07:00")
+        self.assertEqual(inst.signer[0].type.code, "COVPTY")
+        self.assertEqual(inst.signer[0].type.system, "http://www.hl7.org/fhir/contractsignertypecodes")
+        self.assertEqual(inst.subType[0].coding[0].code, "Opt-In")
+        self.assertEqual(inst.subType[0].coding[0].display, "Default Authorization with exceptions.")
+        self.assertEqual(inst.subType[0].coding[0].system, "http://www.infoway-inforoute.ca.org/Consent-subtype-codes")
+        self.assertEqual(inst.term[0].text, "Withhold this order and any results or related objects from specified nurse provider.")
+        self.assertEqual(inst.term[0].type.coding[0].code, "withhold-from")
+        self.assertEqual(inst.term[0].type.coding[0].display, "Withhold all data from specified actor entity.")
+        self.assertEqual(inst.term[0].type.coding[0].system, "http://example.org/fhir/consent-term-type-codes")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "57016-8")
+        self.assertEqual(inst.type.coding[0].system, "http://loinc.org")
+    
+    def testContract7(self):
+        inst = self.instantiate_from("pcd-example-notThis.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Contract instance")
+        self.implContract7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Contract", js["resourceType"])
+        inst2 = contract.Contract(js)
+        self.implContract7(inst2)
+    
+    def implContract7(self, inst):
+        self.assertEqual(inst.friendly[0].contentAttachment.title, "The terms of the consent in friendly consumer speak.")
+        self.assertEqual(inst.id, "pcd-example-notThis")
+        self.assertEqual(inst.issued.date, FHIRDate("2015-11-18").date)
+        self.assertEqual(inst.issued.as_json(), "2015-11-18")
+        self.assertEqual(inst.legal[0].contentAttachment.title, "The terms of the consent in lawyer speak.")
+        self.assertEqual(inst.subType[0].coding[0].code, "Opt-In")
+        self.assertEqual(inst.subType[0].coding[0].display, "Default Authorization with exceptions.")
+        self.assertEqual(inst.subType[0].coding[0].system, "http://www.infoway-inforoute.ca.org/Consent-subtype-codes")
+        self.assertEqual(inst.term[0].text, "Withhold this order and any results or related objects from any provider.")
+        self.assertEqual(inst.term[0].type.coding[0].code, "withhold-identified-object-and-related")
+        self.assertEqual(inst.term[0].type.coding[0].display, "Withhold the identified object and any other resources that are related to this object.")
+        self.assertEqual(inst.term[0].type.coding[0].system, "http://example.org/fhir/consent-term-type-codes")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "57016-8")
+        self.assertEqual(inst.type.coding[0].system, "http://loinc.org")
+
diff --git a/fhirclient/models/contributor.py b/fhirclient/models/contributor.py
new file mode 100644
index 0000000..a157be2
--- /dev/null
+++ b/fhirclient/models/contributor.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Contributor) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Contributor(element.Element):
+    """ Contributor information.
+    
+    A contributor to the content of a knowledge asset, including authors,
+    editors, reviewers, and endorsers.
+    """
+    
+    resource_type = "Contributor"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contact = None
+        """ Contact details of the contributor.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Who contributed the content.
+        Type `str`. """
+        
+        self.type = None
+        """ author | editor | reviewer | endorser.
+        Type `str`. """
+        
+        super(Contributor, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Contributor, self).elementProperties()
+        js.extend([
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("name", "name", str, False, None, True),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
diff --git a/fhirclient/models/count.py b/fhirclient/models/count.py
new file mode 100644
index 0000000..b70872a
--- /dev/null
+++ b/fhirclient/models/count.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Count) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import quantity
+
+class Count(quantity.Quantity):
+    """ A measured or measurable amount.
+    
+    A measured amount (or an amount that can potentially be measured). Note
+    that measured amounts include amounts that are not precisely quantified,
+    including amounts involving arbitrary units and floating currencies.
+    """
+    
+    resource_type = "Count"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        super(Count, self).__init__(jsondict=jsondict, strict=strict)
+
+
diff --git a/fhirclient/models/coverage.py b/fhirclient/models/coverage.py
new file mode 100644
index 0000000..3fcd966
--- /dev/null
+++ b/fhirclient/models/coverage.py
@@ -0,0 +1,220 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Coverage) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Coverage(domainresource.DomainResource):
+    """ Insurance or medical plan or a payment agreement.
+    
+    Financial instrument which may be used to reimburse or pay for health care
+    products and services.
+    """
+    
+    resource_type = "Coverage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.beneficiary = None
+        """ Plan Beneficiary.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.contract = None
+        """ Contract details.
+        List of `FHIRReference` items referencing `Contract` (represented as `dict` in JSON). """
+        
+        self.dependent = None
+        """ Dependent number.
+        Type `str`. """
+        
+        self.grouping = None
+        """ Additional coverage classifications.
+        Type `CoverageGrouping` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ The primary coverage ID.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.network = None
+        """ Insurer network.
+        Type `str`. """
+        
+        self.order = None
+        """ Relative order of the coverage.
+        Type `int`. """
+        
+        self.payor = None
+        """ Identifier for the plan or agreement issuer.
+        List of `FHIRReference` items referencing `Organization, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Coverage start and end dates.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.policyHolder = None
+        """ Owner of the policy.
+        Type `FHIRReference` referencing `Patient, RelatedPerson, Organization` (represented as `dict` in JSON). """
+        
+        self.relationship = None
+        """ Beneficiary relationship to the Subscriber.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ The plan instance or sequence counter.
+        Type `str`. """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        self.subscriber = None
+        """ Subscriber to the policy.
+        Type `FHIRReference` referencing `Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.subscriberId = None
+        """ ID assigned to the Subscriber.
+        Type `str`. """
+        
+        self.type = None
+        """ Type of coverage such as medical or accident.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(Coverage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Coverage, self).elementProperties()
+        js.extend([
+            ("beneficiary", "beneficiary", fhirreference.FHIRReference, False, None, False),
+            ("contract", "contract", fhirreference.FHIRReference, True, None, False),
+            ("dependent", "dependent", str, False, None, False),
+            ("grouping", "grouping", CoverageGrouping, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("network", "network", str, False, None, False),
+            ("order", "order", int, False, None, False),
+            ("payor", "payor", fhirreference.FHIRReference, True, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("policyHolder", "policyHolder", fhirreference.FHIRReference, False, None, False),
+            ("relationship", "relationship", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", str, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("subscriber", "subscriber", fhirreference.FHIRReference, False, None, False),
+            ("subscriberId", "subscriberId", str, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class CoverageGrouping(backboneelement.BackboneElement):
+    """ Additional coverage classifications.
+    
+    A suite of underwrite specific classifiers, for example may be used to
+    identify a class of coverage or employer group, Policy, Plan.
+    """
+    
+    resource_type = "CoverageGrouping"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.classDisplay = None
+        """ Display text for the class.
+        Type `str`. """
+        
+        self.class_fhir = None
+        """ An identifier for the class.
+        Type `str`. """
+        
+        self.group = None
+        """ An identifier for the group.
+        Type `str`. """
+        
+        self.groupDisplay = None
+        """ Display text for an identifier for the group.
+        Type `str`. """
+        
+        self.plan = None
+        """ An identifier for the plan.
+        Type `str`. """
+        
+        self.planDisplay = None
+        """ Display text for the plan.
+        Type `str`. """
+        
+        self.subClass = None
+        """ An identifier for the subsection of the class.
+        Type `str`. """
+        
+        self.subClassDisplay = None
+        """ Display text for the subsection of the subclass.
+        Type `str`. """
+        
+        self.subGroup = None
+        """ An identifier for the subsection of the group.
+        Type `str`. """
+        
+        self.subGroupDisplay = None
+        """ Display text for the subsection of the group.
+        Type `str`. """
+        
+        self.subPlan = None
+        """ An identifier for the subsection of the plan.
+        Type `str`. """
+        
+        self.subPlanDisplay = None
+        """ Display text for the subsection of the plan.
+        Type `str`. """
+        
+        super(CoverageGrouping, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(CoverageGrouping, self).elementProperties()
+        js.extend([
+            ("classDisplay", "classDisplay", str, False, None, False),
+            ("class_fhir", "class", str, False, None, False),
+            ("group", "group", str, False, None, False),
+            ("groupDisplay", "groupDisplay", str, False, None, False),
+            ("plan", "plan", str, False, None, False),
+            ("planDisplay", "planDisplay", str, False, None, False),
+            ("subClass", "subClass", str, False, None, False),
+            ("subClassDisplay", "subClassDisplay", str, False, None, False),
+            ("subGroup", "subGroup", str, False, None, False),
+            ("subGroupDisplay", "subGroupDisplay", str, False, None, False),
+            ("subPlan", "subPlan", str, False, None, False),
+            ("subPlanDisplay", "subPlanDisplay", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/coverage_tests.py b/fhirclient/models/coverage_tests.py
new file mode 100644
index 0000000..94f2d37
--- /dev/null
+++ b/fhirclient/models/coverage_tests.py
@@ -0,0 +1,147 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import coverage
+from .fhirdate import FHIRDate
+
+
+class CoverageTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Coverage", js["resourceType"])
+        return coverage.Coverage(js)
+    
+    def testCoverage1(self):
+        inst = self.instantiate_from("coverage-example-2.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Coverage instance")
+        self.implCoverage1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Coverage", js["resourceType"])
+        inst2 = coverage.Coverage(js)
+        self.implCoverage1(inst2)
+    
+    def implCoverage1(self, inst):
+        self.assertEqual(inst.dependent, "1")
+        self.assertEqual(inst.grouping.group, "WESTAIR")
+        self.assertEqual(inst.grouping.groupDisplay, "Western Airlines")
+        self.assertEqual(inst.grouping.plan, "WESTAIR")
+        self.assertEqual(inst.grouping.planDisplay, "Western Airlines")
+        self.assertEqual(inst.grouping.subPlan, "D15C9")
+        self.assertEqual(inst.grouping.subPlanDisplay, "Platinum")
+        self.assertEqual(inst.id, "7546D")
+        self.assertEqual(inst.identifier[0].system, "http://xyz.com/codes/identifier")
+        self.assertEqual(inst.identifier[0].value, "AB98761")
+        self.assertEqual(inst.network, "5")
+        self.assertEqual(inst.order, 2)
+        self.assertEqual(inst.period.end.date, FHIRDate("2012-03-17").date)
+        self.assertEqual(inst.period.end.as_json(), "2012-03-17")
+        self.assertEqual(inst.period.start.date, FHIRDate("2011-03-17").date)
+        self.assertEqual(inst.period.start.as_json(), "2011-03-17")
+        self.assertEqual(inst.relationship.coding[0].code, "self")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.subscriberId, "AB9876")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the coverage</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "EHCPOL")
+        self.assertEqual(inst.type.coding[0].display, "extended healthcare")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v3/ActCode")
+    
+    def testCoverage2(self):
+        inst = self.instantiate_from("coverage-example-ehic.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Coverage instance")
+        self.implCoverage2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Coverage", js["resourceType"])
+        inst2 = coverage.Coverage(js)
+        self.implCoverage2(inst2)
+    
+    def implCoverage2(self, inst):
+        self.assertEqual(inst.id, "7547E")
+        self.assertEqual(inst.identifier[0].system, "http://ehic.com/insurer/123456789/member")
+        self.assertEqual(inst.identifier[0].value, "A123456780")
+        self.assertEqual(inst.period.end.date, FHIRDate("2012-03-17").date)
+        self.assertEqual(inst.period.end.as_json(), "2012-03-17")
+        self.assertEqual(inst.relationship.coding[0].code, "self")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the European Health Insurance Card</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "EHCPOL")
+        self.assertEqual(inst.type.coding[0].display, "extended healthcare")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v3/ActCode")
+    
+    def testCoverage3(self):
+        inst = self.instantiate_from("coverage-example-selfpay.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Coverage instance")
+        self.implCoverage3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Coverage", js["resourceType"])
+        inst2 = coverage.Coverage(js)
+        self.implCoverage3(inst2)
+    
+    def implCoverage3(self, inst):
+        self.assertEqual(inst.id, "SP1234")
+        self.assertEqual(inst.identifier[0].system, "http://hospitalx.com/selfpayagreement")
+        self.assertEqual(inst.identifier[0].value, "SP12345678")
+        self.assertEqual(inst.period.end.date, FHIRDate("2012-03-17").date)
+        self.assertEqual(inst.period.end.as_json(), "2012-03-17")
+        self.assertEqual(inst.relationship.coding[0].code, "self")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of a Self Pay Agreement.</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "pay")
+        self.assertEqual(inst.type.coding[0].display, "PAY")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/coverage-selfpay")
+    
+    def testCoverage4(self):
+        inst = self.instantiate_from("coverage-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Coverage instance")
+        self.implCoverage4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Coverage", js["resourceType"])
+        inst2 = coverage.Coverage(js)
+        self.implCoverage4(inst2)
+    
+    def implCoverage4(self, inst):
+        self.assertEqual(inst.dependent, "0")
+        self.assertEqual(inst.grouping.classDisplay, "Silver: Family Plan spouse only")
+        self.assertEqual(inst.grouping.class_fhir, "SILVER")
+        self.assertEqual(inst.grouping.group, "CBI35")
+        self.assertEqual(inst.grouping.groupDisplay, "Corporate Baker's Inc. Local #35")
+        self.assertEqual(inst.grouping.plan, "B37FC")
+        self.assertEqual(inst.grouping.planDisplay, "Full Coverage: Medical, Dental, Pharmacy, Vision, EHC")
+        self.assertEqual(inst.grouping.subClass, "Tier2")
+        self.assertEqual(inst.grouping.subClassDisplay, "Low deductable, max $20 copay")
+        self.assertEqual(inst.grouping.subGroup, "123")
+        self.assertEqual(inst.grouping.subGroupDisplay, "Trainee Part-time Benefits")
+        self.assertEqual(inst.grouping.subPlan, "P7")
+        self.assertEqual(inst.grouping.subPlanDisplay, "Includes afterlife benefits")
+        self.assertEqual(inst.id, "9876B1")
+        self.assertEqual(inst.identifier[0].system, "http://benefitsinc.com/certificate")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.period.end.date, FHIRDate("2012-05-23").date)
+        self.assertEqual(inst.period.end.as_json(), "2012-05-23")
+        self.assertEqual(inst.period.start.date, FHIRDate("2011-05-23").date)
+        self.assertEqual(inst.period.start.as_json(), "2011-05-23")
+        self.assertEqual(inst.relationship.coding[0].code, "self")
+        self.assertEqual(inst.sequence, "9")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the coverage</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "EHCPOL")
+        self.assertEqual(inst.type.coding[0].display, "extended healthcare")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v3/ActCode")
+
diff --git a/fhirclient/models/dataelement.py b/fhirclient/models/dataelement.py
new file mode 100644
index 0000000..63b7f7a
--- /dev/null
+++ b/fhirclient/models/dataelement.py
@@ -0,0 +1,189 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DataElement) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class DataElement(domainresource.DomainResource):
+    """ Resource data element.
+    
+    The formal description of a single piece of information that can be
+    gathered and reported.
+    """
+    
+    resource_type = "DataElement"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.element = None
+        """ Definition of element.
+        List of `ElementDefinition` items (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.identifier = None
+        """ Additional identifier for the data element.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for data element (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.mapping = None
+        """ External specification mapped to.
+        List of `DataElementMapping` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this data element (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.stringency = None
+        """ comparable | fully-specified | equivalent | convertable | scaleable
+        | flexible.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this data element (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this data element (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the data element.
+        Type `str`. """
+        
+        super(DataElement, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DataElement, self).elementProperties()
+        js.extend([
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("element", "element", elementdefinition.ElementDefinition, True, None, True),
+            ("experimental", "experimental", bool, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("mapping", "mapping", DataElementMapping, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("stringency", "stringency", str, False, None, False),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class DataElementMapping(backboneelement.BackboneElement):
+    """ External specification mapped to.
+    
+    Identifies a specification (other than a terminology) that the elements
+    which make up the DataElement have some correspondence with.
+    """
+    
+    resource_type = "DataElementMapping"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.comment = None
+        """ Versions, issues, scope limitations, etc..
+        Type `str`. """
+        
+        self.identity = None
+        """ Internal id when this mapping is used.
+        Type `str`. """
+        
+        self.name = None
+        """ Names what this mapping refers to.
+        Type `str`. """
+        
+        self.uri = None
+        """ Identifies what this mapping refers to.
+        Type `str`. """
+        
+        super(DataElementMapping, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DataElementMapping, self).elementProperties()
+        js.extend([
+            ("comment", "comment", str, False, None, False),
+            ("identity", "identity", str, False, None, True),
+            ("name", "name", str, False, None, False),
+            ("uri", "uri", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import elementdefinition
+except ImportError:
+    elementdefinition = sys.modules[__package__ + '.elementdefinition']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/dataelement_tests.py b/fhirclient/models/dataelement_tests.py
new file mode 100644
index 0000000..9ac746c
--- /dev/null
+++ b/fhirclient/models/dataelement_tests.py
@@ -0,0 +1,110 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import dataelement
+from .fhirdate import FHIRDate
+
+
+class DataElementTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("DataElement", js["resourceType"])
+        return dataelement.DataElement(js)
+    
+    def testDataElement1(self):
+        inst = self.instantiate_from("dataelement-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DataElement instance")
+        self.implDataElement1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DataElement", js["resourceType"])
+        inst2 = dataelement.DataElement(js)
+        self.implDataElement1(inst2)
+    
+    def implDataElement1(self, inst):
+        self.assertEqual(inst.contained[0].id, "2179414")
+        self.assertEqual(inst.contained[1].id, "2179414-permitted")
+        self.assertEqual(inst.contained[2].id, "2179414-cm")
+        self.assertEqual(inst.date.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.date.as_json(), "2016-01-01")
+        self.assertEqual(inst.element[0].binding.strength, "required")
+        self.assertEqual(inst.element[0].code[0].code, "46098-0")
+        self.assertEqual(inst.element[0].code[0].display, "Sex")
+        self.assertEqual(inst.element[0].code[0].system, "http://loinc.org")
+        self.assertEqual(inst.element[0].definition, "The code representing the gender of a person.")
+        self.assertEqual(inst.element[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/minLength")
+        self.assertEqual(inst.element[0].extension[0].valueInteger, 1)
+        self.assertEqual(inst.element[0].extension[1].url, "http://hl7.org/fhir/StructureDefinition/elementdefinition-question")
+        self.assertEqual(inst.element[0].extension[1].valueString, "Gender")
+        self.assertEqual(inst.element[0].mapping[0].identity, "fhir")
+        self.assertEqual(inst.element[0].mapping[0].language, "application/xquery")
+        self.assertEqual(inst.element[0].mapping[0].map, "return f:/Patient/f:gender")
+        self.assertEqual(inst.element[0].maxLength, 13)
+        self.assertEqual(inst.element[0].path, "Gender")
+        self.assertEqual(inst.element[0].type[0].code, "CodeableConcept")
+        self.assertEqual(inst.id, "gender")
+        self.assertEqual(inst.identifier[0].value, "2179650")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.mapping[0].identity, "fhir")
+        self.assertEqual(inst.mapping[0].name, "Fast Healthcare Interoperable Resources (FHIR)")
+        self.assertEqual(inst.mapping[0].uri, "http://hl7.org/fhir/api")
+        self.assertEqual(inst.name, "Gender Code")
+        self.assertEqual(inst.publisher, "DCP")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Administrative gender")
+        self.assertEqual(inst.version, "1.0")
+    
+    def testDataElement2(self):
+        inst = self.instantiate_from("dataelement-labtestmaster-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DataElement instance")
+        self.implDataElement2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DataElement", js["resourceType"])
+        inst2 = dataelement.DataElement(js)
+        self.implDataElement2(inst2)
+    
+    def implDataElement2(self, inst):
+        self.assertEqual(inst.element[0].alias[0], "Protime, PT")
+        self.assertEqual(inst.element[0].comment, "Used to screen the integrity of the extrinsic and common pathways of coagulation and to monitor warfarin anticoagulation. ")
+        self.assertEqual(inst.element[0].definition, "The PT test evaluates the extrinsic and common pathways of the coagulation cascade.")
+        self.assertEqual(inst.element[0].example[0].label, "Simple")
+        self.assertEqual(inst.element[0].example[0].valueDecimal, 10.0)
+        self.assertEqual(inst.element[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits")
+        self.assertEqual(inst.element[0].extension[0].valueCodeableConcept.coding[0].code, "s")
+        self.assertEqual(inst.element[0].extension[0].valueCodeableConcept.coding[0].display, "second")
+        self.assertEqual(inst.element[0].extension[0].valueCodeableConcept.coding[0].system, "http://unitsofmeasure.org")
+        self.assertTrue(inst.element[0].extension[0].valueCodeableConcept.coding[0].userSelected)
+        self.assertEqual(inst.element[0].extension[0].valueCodeableConcept.coding[0].version, "1.9")
+        self.assertEqual(inst.element[0].extension[0].valueCodeableConcept.text, "second")
+        self.assertEqual(inst.element[0].mapping[0].identity, "loinc")
+        self.assertEqual(inst.element[0].mapping[0].map, "5964-2")
+        self.assertEqual(inst.element[0].path, "prothrombin")
+        self.assertEqual(inst.element[0].requirements, "This test is orderable. A plasma specimen in a 3.2% sodium citrate blue top tube is required.")
+        self.assertEqual(inst.element[0].type[0].code, "decimal")
+        self.assertEqual(inst.id, "prothrombin")
+        self.assertEqual(inst.identifier[0].period.start.date, FHIRDate("2011-05-19").date)
+        self.assertEqual(inst.identifier[0].period.start.as_json(), "2011-05-19")
+        self.assertEqual(inst.identifier[0].system, "http://www.CenturyHospital/Laboratory/DirectoryofServices")
+        self.assertEqual(inst.identifier[0].type.text, "Prothrombin Time, PT")
+        self.assertEqual(inst.identifier[0].value, "11")
+        self.assertEqual(inst.mapping[0].comment, "Version 2.48 or later")
+        self.assertEqual(inst.mapping[0].identity, "loinc")
+        self.assertEqual(inst.mapping[0].name, "LOINC")
+        self.assertEqual(inst.mapping[0].uri, "http://loinc.org/")
+        self.assertEqual(inst.name, "Prothrombin Time")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/datarequirement.py b/fhirclient/models/datarequirement.py
new file mode 100644
index 0000000..0a5d372
--- /dev/null
+++ b/fhirclient/models/datarequirement.py
@@ -0,0 +1,188 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DataRequirement) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class DataRequirement(element.Element):
+    """ Describes a required data item.
+    
+    Describes a required data item for evaluation in terms of the type of data,
+    and optional code or date-based filters of the data.
+    """
+    
+    resource_type = "DataRequirement"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.codeFilter = None
+        """ What codes are expected.
+        List of `DataRequirementCodeFilter` items (represented as `dict` in JSON). """
+        
+        self.dateFilter = None
+        """ What dates/date ranges are expected.
+        List of `DataRequirementDateFilter` items (represented as `dict` in JSON). """
+        
+        self.mustSupport = None
+        """ Indicates that specific structure elements are referenced by the
+        knowledge module.
+        List of `str` items. """
+        
+        self.profile = None
+        """ The profile of the required data.
+        List of `str` items. """
+        
+        self.type = None
+        """ The type of the required data.
+        Type `str`. """
+        
+        super(DataRequirement, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DataRequirement, self).elementProperties()
+        js.extend([
+            ("codeFilter", "codeFilter", DataRequirementCodeFilter, True, None, False),
+            ("dateFilter", "dateFilter", DataRequirementDateFilter, True, None, False),
+            ("mustSupport", "mustSupport", str, True, None, False),
+            ("profile", "profile", str, True, None, False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+class DataRequirementCodeFilter(element.Element):
+    """ What codes are expected.
+    
+    Code filters specify additional constraints on the data, specifying the
+    value set of interest for a particular element of the data.
+    """
+    
+    resource_type = "DataRequirementCodeFilter"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.path = None
+        """ The code-valued attribute of the filter.
+        Type `str`. """
+        
+        self.valueCode = None
+        """ What code is expected.
+        List of `str` items. """
+        
+        self.valueCodeableConcept = None
+        """ What CodeableConcept is expected.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.valueCoding = None
+        """ What Coding is expected.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.valueSetReference = None
+        """ Valueset for the filter.
+        Type `FHIRReference` referencing `ValueSet` (represented as `dict` in JSON). """
+        
+        self.valueSetString = None
+        """ Valueset for the filter.
+        Type `str`. """
+        
+        super(DataRequirementCodeFilter, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DataRequirementCodeFilter, self).elementProperties()
+        js.extend([
+            ("path", "path", str, False, None, True),
+            ("valueCode", "valueCode", str, True, None, False),
+            ("valueCodeableConcept", "valueCodeableConcept", codeableconcept.CodeableConcept, True, None, False),
+            ("valueCoding", "valueCoding", coding.Coding, True, None, False),
+            ("valueSetReference", "valueSetReference", fhirreference.FHIRReference, False, "valueSet", False),
+            ("valueSetString", "valueSetString", str, False, "valueSet", False),
+        ])
+        return js
+
+
+class DataRequirementDateFilter(element.Element):
+    """ What dates/date ranges are expected.
+    
+    Date filters specify additional constraints on the data in terms of the
+    applicable date range for specific elements.
+    """
+    
+    resource_type = "DataRequirementDateFilter"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.path = None
+        """ The date-valued attribute of the filter.
+        Type `str`. """
+        
+        self.valueDateTime = None
+        """ The value of the filter, as a Period, DateTime, or Duration value.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDuration = None
+        """ The value of the filter, as a Period, DateTime, or Duration value.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.valuePeriod = None
+        """ The value of the filter, as a Period, DateTime, or Duration value.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(DataRequirementDateFilter, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DataRequirementDateFilter, self).elementProperties()
+        js.extend([
+            ("path", "path", str, False, None, True),
+            ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", False),
+            ("valueDuration", "valueDuration", duration.Duration, False, "value", False),
+            ("valuePeriod", "valuePeriod", period.Period, False, "value", False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/detectedissue.py b/fhirclient/models/detectedissue.py
new file mode 100644
index 0000000..fb82ba7
--- /dev/null
+++ b/fhirclient/models/detectedissue.py
@@ -0,0 +1,154 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DetectedIssue) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class DetectedIssue(domainresource.DomainResource):
+    """ Clinical issue with action.
+    
+    Indicates an actual or potential clinical issue with or between one or more
+    active or proposed clinical actions for a patient; e.g. Drug-drug
+    interaction, Ineffective treatment frequency, Procedure-condition conflict,
+    etc.
+    """
+    
+    resource_type = "DetectedIssue"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.author = None
+        """ The provider or device that identified the issue.
+        Type `FHIRReference` referencing `Practitioner, Device` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Issue Category, e.g. drug-drug, duplicate therapy, etc..
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ When identified.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.detail = None
+        """ Description and context.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Unique id for the detected issue.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.implicated = None
+        """ Problem resource.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.mitigation = None
+        """ Step taken to address.
+        List of `DetectedIssueMitigation` items (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ Associated patient.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.reference = None
+        """ Authority for issue.
+        Type `str`. """
+        
+        self.severity = None
+        """ high | moderate | low.
+        Type `str`. """
+        
+        self.status = None
+        """ registered | preliminary | final | amended +.
+        Type `str`. """
+        
+        super(DetectedIssue, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DetectedIssue, self).elementProperties()
+        js.extend([
+            ("author", "author", fhirreference.FHIRReference, False, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("detail", "detail", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("implicated", "implicated", fhirreference.FHIRReference, True, None, False),
+            ("mitigation", "mitigation", DetectedIssueMitigation, True, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, False),
+            ("reference", "reference", str, False, None, False),
+            ("severity", "severity", str, False, None, False),
+            ("status", "status", str, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class DetectedIssueMitigation(backboneelement.BackboneElement):
+    """ Step taken to address.
+    
+    Indicates an action that has been taken or is committed to to reduce or
+    eliminate the likelihood of the risk identified by the detected issue from
+    manifesting.  Can also reflect an observation of known mitigating factors
+    that may reduce/eliminate the need for any action.
+    """
+    
+    resource_type = "DetectedIssueMitigation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ What mitigation?.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.author = None
+        """ Who is committing?.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Date committed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(DetectedIssueMitigation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DetectedIssueMitigation, self).elementProperties()
+        js.extend([
+            ("action", "action", codeableconcept.CodeableConcept, False, None, True),
+            ("author", "author", fhirreference.FHIRReference, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/detectedissue_tests.py b/fhirclient/models/detectedissue_tests.py
new file mode 100644
index 0000000..731fb0a
--- /dev/null
+++ b/fhirclient/models/detectedissue_tests.py
@@ -0,0 +1,107 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import detectedissue
+from .fhirdate import FHIRDate
+
+
+class DetectedIssueTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("DetectedIssue", js["resourceType"])
+        return detectedissue.DetectedIssue(js)
+    
+    def testDetectedIssue1(self):
+        inst = self.instantiate_from("detectedissue-example-allergy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DetectedIssue instance")
+        self.implDetectedIssue1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DetectedIssue", js["resourceType"])
+        inst2 = detectedissue.DetectedIssue(js)
+        self.implDetectedIssue1(inst2)
+    
+    def implDetectedIssue1(self, inst):
+        self.assertEqual(inst.id, "allergy")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDetectedIssue2(self):
+        inst = self.instantiate_from("detectedissue-example-dup.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DetectedIssue instance")
+        self.implDetectedIssue2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DetectedIssue", js["resourceType"])
+        inst2 = detectedissue.DetectedIssue(js)
+        self.implDetectedIssue2(inst2)
+    
+    def implDetectedIssue2(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "DUPTHPY")
+        self.assertEqual(inst.category.coding[0].display, "Duplicate Therapy Alert")
+        self.assertEqual(inst.category.coding[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.date.date, FHIRDate("2013-05-08").date)
+        self.assertEqual(inst.date.as_json(), "2013-05-08")
+        self.assertEqual(inst.detail, "Similar test was performed within the past 14 days")
+        self.assertEqual(inst.id, "duplicate")
+        self.assertEqual(inst.identifier.system, "http://example.org")
+        self.assertEqual(inst.identifier.use, "official")
+        self.assertEqual(inst.identifier.value, "12345")
+        self.assertEqual(inst.reference, "http://www.tmhp.com/RadiologyClinicalDecisionSupport/2011/CHEST%20IMAGING%20GUIDELINES%202011.pdf")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDetectedIssue3(self):
+        inst = self.instantiate_from("detectedissue-example-lab.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DetectedIssue instance")
+        self.implDetectedIssue3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DetectedIssue", js["resourceType"])
+        inst2 = detectedissue.DetectedIssue(js)
+        self.implDetectedIssue3(inst2)
+    
+    def implDetectedIssue3(self, inst):
+        self.assertEqual(inst.id, "lab")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDetectedIssue4(self):
+        inst = self.instantiate_from("detectedissue-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DetectedIssue instance")
+        self.implDetectedIssue4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DetectedIssue", js["resourceType"])
+        inst2 = detectedissue.DetectedIssue(js)
+        self.implDetectedIssue4(inst2)
+    
+    def implDetectedIssue4(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "DRG")
+        self.assertEqual(inst.category.coding[0].display, "Drug Interaction Alert")
+        self.assertEqual(inst.category.coding[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.date.date, FHIRDate("2014-01-05").date)
+        self.assertEqual(inst.date.as_json(), "2014-01-05")
+        self.assertEqual(inst.id, "ddi")
+        self.assertEqual(inst.mitigation[0].action.coding[0].code, "13")
+        self.assertEqual(inst.mitigation[0].action.coding[0].display, "Stopped Concurrent Therapy")
+        self.assertEqual(inst.mitigation[0].action.coding[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.mitigation[0].action.text, "Asked patient to discontinue regular use of Tylenol and to consult with clinician if they need to resume to allow appropriate INR monitoring")
+        self.assertEqual(inst.mitigation[0].date.date, FHIRDate("2014-01-05").date)
+        self.assertEqual(inst.mitigation[0].date.as_json(), "2014-01-05")
+        self.assertEqual(inst.severity, "high")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/device.py b/fhirclient/models/device.py
new file mode 100644
index 0000000..c86ebc8
--- /dev/null
+++ b/fhirclient/models/device.py
@@ -0,0 +1,213 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Device) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Device(domainresource.DomainResource):
+    """ Item used in healthcare.
+    
+    This resource identifies an instance or a type of a manufactured item that
+    is used in the provision of healthcare without being substantially changed
+    through that activity. The device may be a medical or non-medical device.
+    Medical devices include durable (reusable) medical equipment, implantable
+    devices, as well as disposable equipment used for diagnostic, treatment,
+    and research for healthcare and public health.  Non-medical devices may
+    include items such as a machine, cellphone, computer, application, etc.
+    """
+    
+    resource_type = "Device"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contact = None
+        """ Details for human/organization for support.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        self.expirationDate = None
+        """ Date and time of expiry of this device (if applicable).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.identifier = None
+        """ Instance identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.location = None
+        """ Where the resource is found.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.lotNumber = None
+        """ Lot number of manufacture.
+        Type `str`. """
+        
+        self.manufactureDate = None
+        """ Date when the device was made.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.manufacturer = None
+        """ Name of device manufacturer.
+        Type `str`. """
+        
+        self.model = None
+        """ Model id assigned by the manufacturer.
+        Type `str`. """
+        
+        self.note = None
+        """ Device notes and comments.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.owner = None
+        """ Organization responsible for device.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ Patient to whom Device is affixed.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.safety = None
+        """ Safety Characteristics of Device.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | inactive | entered-in-error | unknown.
+        Type `str`. """
+        
+        self.type = None
+        """ What kind of device this is.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.udi = None
+        """ Unique Device Identifier (UDI) Barcode string.
+        Type `DeviceUdi` (represented as `dict` in JSON). """
+        
+        self.url = None
+        """ Network address to contact device.
+        Type `str`. """
+        
+        self.version = None
+        """ Version number (i.e. software).
+        Type `str`. """
+        
+        super(Device, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Device, self).elementProperties()
+        js.extend([
+            ("contact", "contact", contactpoint.ContactPoint, True, None, False),
+            ("expirationDate", "expirationDate", fhirdate.FHIRDate, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("location", "location", fhirreference.FHIRReference, False, None, False),
+            ("lotNumber", "lotNumber", str, False, None, False),
+            ("manufactureDate", "manufactureDate", fhirdate.FHIRDate, False, None, False),
+            ("manufacturer", "manufacturer", str, False, None, False),
+            ("model", "model", str, False, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("owner", "owner", fhirreference.FHIRReference, False, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, False),
+            ("safety", "safety", codeableconcept.CodeableConcept, True, None, False),
+            ("status", "status", str, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+            ("udi", "udi", DeviceUdi, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class DeviceUdi(backboneelement.BackboneElement):
+    """ Unique Device Identifier (UDI) Barcode string.
+    
+    [Unique device identifier (UDI)](device.html#5.11.3.2.2) assigned to device
+    label or package.
+    """
+    
+    resource_type = "DeviceUdi"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.carrierAIDC = None
+        """ UDI Machine Readable Barcode String.
+        Type `str`. """
+        
+        self.carrierHRF = None
+        """ UDI Human Readable Barcode String.
+        Type `str`. """
+        
+        self.deviceIdentifier = None
+        """ Mandatory fixed portion of UDI.
+        Type `str`. """
+        
+        self.entryType = None
+        """ barcode | rfid | manual +.
+        Type `str`. """
+        
+        self.issuer = None
+        """ UDI Issuing Organization.
+        Type `str`. """
+        
+        self.jurisdiction = None
+        """ Regional UDI authority.
+        Type `str`. """
+        
+        self.name = None
+        """ Device Name as appears on UDI label.
+        Type `str`. """
+        
+        super(DeviceUdi, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DeviceUdi, self).elementProperties()
+        js.extend([
+            ("carrierAIDC", "carrierAIDC", str, False, None, False),
+            ("carrierHRF", "carrierHRF", str, False, None, False),
+            ("deviceIdentifier", "deviceIdentifier", str, False, None, False),
+            ("entryType", "entryType", str, False, None, False),
+            ("issuer", "issuer", str, False, None, False),
+            ("jurisdiction", "jurisdiction", str, False, None, False),
+            ("name", "name", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/device_tests.py b/fhirclient/models/device_tests.py
new file mode 100644
index 0000000..bd1c732
--- /dev/null
+++ b/fhirclient/models/device_tests.py
@@ -0,0 +1,265 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import device
+from .fhirdate import FHIRDate
+
+
+class DeviceTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Device", js["resourceType"])
+        return device.Device(js)
+    
+    def testDevice1(self):
+        inst = self.instantiate_from("device-example-f001-feedingtube.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Device instance")
+        self.implDevice1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Device", js["resourceType"])
+        inst2 = device.Device(js)
+        self.implDevice1(inst2)
+    
+    def implDevice1(self, inst):
+        self.assertEqual(inst.expirationDate.date, FHIRDate("2020-08-08").date)
+        self.assertEqual(inst.expirationDate.as_json(), "2020-08-08")
+        self.assertEqual(inst.id, "f001")
+        self.assertEqual(inst.identifier[0].system, "http:/goodhealthhospital/identifier/devices")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.manufactureDate.date, FHIRDate("2015-08-08").date)
+        self.assertEqual(inst.manufactureDate.as_json(), "2015-08-08")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "25062003")
+        self.assertEqual(inst.type.coding[0].display, "Feeding tube, device")
+        self.assertEqual(inst.type.coding[0].system, "http://snomed.info/sct")
+    
+    def testDevice2(self):
+        inst = self.instantiate_from("device-example-ihe-pcd.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Device instance")
+        self.implDevice2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Device", js["resourceType"])
+        inst2 = device.Device(js)
+        self.implDevice2(inst2)
+    
+    def implDevice2(self, inst):
+        self.assertEqual(inst.id, "ihe-pcd")
+        self.assertEqual(inst.identifier[0].type.coding[0].code, "SNO")
+        self.assertEqual(inst.identifier[0].type.coding[0].system, "http://hl7.org/fhir/identifier-type")
+        self.assertEqual(inst.identifier[0].type.text, "Serial Number")
+        self.assertEqual(inst.identifier[0].value, "AMID-123-456")
+        self.assertEqual(inst.lotNumber, "12345")
+        self.assertEqual(inst.manufacturer, "Acme Devices, Inc")
+        self.assertEqual(inst.model, "A.1.1")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.text, "Vital Signs Monitor")
+    
+    def testDevice3(self):
+        inst = self.instantiate_from("device-example-pacemaker.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Device instance")
+        self.implDevice3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Device", js["resourceType"])
+        inst2 = device.Device(js)
+        self.implDevice3(inst2)
+    
+    def implDevice3(self, inst):
+        self.assertEqual(inst.contact[0].system, "phone")
+        self.assertEqual(inst.contact[0].value, "ext 4352")
+        self.assertEqual(inst.id, "example-pacemaker")
+        self.assertEqual(inst.identifier[0].system, "http://acme.com/devices/pacemakers/octane/serial")
+        self.assertEqual(inst.identifier[0].value, "1234-5678-90AB-CDEF")
+        self.assertEqual(inst.lotNumber, "1234-5678")
+        self.assertEqual(inst.manufacturer, "Acme Devices, Inc")
+        self.assertEqual(inst.model, "PM/Octane 2014")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "octane2014")
+        self.assertEqual(inst.type.coding[0].display, "Performance pace maker for high octane patients")
+        self.assertEqual(inst.type.coding[0].system, "http://acme.com/devices")
+    
+    def testDevice4(self):
+        inst = self.instantiate_from("device-example-software.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Device instance")
+        self.implDevice4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Device", js["resourceType"])
+        inst2 = device.Device(js)
+        self.implDevice4(inst2)
+    
+    def implDevice4(self, inst):
+        self.assertEqual(inst.contact[0].system, "url")
+        self.assertEqual(inst.contact[0].value, "http://acme.com")
+        self.assertEqual(inst.id, "software")
+        self.assertEqual(inst.identifier[0].system, "http://acme.com/ehr/client-ids")
+        self.assertEqual(inst.identifier[0].value, "goodhealth")
+        self.assertEqual(inst.manufacturer, "Acme Devices, Inc")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.text, "EHR")
+        self.assertEqual(inst.url, "http://acme.com/goodhealth/ehr/")
+        self.assertEqual(inst.version, "10.23-23423")
+    
+    def testDevice5(self):
+        inst = self.instantiate_from("device-example-udi1.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Device instance")
+        self.implDevice5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Device", js["resourceType"])
+        inst2 = device.Device(js)
+        self.implDevice5(inst2)
+    
+    def implDevice5(self, inst):
+        self.assertEqual(inst.expirationDate.date, FHIRDate("2014-11-20").date)
+        self.assertEqual(inst.expirationDate.as_json(), "2014-11-20")
+        self.assertEqual(inst.id, "example-udi1")
+        self.assertEqual(inst.identifier[0].system, "http://acme.com/devices/pacemakers/octane/serial")
+        self.assertEqual(inst.identifier[0].value, "1234-5678-90AB-CDEF")
+        self.assertEqual(inst.identifier[1].type.coding[0].code, "SNO")
+        self.assertEqual(inst.identifier[1].type.coding[0].system, "http://hl7.org/fhir/identifier-type")
+        self.assertEqual(inst.identifier[1].value, "10987654d321")
+        self.assertEqual(inst.lotNumber, "7654321D")
+        self.assertEqual(inst.manufacturer, "Acme Devices, Inc")
+        self.assertEqual(inst.model, "PM/Octane 2014")
+        self.assertEqual(inst.safety[0].coding[0].code, "mr-unsafe")
+        self.assertEqual(inst.safety[0].coding[0].display, "MR Unsafe")
+        self.assertEqual(inst.safety[0].coding[0].system, "urn:oid:2.16.840.1.113883.3.26.1.1")
+        self.assertEqual(inst.safety[0].text, "MR Unsafe")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "468063009")
+        self.assertEqual(inst.type.coding[0].display, "Coated femoral stem prosthesis, modular")
+        self.assertEqual(inst.type.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.type.text, "Coated femoral stem prosthesis, modular")
+        self.assertEqual(inst.udi.carrierAIDC, "XWQyMDExMDg1NzY3NDAwMjAxNzE3MTQxMTIwMTBOWUZVTDAx4oaUMjExOTI4MzfihpQ3MTNBMUIyQzNENEU1RjZH")
+        self.assertEqual(inst.udi.carrierHRF, "{01}00844588003288{17}141120{10}7654321D{21}10987654d321")
+        self.assertEqual(inst.udi.deviceIdentifier, "00844588003288")
+        self.assertEqual(inst.udi.entryType, "barcode")
+        self.assertEqual(inst.udi.issuer, "http://hl7.org/fhir/NamingSystem/gs1")
+        self.assertEqual(inst.udi.jurisdiction, "http://hl7.org/fhir/NamingSystem/fda-udi")
+        self.assertEqual(inst.udi.name, "FHIR® Hip System")
+    
+    def testDevice6(self):
+        inst = self.instantiate_from("device-example-udi2.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Device instance")
+        self.implDevice6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Device", js["resourceType"])
+        inst2 = device.Device(js)
+        self.implDevice6(inst2)
+    
+    def implDevice6(self, inst):
+        self.assertEqual(inst.expirationDate.date, FHIRDate("2014-02-01").date)
+        self.assertEqual(inst.expirationDate.as_json(), "2014-02-01")
+        self.assertEqual(inst.extension[0].url, "http://hl7.org/fhir/StructureDefinition/device-din")
+        self.assertEqual(inst.extension[0].valueIdentifier.system, "http://hl7.org/fhir/NamingSystem/iccbba-din")
+        self.assertEqual(inst.extension[0].valueIdentifier.value, "A99971312345600")
+        self.assertEqual(inst.id, "example-udi2")
+        self.assertEqual(inst.manufactureDate.date, FHIRDate("2013-02-01").date)
+        self.assertEqual(inst.manufactureDate.as_json(), "2013-02-01")
+        self.assertEqual(inst.manufacturer, "Acme Devices, Inc")
+        self.assertEqual(inst.status, "inactive")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.udi.deviceIdentifier, "A9999XYZ100T0474")
+        self.assertEqual(inst.udi.issuer, "http://hl7.org/fhir/NamingSystem/iccbba-other")
+        self.assertEqual(inst.udi.jurisdiction, "http://hl7.org/fhir/NamingSystem/fda-udi")
+        self.assertEqual(inst.udi.name, "Bone,Putty Demineralized")
+    
+    def testDevice7(self):
+        inst = self.instantiate_from("device-example-udi3.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Device instance")
+        self.implDevice7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Device", js["resourceType"])
+        inst2 = device.Device(js)
+        self.implDevice7(inst2)
+    
+    def implDevice7(self, inst):
+        self.assertEqual(inst.expirationDate.date, FHIRDate("2020-02-02").date)
+        self.assertEqual(inst.expirationDate.as_json(), "2020-02-02")
+        self.assertEqual(inst.id, "example-udi3")
+        self.assertEqual(inst.identifier[0].type.coding[0].code, "SNO")
+        self.assertEqual(inst.identifier[0].type.coding[0].system, "http://hl7.org/fhir/identifier-type")
+        self.assertEqual(inst.identifier[0].value, "XYZ456789012345678")
+        self.assertEqual(inst.lotNumber, "LOT123456789012345")
+        self.assertEqual(inst.manufactureDate.date, FHIRDate("2013-02-02").date)
+        self.assertEqual(inst.manufactureDate.as_json(), "2013-02-02")
+        self.assertEqual(inst.manufacturer, "GlobalMed, Inc")
+        self.assertEqual(inst.model, "Ultra Implantable")
+        self.assertEqual(inst.status, "inactive")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.udi.carrierHRF, "+H123PARTNO1234567890120/$$420020216LOT123456789012345/SXYZ456789012345678/16D20130202C")
+        self.assertEqual(inst.udi.entryType, "manual")
+        self.assertEqual(inst.udi.issuer, "http://hl7.org/fhir/NamingSystem/hibcc")
+        self.assertEqual(inst.udi.jurisdiction, "http://hl7.org/fhir/NamingSystem/fda-udi")
+        self.assertEqual(inst.udi.name, "FHIR® Ulltra Implantable")
+    
+    def testDevice8(self):
+        inst = self.instantiate_from("device-example-udi4.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Device instance")
+        self.implDevice8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Device", js["resourceType"])
+        inst2 = device.Device(js)
+        self.implDevice8(inst2)
+    
+    def implDevice8(self, inst):
+        self.assertEqual(inst.id, "example-udi4")
+        self.assertEqual(inst.lotNumber, "RZ12345678")
+        self.assertEqual(inst.manufacturer, "GlobalMed, Inc")
+        self.assertEqual(inst.status, "inactive")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.udi.carrierHRF, "=)1TE123456A&)RZ12345678")
+        self.assertEqual(inst.udi.issuer, "http://hl7.org/fhir/NamingSystem/iccbba-blood")
+        self.assertEqual(inst.udi.jurisdiction, "http://hl7.org/fhir/NamingSystem/fda-udi")
+    
+    def testDevice9(self):
+        inst = self.instantiate_from("device-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Device instance")
+        self.implDevice9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Device", js["resourceType"])
+        inst2 = device.Device(js)
+        self.implDevice9(inst2)
+    
+    def implDevice9(self, inst):
+        self.assertEqual(inst.contact[0].system, "phone")
+        self.assertEqual(inst.contact[0].value, "ext 4352")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http://goodcare.org/devices/id")
+        self.assertEqual(inst.identifier[0].value, "345675")
+        self.assertEqual(inst.identifier[1].type.coding[0].code, "SNO")
+        self.assertEqual(inst.identifier[1].type.coding[0].system, "http://hl7.org/fhir/identifier-type")
+        self.assertEqual(inst.identifier[1].type.text, "Serial Number")
+        self.assertEqual(inst.identifier[1].value, "AMID-342135-8464")
+        self.assertEqual(inst.lotNumber, "43453424")
+        self.assertEqual(inst.manufacturer, "Acme Devices, Inc")
+        self.assertEqual(inst.model, "AB 45-J")
+        self.assertEqual(inst.note[0].text, "QA Checked")
+        self.assertEqual(inst.note[0].time.date, FHIRDate("2015-06-28T14:03:32+10:00").date)
+        self.assertEqual(inst.note[0].time.as_json(), "2015-06-28T14:03:32+10:00")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "86184003")
+        self.assertEqual(inst.type.coding[0].display, "Electrocardiographic monitor and recorder")
+        self.assertEqual(inst.type.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.type.text, "ECG")
+
diff --git a/fhirclient/models/devicecomponent.py b/fhirclient/models/devicecomponent.py
new file mode 100644
index 0000000..9ba524c
--- /dev/null
+++ b/fhirclient/models/devicecomponent.py
@@ -0,0 +1,150 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DeviceComponent) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class DeviceComponent(domainresource.DomainResource):
+    """ An instance of a medical-related component of a medical device.
+    
+    The characteristics, operational status and capabilities of a medical-
+    related component of a medical device.
+    """
+    
+    resource_type = "DeviceComponent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.identifier = None
+        """ Instance id assigned by the software stack.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.languageCode = None
+        """ Language code for the human-readable text strings produced by the
+        device.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.lastSystemChange = None
+        """ Recent system change timestamp.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.measurementPrinciple = None
+        """ other | chemical | electrical | impedance | nuclear | optical |
+        thermal | biological | mechanical | acoustical | manual+.
+        Type `str`. """
+        
+        self.operationalStatus = None
+        """ Current operational status of the component, for example On, Off or
+        Standby.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.parameterGroup = None
+        """ Current supported parameter group.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.parent = None
+        """ Parent resource link.
+        Type `FHIRReference` referencing `DeviceComponent` (represented as `dict` in JSON). """
+        
+        self.productionSpecification = None
+        """ Specification details such as Component Revisions, or Serial
+        Numbers.
+        List of `DeviceComponentProductionSpecification` items (represented as `dict` in JSON). """
+        
+        self.source = None
+        """ Top-level device resource link.
+        Type `FHIRReference` referencing `Device` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ What kind of component it is.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(DeviceComponent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DeviceComponent, self).elementProperties()
+        js.extend([
+            ("identifier", "identifier", identifier.Identifier, False, None, True),
+            ("languageCode", "languageCode", codeableconcept.CodeableConcept, False, None, False),
+            ("lastSystemChange", "lastSystemChange", fhirdate.FHIRDate, False, None, False),
+            ("measurementPrinciple", "measurementPrinciple", str, False, None, False),
+            ("operationalStatus", "operationalStatus", codeableconcept.CodeableConcept, True, None, False),
+            ("parameterGroup", "parameterGroup", codeableconcept.CodeableConcept, False, None, False),
+            ("parent", "parent", fhirreference.FHIRReference, False, None, False),
+            ("productionSpecification", "productionSpecification", DeviceComponentProductionSpecification, True, None, False),
+            ("source", "source", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class DeviceComponentProductionSpecification(backboneelement.BackboneElement):
+    """ Specification details such as Component Revisions, or Serial Numbers.
+    
+    The production specification such as component revision, serial number,
+    etc.
+    """
+    
+    resource_type = "DeviceComponentProductionSpecification"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.componentId = None
+        """ Internal component unique identification.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.productionSpec = None
+        """ A printable string defining the component.
+        Type `str`. """
+        
+        self.specType = None
+        """ Type or kind of production specification, for example serial number
+        or software revision.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(DeviceComponentProductionSpecification, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DeviceComponentProductionSpecification, self).elementProperties()
+        js.extend([
+            ("componentId", "componentId", identifier.Identifier, False, None, False),
+            ("productionSpec", "productionSpec", str, False, None, False),
+            ("specType", "specType", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/devicecomponent_tests.py b/fhirclient/models/devicecomponent_tests.py
new file mode 100644
index 0000000..14b6deb
--- /dev/null
+++ b/fhirclient/models/devicecomponent_tests.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import devicecomponent
+from .fhirdate import FHIRDate
+
+
+class DeviceComponentTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("DeviceComponent", js["resourceType"])
+        return devicecomponent.DeviceComponent(js)
+    
+    def testDeviceComponent1(self):
+        inst = self.instantiate_from("devicecomponent-example-prodspec.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DeviceComponent instance")
+        self.implDeviceComponent1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DeviceComponent", js["resourceType"])
+        inst2 = devicecomponent.DeviceComponent(js)
+        self.implDeviceComponent1(inst2)
+    
+    def implDeviceComponent1(self, inst):
+        self.assertEqual(inst.id, "example-prodspec")
+        self.assertEqual(inst.identifier.value, "789123")
+        self.assertEqual(inst.languageCode.coding[0].code, "en-US")
+        self.assertEqual(inst.languageCode.coding[0].system, "http://tools.ietf.org/html/bcp47")
+        self.assertEqual(inst.lastSystemChange.date, FHIRDate("2014-10-07T14:45:00Z").date)
+        self.assertEqual(inst.lastSystemChange.as_json(), "2014-10-07T14:45:00Z")
+        self.assertEqual(inst.operationalStatus[0].coding[0].code, "off")
+        self.assertEqual(inst.operationalStatus[0].coding[0].display, "Off")
+        self.assertEqual(inst.productionSpecification[0].productionSpec, "xa-12324-b")
+        self.assertEqual(inst.productionSpecification[0].specType.coding[0].code, "serial-number")
+        self.assertEqual(inst.productionSpecification[0].specType.coding[0].display, "Serial number")
+        self.assertEqual(inst.productionSpecification[1].productionSpec, "1.1")
+        self.assertEqual(inst.productionSpecification[1].specType.coding[0].code, "hardware-revision")
+        self.assertEqual(inst.productionSpecification[1].specType.coding[0].display, "Hardware Revision")
+        self.assertEqual(inst.productionSpecification[2].productionSpec, "1.12")
+        self.assertEqual(inst.productionSpecification[2].specType.coding[0].code, "software-revision")
+        self.assertEqual(inst.productionSpecification[2].specType.coding[0].display, "Software Revision")
+        self.assertEqual(inst.productionSpecification[3].productionSpec, "1.0.23")
+        self.assertEqual(inst.productionSpecification[3].specType.coding[0].code, "firmware-revision")
+        self.assertEqual(inst.productionSpecification[3].specType.coding[0].display, "Firmware Revision")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "2000")
+        self.assertEqual(inst.type.coding[0].display, "MDC_DEV_ANALY_SAT_O2_MDS")
+        self.assertEqual(inst.type.coding[0].system, "urn:iso:std:iso:11073:10101")
+    
+    def testDeviceComponent2(self):
+        inst = self.instantiate_from("devicecomponent-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DeviceComponent instance")
+        self.implDeviceComponent2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DeviceComponent", js["resourceType"])
+        inst2 = devicecomponent.DeviceComponent(js)
+        self.implDeviceComponent2(inst2)
+    
+    def implDeviceComponent2(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier.value, "0")
+        self.assertEqual(inst.languageCode.coding[0].code, "en-US")
+        self.assertEqual(inst.languageCode.coding[0].system, "http://tools.ietf.org/html/bcp47")
+        self.assertEqual(inst.lastSystemChange.date, FHIRDate("2014-10-07T14:45:00Z").date)
+        self.assertEqual(inst.lastSystemChange.as_json(), "2014-10-07T14:45:00Z")
+        self.assertEqual(inst.measurementPrinciple, "optical")
+        self.assertEqual(inst.operationalStatus[0].coding[0].code, "off")
+        self.assertEqual(inst.operationalStatus[0].coding[0].display, "Off")
+        self.assertEqual(inst.operationalStatus[0].coding[0].system, "urn:iso:std:iso:11073:10101")
+        self.assertEqual(inst.parameterGroup.coding[0].code, "miscellaneous")
+        self.assertEqual(inst.parameterGroup.coding[0].display, "Miscellaneous Parameter Group")
+        self.assertEqual(inst.parameterGroup.coding[0].system, "urn:iso:std:iso:11073:10101")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "2000")
+        self.assertEqual(inst.type.coding[0].display, "MDC_DEV_ANALY_SAT_O2_MDS")
+        self.assertEqual(inst.type.coding[0].system, "urn:iso:std:iso:11073:10101")
+
diff --git a/fhirclient/models/devicemetric.py b/fhirclient/models/devicemetric.py
new file mode 100644
index 0000000..007f1c1
--- /dev/null
+++ b/fhirclient/models/devicemetric.py
@@ -0,0 +1,148 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DeviceMetric) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class DeviceMetric(domainresource.DomainResource):
+    """ Measurement, calculation or setting capability of a medical device.
+    
+    Describes a measurement, calculation or setting capability of a medical
+    device.
+    """
+    
+    resource_type = "DeviceMetric"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.calibration = None
+        """ Describes the calibrations that have been performed or that are
+        required to be performed.
+        List of `DeviceMetricCalibration` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ measurement | setting | calculation | unspecified.
+        Type `str`. """
+        
+        self.color = None
+        """ black | red | green | yellow | blue | magenta | cyan | white.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Unique identifier of this DeviceMetric.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.measurementPeriod = None
+        """ Describes the measurement repetition time.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.operationalStatus = None
+        """ on | off | standby | entered-in-error.
+        Type `str`. """
+        
+        self.parent = None
+        """ Describes the link to the parent DeviceComponent.
+        Type `FHIRReference` referencing `DeviceComponent` (represented as `dict` in JSON). """
+        
+        self.source = None
+        """ Describes the link to the source Device.
+        Type `FHIRReference` referencing `Device` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Identity of metric, for example Heart Rate or PEEP Setting.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.unit = None
+        """ Unit of Measure for the Metric.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(DeviceMetric, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DeviceMetric, self).elementProperties()
+        js.extend([
+            ("calibration", "calibration", DeviceMetricCalibration, True, None, False),
+            ("category", "category", str, False, None, True),
+            ("color", "color", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, True),
+            ("measurementPeriod", "measurementPeriod", timing.Timing, False, None, False),
+            ("operationalStatus", "operationalStatus", str, False, None, False),
+            ("parent", "parent", fhirreference.FHIRReference, False, None, False),
+            ("source", "source", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+            ("unit", "unit", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class DeviceMetricCalibration(backboneelement.BackboneElement):
+    """ Describes the calibrations that have been performed or that are required to
+    be performed.
+    """
+    
+    resource_type = "DeviceMetricCalibration"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.state = None
+        """ not-calibrated | calibration-required | calibrated | unspecified.
+        Type `str`. """
+        
+        self.time = None
+        """ Describes the time last calibration has been performed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.type = None
+        """ unspecified | offset | gain | two-point.
+        Type `str`. """
+        
+        super(DeviceMetricCalibration, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DeviceMetricCalibration, self).elementProperties()
+        js.extend([
+            ("state", "state", str, False, None, False),
+            ("time", "time", fhirdate.FHIRDate, False, None, False),
+            ("type", "type", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/devicemetric_tests.py b/fhirclient/models/devicemetric_tests.py
new file mode 100644
index 0000000..d272145
--- /dev/null
+++ b/fhirclient/models/devicemetric_tests.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import devicemetric
+from .fhirdate import FHIRDate
+
+
+class DeviceMetricTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("DeviceMetric", js["resourceType"])
+        return devicemetric.DeviceMetric(js)
+    
+    def testDeviceMetric1(self):
+        inst = self.instantiate_from("devicemetric-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DeviceMetric instance")
+        self.implDeviceMetric1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DeviceMetric", js["resourceType"])
+        inst2 = devicemetric.DeviceMetric(js)
+        self.implDeviceMetric1(inst2)
+    
+    def implDeviceMetric1(self, inst):
+        self.assertEqual(inst.calibration[0].state, "calibrated")
+        self.assertEqual(inst.calibration[0].time.date, FHIRDate("2016-12-28T09:03:04-05:00").date)
+        self.assertEqual(inst.calibration[0].time.as_json(), "2016-12-28T09:03:04-05:00")
+        self.assertEqual(inst.calibration[0].type, "two-point")
+        self.assertEqual(inst.category, "measurement")
+        self.assertEqual(inst.color, "blue")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier.system, "http://goodcare.org/devicemetric/id")
+        self.assertEqual(inst.identifier.value, "345675")
+        self.assertEqual(inst.measurementPeriod.repeat.frequency, 1)
+        self.assertEqual(inst.measurementPeriod.repeat.period, 1)
+        self.assertEqual(inst.measurementPeriod.repeat.periodUnit, "s")
+        self.assertEqual(inst.operationalStatus, "on")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "150456")
+        self.assertEqual(inst.type.coding[0].display, "MDC_PULS_OXIM_SAT_O2")
+        self.assertEqual(inst.type.coding[0].system, "https://rtmms.nist.gov")
+        self.assertEqual(inst.unit.coding[0].code, "262688")
+        self.assertEqual(inst.unit.coding[0].display, "MDC_DIM_PERCENT")
+        self.assertEqual(inst.unit.coding[0].system, "https://rtmms.nist.gov")
+
diff --git a/fhirclient/models/devicerequest.py b/fhirclient/models/devicerequest.py
new file mode 100644
index 0000000..6a7a16e
--- /dev/null
+++ b/fhirclient/models/devicerequest.py
@@ -0,0 +1,225 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DeviceRequest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class DeviceRequest(domainresource.DomainResource):
+    """ Medical device request.
+    
+    Represents a request for a patient to employ a medical device. The device
+    may be an implantable device, or an external assistive device, such as a
+    walker.
+    """
+    
+    resource_type = "DeviceRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authoredOn = None
+        """ When recorded.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.basedOn = None
+        """ What request fulfills.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.codeCodeableConcept = None
+        """ Device requested.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.codeReference = None
+        """ Device requested.
+        Type `FHIRReference` referencing `Device` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or Episode motivating request.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Protocol or definition.
+        List of `FHIRReference` items referencing `ActivityDefinition, PlanDefinition` (represented as `dict` in JSON). """
+        
+        self.groupIdentifier = None
+        """ Identifier of composite request.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External Request identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.intent = None
+        """ proposal | plan | original-order | encoded | reflex-order.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Notes or comments.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.occurrenceDateTime = None
+        """ Desired time or schedule for use.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.occurrencePeriod = None
+        """ Desired time or schedule for use.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.occurrenceTiming = None
+        """ Desired time or schedule for use.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.performer = None
+        """ Requested Filler.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, Device, RelatedPerson, HealthcareService` (represented as `dict` in JSON). """
+        
+        self.performerType = None
+        """ Fille role.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.priorRequest = None
+        """ What request replaces.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ Indicates how quickly the {{title}} should be addressed with
+        respect to other requests.
+        Type `str`. """
+        
+        self.reasonCode = None
+        """ Coded Reason for request.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Linked Reason for request.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.relevantHistory = None
+        """ Request provenance.
+        List of `FHIRReference` items referencing `Provenance` (represented as `dict` in JSON). """
+        
+        self.requester = None
+        """ Who/what is requesting diagnostics.
+        Type `DeviceRequestRequester` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | suspended | completed | entered-in-error |
+        cancelled.
+        Type `str`. """
+        
+        self.subject = None
+        """ Focus of request.
+        Type `FHIRReference` referencing `Patient, Group, Location, Device` (represented as `dict` in JSON). """
+        
+        self.supportingInfo = None
+        """ Additional clinical information.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(DeviceRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DeviceRequest, self).elementProperties()
+        js.extend([
+            ("authoredOn", "authoredOn", fhirdate.FHIRDate, False, None, False),
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("codeCodeableConcept", "codeCodeableConcept", codeableconcept.CodeableConcept, False, "code", True),
+            ("codeReference", "codeReference", fhirreference.FHIRReference, False, "code", True),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, True, None, False),
+            ("groupIdentifier", "groupIdentifier", identifier.Identifier, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("intent", "intent", codeableconcept.CodeableConcept, False, None, True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("occurrenceDateTime", "occurrenceDateTime", fhirdate.FHIRDate, False, "occurrence", False),
+            ("occurrencePeriod", "occurrencePeriod", period.Period, False, "occurrence", False),
+            ("occurrenceTiming", "occurrenceTiming", timing.Timing, False, "occurrence", False),
+            ("performer", "performer", fhirreference.FHIRReference, False, None, False),
+            ("performerType", "performerType", codeableconcept.CodeableConcept, False, None, False),
+            ("priorRequest", "priorRequest", fhirreference.FHIRReference, True, None, False),
+            ("priority", "priority", str, False, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("relevantHistory", "relevantHistory", fhirreference.FHIRReference, True, None, False),
+            ("requester", "requester", DeviceRequestRequester, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("supportingInfo", "supportingInfo", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class DeviceRequestRequester(backboneelement.BackboneElement):
+    """ Who/what is requesting diagnostics.
+    
+    The individual who initiated the request and has responsibility for its
+    activation.
+    """
+    
+    resource_type = "DeviceRequestRequester"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.agent = None
+        """ Individual making the request.
+        Type `FHIRReference` referencing `Device, Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization agent is acting for.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(DeviceRequestRequester, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DeviceRequestRequester, self).elementProperties()
+        js.extend([
+            ("agent", "agent", fhirreference.FHIRReference, False, None, True),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/devicerequest_tests.py b/fhirclient/models/devicerequest_tests.py
new file mode 100644
index 0000000..7029188
--- /dev/null
+++ b/fhirclient/models/devicerequest_tests.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import devicerequest
+from .fhirdate import FHIRDate
+
+
+class DeviceRequestTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("DeviceRequest", js["resourceType"])
+        return devicerequest.DeviceRequest(js)
+    
+    def testDeviceRequest1(self):
+        inst = self.instantiate_from("devicerequest-example-insulinpump.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DeviceRequest instance")
+        self.implDeviceRequest1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DeviceRequest", js["resourceType"])
+        inst2 = devicerequest.DeviceRequest(js)
+        self.implDeviceRequest1(inst2)
+    
+    def implDeviceRequest1(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2013-05-08T09:33:27+07:00").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2013-05-08T09:33:27+07:00")
+        self.assertEqual(inst.codeCodeableConcept.coding[0].code, "43148-6")
+        self.assertEqual(inst.codeCodeableConcept.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.codeCodeableConcept.text, "Insulin delivery device panel")
+        self.assertEqual(inst.groupIdentifier.value, "ip_request1")
+        self.assertEqual(inst.id, "insulinpump")
+        self.assertEqual(inst.identifier[0].value, "ip_request1.1")
+        self.assertEqual(inst.intent.text, "instance-order")
+        self.assertEqual(inst.note[0].text, "this is the right device brand and model")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2013-05-08T09:33:27+07:00").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2013-05-08T09:33:27+07:00")
+        self.assertEqual(inst.performerType.coding[0].display, "Qualified nurse")
+        self.assertEqual(inst.performerType.text, "Nurse")
+        self.assertEqual(inst.priority, "routine")
+        self.assertEqual(inst.reasonCode[0].text, "gastroparesis")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDeviceRequest2(self):
+        inst = self.instantiate_from("devicerequest-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DeviceRequest instance")
+        self.implDeviceRequest2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DeviceRequest", js["resourceType"])
+        inst2 = devicerequest.DeviceRequest(js)
+        self.implDeviceRequest2(inst2)
+    
+    def implDeviceRequest2(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.intent.coding[0].code, "original-order")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/deviceusestatement.py b/fhirclient/models/deviceusestatement.py
new file mode 100644
index 0000000..74ab759
--- /dev/null
+++ b/fhirclient/models/deviceusestatement.py
@@ -0,0 +1,129 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DeviceUseStatement) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class DeviceUseStatement(domainresource.DomainResource):
+    """ Record of use of a device.
+    
+    A record of a device being used by a patient where the record is the result
+    of a report from the patient or another clinician.
+    """
+    
+    resource_type = "DeviceUseStatement"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.bodySite = None
+        """ Target body site.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.device = None
+        """ Reference to device used.
+        Type `FHIRReference` referencing `Device` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External identifier for this record.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.indication = None
+        """ Why device was used.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Addition details (comments, instructions).
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.recordedOn = None
+        """ When statement was recorded.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.source = None
+        """ Who made the statement.
+        Type `FHIRReference` referencing `Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | completed | entered-in-error +.
+        Type `str`. """
+        
+        self.subject = None
+        """ Patient using device.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.timingDateTime = None
+        """ How often  the device was used.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.timingPeriod = None
+        """ How often  the device was used.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.timingTiming = None
+        """ How often  the device was used.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.whenUsed = None
+        """ Period device was used.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(DeviceUseStatement, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DeviceUseStatement, self).elementProperties()
+        js.extend([
+            ("bodySite", "bodySite", codeableconcept.CodeableConcept, False, None, False),
+            ("device", "device", fhirreference.FHIRReference, False, None, True),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("indication", "indication", codeableconcept.CodeableConcept, True, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("recordedOn", "recordedOn", fhirdate.FHIRDate, False, None, False),
+            ("source", "source", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("timingDateTime", "timingDateTime", fhirdate.FHIRDate, False, "timing", False),
+            ("timingPeriod", "timingPeriod", period.Period, False, "timing", False),
+            ("timingTiming", "timingTiming", timing.Timing, False, "timing", False),
+            ("whenUsed", "whenUsed", period.Period, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/deviceusestatement_tests.py b/fhirclient/models/deviceusestatement_tests.py
new file mode 100644
index 0000000..b063f98
--- /dev/null
+++ b/fhirclient/models/deviceusestatement_tests.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import deviceusestatement
+from .fhirdate import FHIRDate
+
+
+class DeviceUseStatementTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("DeviceUseStatement", js["resourceType"])
+        return deviceusestatement.DeviceUseStatement(js)
+    
+    def testDeviceUseStatement1(self):
+        inst = self.instantiate_from("deviceusestatement-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DeviceUseStatement instance")
+        self.implDeviceUseStatement1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DeviceUseStatement", js["resourceType"])
+        inst2 = deviceusestatement.DeviceUseStatement(js)
+        self.implDeviceUseStatement1(inst2)
+    
+    def implDeviceUseStatement1(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http:goodhealth.org/identifiers")
+        self.assertEqual(inst.identifier[0].value, "51ebb7a9-4e3a-4360-9a05-0cc2d869086f")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/diagnosticreport.py b/fhirclient/models/diagnosticreport.py
new file mode 100644
index 0000000..9cbfb54
--- /dev/null
+++ b/fhirclient/models/diagnosticreport.py
@@ -0,0 +1,229 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DiagnosticReport) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class DiagnosticReport(domainresource.DomainResource):
+    """ A Diagnostic report - a combination of request information, atomic results,
+    images, interpretation, as well as formatted reports.
+    
+    The findings and interpretation of diagnostic  tests performed on patients,
+    groups of patients, devices, and locations, and/or specimens derived from
+    these. The report includes clinical context such as requesting and provider
+    information, and some mix of atomic results, images, textual and coded
+    interpretations, and formatted representation of diagnostic reports.
+    """
+    
+    resource_type = "DiagnosticReport"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.basedOn = None
+        """ What was requested.
+        List of `FHIRReference` items referencing `CarePlan, ImmunizationRecommendation, MedicationRequest, NutritionOrder, ProcedureRequest, ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Service category.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Name/Code for this diagnostic report.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.codedDiagnosis = None
+        """ Codes for the conclusion.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.conclusion = None
+        """ Clinical Interpretation of test results.
+        Type `str`. """
+        
+        self.context = None
+        """ Health care event when test ordered.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.effectiveDateTime = None
+        """ Clinically relevant time/time-period for report.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.effectivePeriod = None
+        """ Clinically relevant time/time-period for report.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier for report.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.image = None
+        """ Key images associated with this report.
+        List of `DiagnosticReportImage` items (represented as `dict` in JSON). """
+        
+        self.imagingStudy = None
+        """ Reference to full details of imaging associated with the diagnostic
+        report.
+        List of `FHIRReference` items referencing `ImagingStudy, ImagingManifest` (represented as `dict` in JSON). """
+        
+        self.issued = None
+        """ DateTime this version was released.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.performer = None
+        """ Participants in producing the report.
+        List of `DiagnosticReportPerformer` items (represented as `dict` in JSON). """
+        
+        self.presentedForm = None
+        """ Entire report as issued.
+        List of `Attachment` items (represented as `dict` in JSON). """
+        
+        self.result = None
+        """ Observations - simple, or complex nested groups.
+        List of `FHIRReference` items referencing `Observation` (represented as `dict` in JSON). """
+        
+        self.specimen = None
+        """ Specimens this report is based on.
+        List of `FHIRReference` items referencing `Specimen` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ registered | partial | preliminary | final +.
+        Type `str`. """
+        
+        self.subject = None
+        """ The subject of the report - usually, but not always, the patient.
+        Type `FHIRReference` referencing `Patient, Group, Device, Location` (represented as `dict` in JSON). """
+        
+        super(DiagnosticReport, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DiagnosticReport, self).elementProperties()
+        js.extend([
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("codedDiagnosis", "codedDiagnosis", codeableconcept.CodeableConcept, True, None, False),
+            ("conclusion", "conclusion", str, False, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("effectiveDateTime", "effectiveDateTime", fhirdate.FHIRDate, False, "effective", False),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, "effective", False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("image", "image", DiagnosticReportImage, True, None, False),
+            ("imagingStudy", "imagingStudy", fhirreference.FHIRReference, True, None, False),
+            ("issued", "issued", fhirdate.FHIRDate, False, None, False),
+            ("performer", "performer", DiagnosticReportPerformer, True, None, False),
+            ("presentedForm", "presentedForm", attachment.Attachment, True, None, False),
+            ("result", "result", fhirreference.FHIRReference, True, None, False),
+            ("specimen", "specimen", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class DiagnosticReportImage(backboneelement.BackboneElement):
+    """ Key images associated with this report.
+    
+    A list of key images associated with this report. The images are generally
+    created during the diagnostic process, and may be directly of the patient,
+    or of treated specimens (i.e. slides of interest).
+    """
+    
+    resource_type = "DiagnosticReportImage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.comment = None
+        """ Comment about the image (e.g. explanation).
+        Type `str`. """
+        
+        self.link = None
+        """ Reference to the image source.
+        Type `FHIRReference` referencing `Media` (represented as `dict` in JSON). """
+        
+        super(DiagnosticReportImage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DiagnosticReportImage, self).elementProperties()
+        js.extend([
+            ("comment", "comment", str, False, None, False),
+            ("link", "link", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+class DiagnosticReportPerformer(backboneelement.BackboneElement):
+    """ Participants in producing the report.
+    
+    Indicates who or what participated in producing the report.
+    """
+    
+    resource_type = "DiagnosticReportPerformer"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actor = None
+        """ Practitioner or Organization  participant.
+        Type `FHIRReference` referencing `Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ Type of performer.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(DiagnosticReportPerformer, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DiagnosticReportPerformer, self).elementProperties()
+        js.extend([
+            ("actor", "actor", fhirreference.FHIRReference, False, None, True),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/diagnosticreport_tests.py b/fhirclient/models/diagnosticreport_tests.py
new file mode 100644
index 0000000..f29b208
--- /dev/null
+++ b/fhirclient/models/diagnosticreport_tests.py
@@ -0,0 +1,324 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import diagnosticreport
+from .fhirdate import FHIRDate
+
+
+class DiagnosticReportTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("DiagnosticReport", js["resourceType"])
+        return diagnosticreport.DiagnosticReport(js)
+    
+    def testDiagnosticReport1(self):
+        inst = self.instantiate_from("diagnosticreport-example-dxa.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DiagnosticReport instance")
+        self.implDiagnosticReport1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DiagnosticReport", js["resourceType"])
+        inst2 = diagnosticreport.DiagnosticReport(js)
+        self.implDiagnosticReport1(inst2)
+    
+    def implDiagnosticReport1(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "38269-7")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "DXA BONE DENSITOMETRY")
+        self.assertEqual(inst.codedDiagnosis[0].coding[0].code, "391040000")
+        self.assertEqual(inst.codedDiagnosis[0].coding[0].display, "At risk of osteoporotic fracture")
+        self.assertEqual(inst.codedDiagnosis[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2008-06-17").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2008-06-17")
+        self.assertEqual(inst.id, "102")
+        self.assertEqual(inst.issued.date, FHIRDate("2008-06-18T09:23:00+10:00").date)
+        self.assertEqual(inst.issued.as_json(), "2008-06-18T09:23:00+10:00")
+        self.assertEqual(inst.performer[0].role.coding[0].code, "66862007")
+        self.assertEqual(inst.performer[0].role.coding[0].display, "Radiologist")
+        self.assertEqual(inst.performer[0].role.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.performer[0].role.text, "Radiologist")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDiagnosticReport2(self):
+        inst = self.instantiate_from("diagnosticreport-example-f001-bloodexam.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DiagnosticReport instance")
+        self.implDiagnosticReport2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DiagnosticReport", js["resourceType"])
+        inst2 = diagnosticreport.DiagnosticReport(js)
+        self.implDiagnosticReport2(inst2)
+    
+    def implDiagnosticReport2(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "252275004")
+        self.assertEqual(inst.category.coding[0].display, "Haematology test")
+        self.assertEqual(inst.category.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category.coding[1].code, "HM")
+        self.assertEqual(inst.category.coding[1].system, "http://hl7.org/fhir/v2/0074")
+        self.assertEqual(inst.code.coding[0].code, "58410-2")
+        self.assertEqual(inst.code.coding[0].display, "Complete blood count (hemogram) panel - Blood by Automated count")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.conclusion, "Core lab")
+        self.assertEqual(inst.contained[0].id, "req")
+        self.assertEqual(inst.id, "f001")
+        self.assertEqual(inst.identifier[0].system, "http://www.bmc.nl/zorgportal/identifiers/reports")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "nr1239044")
+        self.assertEqual(inst.issued.date, FHIRDate("2013-05-15T19:32:52+01:00").date)
+        self.assertEqual(inst.issued.as_json(), "2013-05-15T19:32:52+01:00")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDiagnosticReport3(self):
+        inst = self.instantiate_from("diagnosticreport-example-f201-brainct.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DiagnosticReport instance")
+        self.implDiagnosticReport3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DiagnosticReport", js["resourceType"])
+        inst2 = diagnosticreport.DiagnosticReport(js)
+        self.implDiagnosticReport3(inst2)
+    
+    def implDiagnosticReport3(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "394914008")
+        self.assertEqual(inst.category.coding[0].display, "Radiology")
+        self.assertEqual(inst.category.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category.coding[1].code, "RAD")
+        self.assertEqual(inst.category.coding[1].system, "http://hl7.org/fhir/v2/0074")
+        self.assertEqual(inst.code.coding[0].code, "429858000")
+        self.assertEqual(inst.code.coding[0].display, "Computed tomography (CT) of head and neck")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "CT of head-neck")
+        self.assertEqual(inst.codedDiagnosis[0].coding[0].code, "188340000")
+        self.assertEqual(inst.codedDiagnosis[0].coding[0].display, "Malignant tumor of craniopharyngeal duct")
+        self.assertEqual(inst.codedDiagnosis[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.conclusion, "CT brains: large tumor sphenoid/clivus.")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2012-12-01T12:00:00+01:00").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2012-12-01T12:00:00+01:00")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.issued.date, FHIRDate("2012-12-01T12:00:00+01:00").date)
+        self.assertEqual(inst.issued.as_json(), "2012-12-01T12:00:00+01:00")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDiagnosticReport4(self):
+        inst = self.instantiate_from("diagnosticreport-example-f202-bloodculture.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DiagnosticReport instance")
+        self.implDiagnosticReport4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DiagnosticReport", js["resourceType"])
+        inst2 = diagnosticreport.DiagnosticReport(js)
+        self.implDiagnosticReport4(inst2)
+    
+    def implDiagnosticReport4(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "15220000")
+        self.assertEqual(inst.category.coding[0].display, "Laboratory test")
+        self.assertEqual(inst.category.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category.coding[1].code, "LAB")
+        self.assertEqual(inst.category.coding[1].system, "http://hl7.org/fhir/v2/0074")
+        self.assertEqual(inst.code.coding[0].code, "104177005")
+        self.assertEqual(inst.code.coding[0].display, "Blood culture for bacteria, including anaerobic screen")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.codedDiagnosis[0].coding[0].code, "428763004")
+        self.assertEqual(inst.codedDiagnosis[0].coding[0].display, "Bacteremia due to staphylococcus")
+        self.assertEqual(inst.codedDiagnosis[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.conclusion, "Blood culture tested positive on staphylococcus aureus")
+        self.assertEqual(inst.contained[0].id, "req")
+        self.assertEqual(inst.id, "f202")
+        self.assertEqual(inst.issued.date, FHIRDate("2013-03-11T10:28:00+01:00").date)
+        self.assertEqual(inst.issued.as_json(), "2013-03-11T10:28:00+01:00")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDiagnosticReport5(self):
+        inst = self.instantiate_from("diagnosticreport-example-ghp.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DiagnosticReport instance")
+        self.implDiagnosticReport5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DiagnosticReport", js["resourceType"])
+        inst2 = diagnosticreport.DiagnosticReport(js)
+        self.implDiagnosticReport5(inst2)
+    
+    def implDiagnosticReport5(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "GHP")
+        self.assertEqual(inst.code.coding[0].display, "General Health Profile")
+        self.assertEqual(inst.code.coding[0].system, "http://acme.com/labs/reports")
+        self.assertEqual(inst.contained[0].id, "rtt")
+        self.assertEqual(inst.contained[1].id, "ltt")
+        self.assertEqual(inst.contained[2].id, "urine")
+        self.assertEqual(inst.contained[3].id, "p2")
+        self.assertEqual(inst.contained[4].id, "r1")
+        self.assertEqual(inst.contained[5].id, "r2")
+        self.assertEqual(inst.contained[6].id, "r3")
+        self.assertEqual(inst.contained[7].id, "r4")
+        self.assertEqual(inst.contained[8].id, "r5")
+        self.assertEqual(inst.contained[9].id, "r6")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2015-08-16T06:40:17Z").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2015-08-16T06:40:17Z")
+        self.assertEqual(inst.id, "ghp")
+        self.assertEqual(inst.identifier[0].system, "http://acme.com/lab/reports")
+        self.assertEqual(inst.identifier[0].value, "ghp-example")
+        self.assertEqual(inst.issued.date, FHIRDate("2015-08-17T06:40:17Z").date)
+        self.assertEqual(inst.issued.as_json(), "2015-08-17T06:40:17Z")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2015-08-16T10:35:23Z").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2015-08-16T10:35:23Z")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDiagnosticReport6(self):
+        inst = self.instantiate_from("diagnosticreport-example-gingival-mass.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DiagnosticReport instance")
+        self.implDiagnosticReport6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DiagnosticReport", js["resourceType"])
+        inst2 = diagnosticreport.DiagnosticReport(js)
+        self.implDiagnosticReport6(inst2)
+    
+    def implDiagnosticReport6(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "PAT")
+        self.assertEqual(inst.category.coding[0].display, "Pathology (gross & histopath, not surgical)")
+        self.assertEqual(inst.category.coding[0].system, "http://hl7.org/fhir/v2/0074")
+        self.assertEqual(inst.category.text, "Pathology")
+        self.assertEqual(inst.code.coding[0].code, "4503")
+        self.assertEqual(inst.code.coding[0].display, "Biopsy without Microscopic Description (1 Site/Lesion)-Standard")
+        self.assertEqual(inst.code.coding[0].system, "https://www.acmeonline.com")
+        self.assertEqual(inst.code.text, "Biopsy without Microscopic Description (1 Site/Lesion)-Standard")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2017-03-02").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2017-03-02")
+        self.assertEqual(inst.id, "gingival-mass")
+        self.assertEqual(inst.identifier[0].system, "https://www.acmeonline.com")
+        self.assertEqual(inst.identifier[0].value, "P73456090")
+        self.assertEqual(inst.issued.date, FHIRDate("2017-03-15T08:13:08Z").date)
+        self.assertEqual(inst.issued.as_json(), "2017-03-15T08:13:08Z")
+        self.assertEqual(inst.presentedForm[0].contentType, "application/pdf")
+        self.assertEqual(inst.presentedForm[0].language, "en")
+        self.assertEqual(inst.presentedForm[0].title, "LAB ID: P73456090 MAX JONES Biopsy without Microscopic Description (1 Site/Lesion)-Standard")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDiagnosticReport7(self):
+        inst = self.instantiate_from("diagnosticreport-example-lipids.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DiagnosticReport instance")
+        self.implDiagnosticReport7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DiagnosticReport", js["resourceType"])
+        inst2 = diagnosticreport.DiagnosticReport(js)
+        self.implDiagnosticReport7(inst2)
+    
+    def implDiagnosticReport7(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "HM")
+        self.assertEqual(inst.category.coding[0].system, "http://hl7.org/fhir/v2/0074")
+        self.assertEqual(inst.code.coding[0].code, "24331-1")
+        self.assertEqual(inst.code.coding[0].display, "Lipid 1996 panel - Serum or Plasma")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "Lipid Panel")
+        self.assertEqual(inst.contained[0].id, "cholesterol")
+        self.assertEqual(inst.contained[1].id, "triglyceride")
+        self.assertEqual(inst.contained[2].id, "hdlcholesterol")
+        self.assertEqual(inst.contained[3].id, "ldlcholesterol")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2011-03-04T08:30:00+11:00").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2011-03-04T08:30:00+11:00")
+        self.assertEqual(inst.id, "lipids")
+        self.assertEqual(inst.identifier[0].system, "http://acme.com/lab/reports")
+        self.assertEqual(inst.identifier[0].value, "5234342")
+        self.assertEqual(inst.issued.date, FHIRDate("2013-01-27T11:45:33+11:00").date)
+        self.assertEqual(inst.issued.as_json(), "2013-01-27T11:45:33+11:00")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDiagnosticReport8(self):
+        inst = self.instantiate_from("diagnosticreport-example-papsmear.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DiagnosticReport instance")
+        self.implDiagnosticReport8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DiagnosticReport", js["resourceType"])
+        inst2 = diagnosticreport.DiagnosticReport(js)
+        self.implDiagnosticReport8(inst2)
+    
+    def implDiagnosticReport8(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "47527-7")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2013-02-11T10:33:33+11:00").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2013-02-11T10:33:33+11:00")
+        self.assertEqual(inst.id, "pap")
+        self.assertEqual(inst.issued.date, FHIRDate("2013-02-13T11:45:33+11:00").date)
+        self.assertEqual(inst.issued.as_json(), "2013-02-13T11:45:33+11:00")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testDiagnosticReport9(self):
+        inst = self.instantiate_from("diagnosticreport-example-pgx.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DiagnosticReport instance")
+        self.implDiagnosticReport9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DiagnosticReport", js["resourceType"])
+        inst2 = diagnosticreport.DiagnosticReport(js)
+        self.implDiagnosticReport9(inst2)
+    
+    def implDiagnosticReport9(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "PGxReport")
+        self.assertEqual(inst.code.coding[0].display, "Pharmacogenetics Report")
+        self.assertEqual(inst.code.coding[0].system, "https://system/PGxReport")
+        self.assertEqual(inst.code.text, "Pharmacogenetics Report")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2016-10-15T12:34:56+11:00").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2016-10-15T12:34:56+11:00")
+        self.assertEqual(inst.id, "example-pgx")
+        self.assertEqual(inst.issued.date, FHIRDate("2016-10-20T14:00:05+11:00").date)
+        self.assertEqual(inst.issued.as_json(), "2016-10-20T14:00:05+11:00")
+        self.assertEqual(inst.presentedForm[0].contentType, "PDF")
+        self.assertEqual(inst.presentedForm[0].creation.date, FHIRDate("2016-10-20T20:00:00+11:00").date)
+        self.assertEqual(inst.presentedForm[0].creation.as_json(), "2016-10-20T20:00:00+11:00")
+        self.assertEqual(inst.presentedForm[0].data, "cGRmSW5CYXNlNjRCaW5hcnk=")
+        self.assertEqual(inst.presentedForm[0].hash, "571ef9c5655840f324e679072ed62b1b95eef8a0")
+        self.assertEqual(inst.presentedForm[0].language, "en")
+        self.assertEqual(inst.presentedForm[0].title, "Pharmacogenetics Report")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testDiagnosticReport10(self):
+        inst = self.instantiate_from("diagnosticreport-example-ultrasound.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DiagnosticReport instance")
+        self.implDiagnosticReport10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DiagnosticReport", js["resourceType"])
+        inst2 = diagnosticreport.DiagnosticReport(js)
+        self.implDiagnosticReport10(inst2)
+    
+    def implDiagnosticReport10(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "394914008")
+        self.assertEqual(inst.category.coding[0].display, "Radiology")
+        self.assertEqual(inst.category.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category.coding[1].code, "RAD")
+        self.assertEqual(inst.category.coding[1].system, "http://hl7.org/fhir/v2/0074")
+        self.assertEqual(inst.code.coding[0].code, "45036003")
+        self.assertEqual(inst.code.coding[0].display, "Ultrasonography of abdomen")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Abdominal Ultrasound")
+        self.assertEqual(inst.conclusion, "Unremarkable study")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2012-12-01T12:00:00+01:00").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2012-12-01T12:00:00+01:00")
+        self.assertEqual(inst.id, "ultrasound")
+        self.assertEqual(inst.image[0].comment, "A comment about the image")
+        self.assertEqual(inst.issued.date, FHIRDate("2012-12-01T12:00:00+01:00").date)
+        self.assertEqual(inst.issued.as_json(), "2012-12-01T12:00:00+01:00")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/distance.py b/fhirclient/models/distance.py
new file mode 100644
index 0000000..9bf236a
--- /dev/null
+++ b/fhirclient/models/distance.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Distance) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import quantity
+
+class Distance(quantity.Quantity):
+    """ A length - a value with a unit that is a physical distance.
+    """
+    
+    resource_type = "Distance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        super(Distance, self).__init__(jsondict=jsondict, strict=strict)
+
+
diff --git a/fhirclient/models/documentmanifest.py b/fhirclient/models/documentmanifest.py
new file mode 100644
index 0000000..0e51076
--- /dev/null
+++ b/fhirclient/models/documentmanifest.py
@@ -0,0 +1,188 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DocumentManifest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class DocumentManifest(domainresource.DomainResource):
+    """ A list that defines a set of documents.
+    
+    A collection of documents compiled for a purpose together with metadata
+    that applies to the collection.
+    """
+    
+    resource_type = "DocumentManifest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.author = None
+        """ Who and/or what authored the manifest.
+        List of `FHIRReference` items referencing `Practitioner, Organization, Device, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.content = None
+        """ The items included.
+        List of `DocumentManifestContent` items (represented as `dict` in JSON). """
+        
+        self.created = None
+        """ When this document manifest created.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Human-readable description (title).
+        Type `str`. """
+        
+        self.identifier = None
+        """ Other identifiers for the manifest.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.masterIdentifier = None
+        """ Unique Identifier for the set of documents.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.recipient = None
+        """ Intended to get notified about this set of documents.
+        List of `FHIRReference` items referencing `Patient, Practitioner, RelatedPerson, Organization` (represented as `dict` in JSON). """
+        
+        self.related = None
+        """ Related things.
+        List of `DocumentManifestRelated` items (represented as `dict` in JSON). """
+        
+        self.source = None
+        """ The source system/application/software.
+        Type `str`. """
+        
+        self.status = None
+        """ current | superseded | entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ The subject of the set of documents.
+        Type `FHIRReference` referencing `Patient, Practitioner, Group, Device` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Kind of document set.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(DocumentManifest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DocumentManifest, self).elementProperties()
+        js.extend([
+            ("author", "author", fhirreference.FHIRReference, True, None, False),
+            ("content", "content", DocumentManifestContent, True, None, True),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("masterIdentifier", "masterIdentifier", identifier.Identifier, False, None, False),
+            ("recipient", "recipient", fhirreference.FHIRReference, True, None, False),
+            ("related", "related", DocumentManifestRelated, True, None, False),
+            ("source", "source", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class DocumentManifestContent(backboneelement.BackboneElement):
+    """ The items included.
+    
+    The list of Documents included in the manifest.
+    """
+    
+    resource_type = "DocumentManifestContent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.pAttachment = None
+        """ Contents of this set of documents.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.pReference = None
+        """ Contents of this set of documents.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(DocumentManifestContent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DocumentManifestContent, self).elementProperties()
+        js.extend([
+            ("pAttachment", "pAttachment", attachment.Attachment, False, "p", True),
+            ("pReference", "pReference", fhirreference.FHIRReference, False, "p", True),
+        ])
+        return js
+
+
+class DocumentManifestRelated(backboneelement.BackboneElement):
+    """ Related things.
+    
+    Related identifiers or resources associated with the DocumentManifest.
+    """
+    
+    resource_type = "DocumentManifestRelated"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.identifier = None
+        """ Identifiers of things that are related.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.ref = None
+        """ Related Resource.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(DocumentManifestRelated, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DocumentManifestRelated, self).elementProperties()
+        js.extend([
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("ref", "ref", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/documentmanifest_tests.py b/fhirclient/models/documentmanifest_tests.py
new file mode 100644
index 0000000..f486e1d
--- /dev/null
+++ b/fhirclient/models/documentmanifest_tests.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import documentmanifest
+from .fhirdate import FHIRDate
+
+
+class DocumentManifestTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("DocumentManifest", js["resourceType"])
+        return documentmanifest.DocumentManifest(js)
+    
+    def testDocumentManifest1(self):
+        inst = self.instantiate_from("documentmanifest-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DocumentManifest instance")
+        self.implDocumentManifest1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DocumentManifest", js["resourceType"])
+        inst2 = documentmanifest.DocumentManifest(js)
+        self.implDocumentManifest1(inst2)
+    
+    def implDocumentManifest1(self, inst):
+        self.assertEqual(inst.contained[0].id, "a1")
+        self.assertEqual(inst.created.date, FHIRDate("2004-12-25T23:50:50-05:00").date)
+        self.assertEqual(inst.created.as_json(), "2004-12-25T23:50:50-05:00")
+        self.assertEqual(inst.description, "Physical")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/documents")
+        self.assertEqual(inst.identifier[0].value, "23425234234-2347")
+        self.assertEqual(inst.masterIdentifier.system, "http://example.org/documents")
+        self.assertEqual(inst.masterIdentifier.value, "23425234234-2346")
+        self.assertEqual(inst.related[0].identifier.system, "http://example.org/documents")
+        self.assertEqual(inst.related[0].identifier.value, "23425234234-9999")
+        self.assertEqual(inst.source, "urn:oid:1.3.6.1.4.1.21367.2009.1.2.1")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Text</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.text, "History and Physical")
+
diff --git a/fhirclient/models/documentreference.py b/fhirclient/models/documentreference.py
new file mode 100644
index 0000000..9bbf57c
--- /dev/null
+++ b/fhirclient/models/documentreference.py
@@ -0,0 +1,316 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DocumentReference) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class DocumentReference(domainresource.DomainResource):
+    """ A reference to a document.
+    """
+    
+    resource_type = "DocumentReference"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authenticator = None
+        """ Who/what authenticated the document.
+        Type `FHIRReference` referencing `Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.author = None
+        """ Who and/or what authored the document.
+        List of `FHIRReference` items referencing `Practitioner, Organization, Device, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.class_fhir = None
+        """ Categorization of document.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.content = None
+        """ Document referenced.
+        List of `DocumentReferenceContent` items (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Clinical context of document.
+        Type `DocumentReferenceContext` (represented as `dict` in JSON). """
+        
+        self.created = None
+        """ Document creation time.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.custodian = None
+        """ Organization which maintains the document.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Human-readable description (title).
+        Type `str`. """
+        
+        self.docStatus = None
+        """ preliminary | final | appended | amended | entered-in-error.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Other identifiers for the document.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.indexed = None
+        """ When this document reference was created.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.masterIdentifier = None
+        """ Master Version Specific Identifier.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.relatesTo = None
+        """ Relationships to other documents.
+        List of `DocumentReferenceRelatesTo` items (represented as `dict` in JSON). """
+        
+        self.securityLabel = None
+        """ Document security-tags.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ current | superseded | entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who/what is the subject of the document.
+        Type `FHIRReference` referencing `Patient, Practitioner, Group, Device` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Kind of document (LOINC if possible).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(DocumentReference, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DocumentReference, self).elementProperties()
+        js.extend([
+            ("authenticator", "authenticator", fhirreference.FHIRReference, False, None, False),
+            ("author", "author", fhirreference.FHIRReference, True, None, False),
+            ("class_fhir", "class", codeableconcept.CodeableConcept, False, None, False),
+            ("content", "content", DocumentReferenceContent, True, None, True),
+            ("context", "context", DocumentReferenceContext, False, None, False),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("custodian", "custodian", fhirreference.FHIRReference, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("docStatus", "docStatus", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("indexed", "indexed", fhirdate.FHIRDate, False, None, True),
+            ("masterIdentifier", "masterIdentifier", identifier.Identifier, False, None, False),
+            ("relatesTo", "relatesTo", DocumentReferenceRelatesTo, True, None, False),
+            ("securityLabel", "securityLabel", codeableconcept.CodeableConcept, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class DocumentReferenceContent(backboneelement.BackboneElement):
+    """ Document referenced.
+    
+    The document and format referenced. There may be multiple content element
+    repetitions, each with a different format.
+    """
+    
+    resource_type = "DocumentReferenceContent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.attachment = None
+        """ Where to access the document.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.format = None
+        """ Format/content rules for the document.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(DocumentReferenceContent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DocumentReferenceContent, self).elementProperties()
+        js.extend([
+            ("attachment", "attachment", attachment.Attachment, False, None, True),
+            ("format", "format", coding.Coding, False, None, False),
+        ])
+        return js
+
+
+class DocumentReferenceContext(backboneelement.BackboneElement):
+    """ Clinical context of document.
+    
+    The clinical context in which the document was prepared.
+    """
+    
+    resource_type = "DocumentReferenceContext"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.encounter = None
+        """ Context of the document  content.
+        Type `FHIRReference` referencing `Encounter` (represented as `dict` in JSON). """
+        
+        self.event = None
+        """ Main clinical acts documented.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.facilityType = None
+        """ Kind of facility where patient was seen.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Time of service that is being documented.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.practiceSetting = None
+        """ Additional details about where the content was created (e.g.
+        clinical specialty).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.related = None
+        """ Related identifiers or resources.
+        List of `DocumentReferenceContextRelated` items (represented as `dict` in JSON). """
+        
+        self.sourcePatientInfo = None
+        """ Patient demographics from source.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        super(DocumentReferenceContext, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DocumentReferenceContext, self).elementProperties()
+        js.extend([
+            ("encounter", "encounter", fhirreference.FHIRReference, False, None, False),
+            ("event", "event", codeableconcept.CodeableConcept, True, None, False),
+            ("facilityType", "facilityType", codeableconcept.CodeableConcept, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("practiceSetting", "practiceSetting", codeableconcept.CodeableConcept, False, None, False),
+            ("related", "related", DocumentReferenceContextRelated, True, None, False),
+            ("sourcePatientInfo", "sourcePatientInfo", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+class DocumentReferenceContextRelated(backboneelement.BackboneElement):
+    """ Related identifiers or resources.
+    
+    Related identifiers or resources associated with the DocumentReference.
+    """
+    
+    resource_type = "DocumentReferenceContextRelated"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.identifier = None
+        """ Identifier of related objects or events.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.ref = None
+        """ Related Resource.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(DocumentReferenceContextRelated, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DocumentReferenceContextRelated, self).elementProperties()
+        js.extend([
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("ref", "ref", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+class DocumentReferenceRelatesTo(backboneelement.BackboneElement):
+    """ Relationships to other documents.
+    
+    Relationships that this document has with other document references that
+    already exist.
+    """
+    
+    resource_type = "DocumentReferenceRelatesTo"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ replaces | transforms | signs | appends.
+        Type `str`. """
+        
+        self.target = None
+        """ Target of the relationship.
+        Type `FHIRReference` referencing `DocumentReference` (represented as `dict` in JSON). """
+        
+        super(DocumentReferenceRelatesTo, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DocumentReferenceRelatesTo, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("target", "target", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/documentreference_tests.py b/fhirclient/models/documentreference_tests.py
new file mode 100644
index 0000000..b01b2a7
--- /dev/null
+++ b/fhirclient/models/documentreference_tests.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import documentreference
+from .fhirdate import FHIRDate
+
+
+class DocumentReferenceTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("DocumentReference", js["resourceType"])
+        return documentreference.DocumentReference(js)
+    
+    def testDocumentReference1(self):
+        inst = self.instantiate_from("documentreference-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a DocumentReference instance")
+        self.implDocumentReference1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("DocumentReference", js["resourceType"])
+        inst2 = documentreference.DocumentReference(js)
+        self.implDocumentReference1(inst2)
+    
+    def implDocumentReference1(self, inst):
+        self.assertEqual(inst.class_fhir.coding[0].code, "History and Physical")
+        self.assertEqual(inst.class_fhir.coding[0].display, "History and Physical")
+        self.assertEqual(inst.class_fhir.coding[0].system, "http://ihe.net/xds/connectathon/classCodes")
+        self.assertEqual(inst.contained[0].id, "a2")
+        self.assertEqual(inst.content[0].attachment.contentType, "application/hl7-v3+xml")
+        self.assertEqual(inst.content[0].attachment.hash, "2jmj7l5rSw0yVb/vlWAYkK/YBwk=")
+        self.assertEqual(inst.content[0].attachment.language, "en-US")
+        self.assertEqual(inst.content[0].attachment.size, 3654)
+        self.assertEqual(inst.content[0].attachment.url, "http://example.org/xds/mhd/Binary/07a6483f-732b-461e-86b6-edb665c45510")
+        self.assertEqual(inst.content[0].format.code, "urn:ihe:pcc:handp:2008")
+        self.assertEqual(inst.content[0].format.display, "History and Physical Specification")
+        self.assertEqual(inst.content[0].format.system, "urn:oid:1.3.6.1.4.1.19376.1.2.3")
+        self.assertEqual(inst.context.event[0].coding[0].code, "T-D8200")
+        self.assertEqual(inst.context.event[0].coding[0].display, "Arm")
+        self.assertEqual(inst.context.event[0].coding[0].system, "http://ihe.net/xds/connectathon/eventCodes")
+        self.assertEqual(inst.context.facilityType.coding[0].code, "Outpatient")
+        self.assertEqual(inst.context.facilityType.coding[0].display, "Outpatient")
+        self.assertEqual(inst.context.facilityType.coding[0].system, "http://www.ihe.net/xds/connectathon/healthcareFacilityTypeCodes")
+        self.assertEqual(inst.context.period.end.date, FHIRDate("2004-12-23T08:01:00+11:00").date)
+        self.assertEqual(inst.context.period.end.as_json(), "2004-12-23T08:01:00+11:00")
+        self.assertEqual(inst.context.period.start.date, FHIRDate("2004-12-23T08:00:00+11:00").date)
+        self.assertEqual(inst.context.period.start.as_json(), "2004-12-23T08:00:00+11:00")
+        self.assertEqual(inst.context.practiceSetting.coding[0].code, "General Medicine")
+        self.assertEqual(inst.context.practiceSetting.coding[0].display, "General Medicine")
+        self.assertEqual(inst.context.practiceSetting.coding[0].system, "http://www.ihe.net/xds/connectathon/practiceSettingCodes")
+        self.assertEqual(inst.context.related[0].identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.context.related[0].identifier.value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.2345")
+        self.assertEqual(inst.created.date, FHIRDate("2005-12-24T09:35:00+11:00").date)
+        self.assertEqual(inst.created.as_json(), "2005-12-24T09:35:00+11:00")
+        self.assertEqual(inst.description, "Physical")
+        self.assertEqual(inst.docStatus, "preliminary")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.1234")
+        self.assertEqual(inst.indexed.date, FHIRDate("2005-12-24T09:43:41+11:00").date)
+        self.assertEqual(inst.indexed.as_json(), "2005-12-24T09:43:41+11:00")
+        self.assertEqual(inst.masterIdentifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.masterIdentifier.value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7")
+        self.assertEqual(inst.relatesTo[0].code, "appends")
+        self.assertEqual(inst.securityLabel[0].coding[0].code, "V")
+        self.assertEqual(inst.securityLabel[0].coding[0].display, "very restricted")
+        self.assertEqual(inst.securityLabel[0].coding[0].system, "http://hl7.org/fhir/v3/Confidentiality")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "34108-1")
+        self.assertEqual(inst.type.coding[0].display, "Outpatient Note")
+        self.assertEqual(inst.type.coding[0].system, "http://loinc.org")
+
diff --git a/fhirclient/models/domainresource.py b/fhirclient/models/domainresource.py
new file mode 100644
index 0000000..abda9f3
--- /dev/null
+++ b/fhirclient/models/domainresource.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/DomainResource) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import resource
+
+class DomainResource(resource.Resource):
+    """ A resource with narrative, extensions, and contained resources.
+    
+    A resource that includes narrative, extensions, and contained resources.
+    """
+    
+    resource_type = "DomainResource"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contained = None
+        """ Contained, inline Resources.
+        List of `Resource` items (represented as `dict` in JSON). """
+        
+        self.extension = None
+        """ Additional Content defined by implementations.
+        List of `Extension` items (represented as `dict` in JSON). """
+        
+        self.modifierExtension = None
+        """ Extensions that cannot be ignored.
+        List of `Extension` items (represented as `dict` in JSON). """
+        
+        self.text = None
+        """ Text summary of the resource, for human interpretation.
+        Type `Narrative` (represented as `dict` in JSON). """
+        
+        super(DomainResource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(DomainResource, self).elementProperties()
+        js.extend([
+            ("contained", "contained", resource.Resource, True, None, False),
+            ("extension", "extension", extension.Extension, True, None, False),
+            ("modifierExtension", "modifierExtension", extension.Extension, True, None, False),
+            ("text", "text", narrative.Narrative, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import extension
+except ImportError:
+    extension = sys.modules[__package__ + '.extension']
+try:
+    from . import narrative
+except ImportError:
+    narrative = sys.modules[__package__ + '.narrative']
diff --git a/fhirclient/models/dosage.py b/fhirclient/models/dosage.py
new file mode 100644
index 0000000..1e361aa
--- /dev/null
+++ b/fhirclient/models/dosage.py
@@ -0,0 +1,146 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Dosage) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Dosage(element.Element):
+    """ How the medication is/was taken or should be taken.
+    
+    Indicates how the medication is/was taken or should be taken by the
+    patient.
+    """
+    
+    resource_type = "Dosage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.additionalInstruction = None
+        """ Supplemental instruction - e.g. "with meals".
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.asNeededBoolean = None
+        """ Take "as needed" (for x).
+        Type `bool`. """
+        
+        self.asNeededCodeableConcept = None
+        """ Take "as needed" (for x).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.doseQuantity = None
+        """ Amount of medication per dose.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.doseRange = None
+        """ Amount of medication per dose.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.maxDosePerAdministration = None
+        """ Upper limit on medication per administration.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.maxDosePerLifetime = None
+        """ Upper limit on medication per lifetime of the patient.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.maxDosePerPeriod = None
+        """ Upper limit on medication per unit of time.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.method = None
+        """ Technique for administering medication.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.patientInstruction = None
+        """ Patient or consumer oriented instructions.
+        Type `str`. """
+        
+        self.rateQuantity = None
+        """ Amount of medication per unit of time.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.rateRange = None
+        """ Amount of medication per unit of time.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.rateRatio = None
+        """ Amount of medication per unit of time.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.route = None
+        """ How drug should enter body.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ The order of the dosage instructions.
+        Type `int`. """
+        
+        self.site = None
+        """ Body site to administer to.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.text = None
+        """ Free text dosage instructions e.g. SIG.
+        Type `str`. """
+        
+        self.timing = None
+        """ When medication should be administered.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        super(Dosage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Dosage, self).elementProperties()
+        js.extend([
+            ("additionalInstruction", "additionalInstruction", codeableconcept.CodeableConcept, True, None, False),
+            ("asNeededBoolean", "asNeededBoolean", bool, False, "asNeeded", False),
+            ("asNeededCodeableConcept", "asNeededCodeableConcept", codeableconcept.CodeableConcept, False, "asNeeded", False),
+            ("doseQuantity", "doseQuantity", quantity.Quantity, False, "dose", False),
+            ("doseRange", "doseRange", range.Range, False, "dose", False),
+            ("maxDosePerAdministration", "maxDosePerAdministration", quantity.Quantity, False, None, False),
+            ("maxDosePerLifetime", "maxDosePerLifetime", quantity.Quantity, False, None, False),
+            ("maxDosePerPeriod", "maxDosePerPeriod", ratio.Ratio, False, None, False),
+            ("method", "method", codeableconcept.CodeableConcept, False, None, False),
+            ("patientInstruction", "patientInstruction", str, False, None, False),
+            ("rateQuantity", "rateQuantity", quantity.Quantity, False, "rate", False),
+            ("rateRange", "rateRange", range.Range, False, "rate", False),
+            ("rateRatio", "rateRatio", ratio.Ratio, False, "rate", False),
+            ("route", "route", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, False),
+            ("site", "site", codeableconcept.CodeableConcept, False, None, False),
+            ("text", "text", str, False, None, False),
+            ("timing", "timing", timing.Timing, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/duration.py b/fhirclient/models/duration.py
new file mode 100644
index 0000000..d5b6252
--- /dev/null
+++ b/fhirclient/models/duration.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Duration) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import quantity
+
+class Duration(quantity.Quantity):
+    """ A length of time.
+    """
+    
+    resource_type = "Duration"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        super(Duration, self).__init__(jsondict=jsondict, strict=strict)
+
+
diff --git a/fhirclient/models/element.py b/fhirclient/models/element.py
new file mode 100644
index 0000000..aeedcbb
--- /dev/null
+++ b/fhirclient/models/element.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Element) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import fhirabstractbase
+
+class Element(fhirabstractbase.FHIRAbstractBase):
+    """ Base for all elements.
+    
+    Base definition for all elements in a resource.
+    """
+    
+    resource_type = "Element"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.extension = None
+        """ Additional Content defined by implementations.
+        List of `Extension` items (represented as `dict` in JSON). """
+        
+        self.id = None
+        """ xml:id (or equivalent in JSON).
+        Type `str`. """
+        
+        super(Element, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Element, self).elementProperties()
+        from . import extension
+        js.extend([
+            ("extension", "extension", extension.Extension, True, None, False),
+            ("id", "id", str, False, None, False),
+        ])
+        return js
+
+
diff --git a/fhirclient/models/elementdefinition.py b/fhirclient/models/elementdefinition.py
new file mode 100644
index 0000000..3c9a088
--- /dev/null
+++ b/fhirclient/models/elementdefinition.py
@@ -0,0 +1,1483 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ElementDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class ElementDefinition(element.Element):
+    """ Definition of an element in a resource or extension.
+    
+    Captures constraints on each element within the resource, profile, or
+    extension.
+    """
+    
+    resource_type = "ElementDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.alias = None
+        """ Other names.
+        List of `str` items. """
+        
+        self.base = None
+        """ Base definition information for tools.
+        Type `ElementDefinitionBase` (represented as `dict` in JSON). """
+        
+        self.binding = None
+        """ ValueSet details if this is coded.
+        Type `ElementDefinitionBinding` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Corresponding codes in terminologies.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.comment = None
+        """ Comments about the use of this element.
+        Type `str`. """
+        
+        self.condition = None
+        """ Reference to invariant about presence.
+        List of `str` items. """
+        
+        self.constraint = None
+        """ Condition that must evaluate to true.
+        List of `ElementDefinitionConstraint` items (represented as `dict` in JSON). """
+        
+        self.contentReference = None
+        """ Reference to definition of content for the element.
+        Type `str`. """
+        
+        self.defaultValueAddress = None
+        """ Specified value if missing from instance.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.defaultValueAge = None
+        """ Specified value if missing from instance.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.defaultValueAnnotation = None
+        """ Specified value if missing from instance.
+        Type `Annotation` (represented as `dict` in JSON). """
+        
+        self.defaultValueAttachment = None
+        """ Specified value if missing from instance.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.defaultValueBase64Binary = None
+        """ Specified value if missing from instance.
+        Type `str`. """
+        
+        self.defaultValueBoolean = None
+        """ Specified value if missing from instance.
+        Type `bool`. """
+        
+        self.defaultValueCode = None
+        """ Specified value if missing from instance.
+        Type `str`. """
+        
+        self.defaultValueCodeableConcept = None
+        """ Specified value if missing from instance.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.defaultValueCoding = None
+        """ Specified value if missing from instance.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.defaultValueContactPoint = None
+        """ Specified value if missing from instance.
+        Type `ContactPoint` (represented as `dict` in JSON). """
+        
+        self.defaultValueCount = None
+        """ Specified value if missing from instance.
+        Type `Count` (represented as `dict` in JSON). """
+        
+        self.defaultValueDate = None
+        """ Specified value if missing from instance.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.defaultValueDateTime = None
+        """ Specified value if missing from instance.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.defaultValueDecimal = None
+        """ Specified value if missing from instance.
+        Type `float`. """
+        
+        self.defaultValueDistance = None
+        """ Specified value if missing from instance.
+        Type `Distance` (represented as `dict` in JSON). """
+        
+        self.defaultValueDuration = None
+        """ Specified value if missing from instance.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.defaultValueHumanName = None
+        """ Specified value if missing from instance.
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.defaultValueId = None
+        """ Specified value if missing from instance.
+        Type `str`. """
+        
+        self.defaultValueIdentifier = None
+        """ Specified value if missing from instance.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.defaultValueInstant = None
+        """ Specified value if missing from instance.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.defaultValueInteger = None
+        """ Specified value if missing from instance.
+        Type `int`. """
+        
+        self.defaultValueMarkdown = None
+        """ Specified value if missing from instance.
+        Type `str`. """
+        
+        self.defaultValueMeta = None
+        """ Specified value if missing from instance.
+        Type `Meta` (represented as `dict` in JSON). """
+        
+        self.defaultValueMoney = None
+        """ Specified value if missing from instance.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.defaultValueOid = None
+        """ Specified value if missing from instance.
+        Type `str`. """
+        
+        self.defaultValuePeriod = None
+        """ Specified value if missing from instance.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.defaultValuePositiveInt = None
+        """ Specified value if missing from instance.
+        Type `int`. """
+        
+        self.defaultValueQuantity = None
+        """ Specified value if missing from instance.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.defaultValueRange = None
+        """ Specified value if missing from instance.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.defaultValueRatio = None
+        """ Specified value if missing from instance.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.defaultValueReference = None
+        """ Specified value if missing from instance.
+        Type `FHIRReference` (represented as `dict` in JSON). """
+        
+        self.defaultValueSampledData = None
+        """ Specified value if missing from instance.
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.defaultValueSignature = None
+        """ Specified value if missing from instance.
+        Type `Signature` (represented as `dict` in JSON). """
+        
+        self.defaultValueString = None
+        """ Specified value if missing from instance.
+        Type `str`. """
+        
+        self.defaultValueTime = None
+        """ Specified value if missing from instance.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.defaultValueTiming = None
+        """ Specified value if missing from instance.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.defaultValueUnsignedInt = None
+        """ Specified value if missing from instance.
+        Type `int`. """
+        
+        self.defaultValueUri = None
+        """ Specified value if missing from instance.
+        Type `str`. """
+        
+        self.definition = None
+        """ Full formal definition as narrative text.
+        Type `str`. """
+        
+        self.example = None
+        """ Example value (as defined for type).
+        List of `ElementDefinitionExample` items (represented as `dict` in JSON). """
+        
+        self.fixedAddress = None
+        """ Value must be exactly this.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.fixedAge = None
+        """ Value must be exactly this.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.fixedAnnotation = None
+        """ Value must be exactly this.
+        Type `Annotation` (represented as `dict` in JSON). """
+        
+        self.fixedAttachment = None
+        """ Value must be exactly this.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.fixedBase64Binary = None
+        """ Value must be exactly this.
+        Type `str`. """
+        
+        self.fixedBoolean = None
+        """ Value must be exactly this.
+        Type `bool`. """
+        
+        self.fixedCode = None
+        """ Value must be exactly this.
+        Type `str`. """
+        
+        self.fixedCodeableConcept = None
+        """ Value must be exactly this.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.fixedCoding = None
+        """ Value must be exactly this.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.fixedContactPoint = None
+        """ Value must be exactly this.
+        Type `ContactPoint` (represented as `dict` in JSON). """
+        
+        self.fixedCount = None
+        """ Value must be exactly this.
+        Type `Count` (represented as `dict` in JSON). """
+        
+        self.fixedDate = None
+        """ Value must be exactly this.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.fixedDateTime = None
+        """ Value must be exactly this.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.fixedDecimal = None
+        """ Value must be exactly this.
+        Type `float`. """
+        
+        self.fixedDistance = None
+        """ Value must be exactly this.
+        Type `Distance` (represented as `dict` in JSON). """
+        
+        self.fixedDuration = None
+        """ Value must be exactly this.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.fixedHumanName = None
+        """ Value must be exactly this.
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.fixedId = None
+        """ Value must be exactly this.
+        Type `str`. """
+        
+        self.fixedIdentifier = None
+        """ Value must be exactly this.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.fixedInstant = None
+        """ Value must be exactly this.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.fixedInteger = None
+        """ Value must be exactly this.
+        Type `int`. """
+        
+        self.fixedMarkdown = None
+        """ Value must be exactly this.
+        Type `str`. """
+        
+        self.fixedMeta = None
+        """ Value must be exactly this.
+        Type `Meta` (represented as `dict` in JSON). """
+        
+        self.fixedMoney = None
+        """ Value must be exactly this.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.fixedOid = None
+        """ Value must be exactly this.
+        Type `str`. """
+        
+        self.fixedPeriod = None
+        """ Value must be exactly this.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.fixedPositiveInt = None
+        """ Value must be exactly this.
+        Type `int`. """
+        
+        self.fixedQuantity = None
+        """ Value must be exactly this.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.fixedRange = None
+        """ Value must be exactly this.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.fixedRatio = None
+        """ Value must be exactly this.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.fixedReference = None
+        """ Value must be exactly this.
+        Type `FHIRReference` (represented as `dict` in JSON). """
+        
+        self.fixedSampledData = None
+        """ Value must be exactly this.
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.fixedSignature = None
+        """ Value must be exactly this.
+        Type `Signature` (represented as `dict` in JSON). """
+        
+        self.fixedString = None
+        """ Value must be exactly this.
+        Type `str`. """
+        
+        self.fixedTime = None
+        """ Value must be exactly this.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.fixedTiming = None
+        """ Value must be exactly this.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.fixedUnsignedInt = None
+        """ Value must be exactly this.
+        Type `int`. """
+        
+        self.fixedUri = None
+        """ Value must be exactly this.
+        Type `str`. """
+        
+        self.isModifier = None
+        """ If this modifies the meaning of other elements.
+        Type `bool`. """
+        
+        self.isSummary = None
+        """ Include when _summary = true?.
+        Type `bool`. """
+        
+        self.label = None
+        """ Name for element to display with or prompt for element.
+        Type `str`. """
+        
+        self.mapping = None
+        """ Map element to another set of definitions.
+        List of `ElementDefinitionMapping` items (represented as `dict` in JSON). """
+        
+        self.max = None
+        """ Maximum Cardinality (a number or *).
+        Type `str`. """
+        
+        self.maxLength = None
+        """ Max length for strings.
+        Type `int`. """
+        
+        self.maxValueDate = None
+        """ Maximum Allowed Value (for some types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.maxValueDateTime = None
+        """ Maximum Allowed Value (for some types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.maxValueDecimal = None
+        """ Maximum Allowed Value (for some types).
+        Type `float`. """
+        
+        self.maxValueInstant = None
+        """ Maximum Allowed Value (for some types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.maxValueInteger = None
+        """ Maximum Allowed Value (for some types).
+        Type `int`. """
+        
+        self.maxValuePositiveInt = None
+        """ Maximum Allowed Value (for some types).
+        Type `int`. """
+        
+        self.maxValueQuantity = None
+        """ Maximum Allowed Value (for some types).
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.maxValueTime = None
+        """ Maximum Allowed Value (for some types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.maxValueUnsignedInt = None
+        """ Maximum Allowed Value (for some types).
+        Type `int`. """
+        
+        self.meaningWhenMissing = None
+        """ Implicit meaning when this element is missing.
+        Type `str`. """
+        
+        self.min = None
+        """ Minimum Cardinality.
+        Type `int`. """
+        
+        self.minValueDate = None
+        """ Minimum Allowed Value (for some types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.minValueDateTime = None
+        """ Minimum Allowed Value (for some types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.minValueDecimal = None
+        """ Minimum Allowed Value (for some types).
+        Type `float`. """
+        
+        self.minValueInstant = None
+        """ Minimum Allowed Value (for some types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.minValueInteger = None
+        """ Minimum Allowed Value (for some types).
+        Type `int`. """
+        
+        self.minValuePositiveInt = None
+        """ Minimum Allowed Value (for some types).
+        Type `int`. """
+        
+        self.minValueQuantity = None
+        """ Minimum Allowed Value (for some types).
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.minValueTime = None
+        """ Minimum Allowed Value (for some types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.minValueUnsignedInt = None
+        """ Minimum Allowed Value (for some types).
+        Type `int`. """
+        
+        self.mustSupport = None
+        """ If the element must supported.
+        Type `bool`. """
+        
+        self.orderMeaning = None
+        """ What the order of the elements means.
+        Type `str`. """
+        
+        self.path = None
+        """ Path of the element in the hierarchy of elements.
+        Type `str`. """
+        
+        self.patternAddress = None
+        """ Value must have at least these property values.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.patternAge = None
+        """ Value must have at least these property values.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.patternAnnotation = None
+        """ Value must have at least these property values.
+        Type `Annotation` (represented as `dict` in JSON). """
+        
+        self.patternAttachment = None
+        """ Value must have at least these property values.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.patternBase64Binary = None
+        """ Value must have at least these property values.
+        Type `str`. """
+        
+        self.patternBoolean = None
+        """ Value must have at least these property values.
+        Type `bool`. """
+        
+        self.patternCode = None
+        """ Value must have at least these property values.
+        Type `str`. """
+        
+        self.patternCodeableConcept = None
+        """ Value must have at least these property values.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.patternCoding = None
+        """ Value must have at least these property values.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.patternContactPoint = None
+        """ Value must have at least these property values.
+        Type `ContactPoint` (represented as `dict` in JSON). """
+        
+        self.patternCount = None
+        """ Value must have at least these property values.
+        Type `Count` (represented as `dict` in JSON). """
+        
+        self.patternDate = None
+        """ Value must have at least these property values.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.patternDateTime = None
+        """ Value must have at least these property values.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.patternDecimal = None
+        """ Value must have at least these property values.
+        Type `float`. """
+        
+        self.patternDistance = None
+        """ Value must have at least these property values.
+        Type `Distance` (represented as `dict` in JSON). """
+        
+        self.patternDuration = None
+        """ Value must have at least these property values.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.patternHumanName = None
+        """ Value must have at least these property values.
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.patternId = None
+        """ Value must have at least these property values.
+        Type `str`. """
+        
+        self.patternIdentifier = None
+        """ Value must have at least these property values.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.patternInstant = None
+        """ Value must have at least these property values.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.patternInteger = None
+        """ Value must have at least these property values.
+        Type `int`. """
+        
+        self.patternMarkdown = None
+        """ Value must have at least these property values.
+        Type `str`. """
+        
+        self.patternMeta = None
+        """ Value must have at least these property values.
+        Type `Meta` (represented as `dict` in JSON). """
+        
+        self.patternMoney = None
+        """ Value must have at least these property values.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.patternOid = None
+        """ Value must have at least these property values.
+        Type `str`. """
+        
+        self.patternPeriod = None
+        """ Value must have at least these property values.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.patternPositiveInt = None
+        """ Value must have at least these property values.
+        Type `int`. """
+        
+        self.patternQuantity = None
+        """ Value must have at least these property values.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.patternRange = None
+        """ Value must have at least these property values.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.patternRatio = None
+        """ Value must have at least these property values.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.patternReference = None
+        """ Value must have at least these property values.
+        Type `FHIRReference` (represented as `dict` in JSON). """
+        
+        self.patternSampledData = None
+        """ Value must have at least these property values.
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.patternSignature = None
+        """ Value must have at least these property values.
+        Type `Signature` (represented as `dict` in JSON). """
+        
+        self.patternString = None
+        """ Value must have at least these property values.
+        Type `str`. """
+        
+        self.patternTime = None
+        """ Value must have at least these property values.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.patternTiming = None
+        """ Value must have at least these property values.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.patternUnsignedInt = None
+        """ Value must have at least these property values.
+        Type `int`. """
+        
+        self.patternUri = None
+        """ Value must have at least these property values.
+        Type `str`. """
+        
+        self.representation = None
+        """ xmlAttr | xmlText | typeAttr | cdaText | xhtml.
+        List of `str` items. """
+        
+        self.requirements = None
+        """ Why this resource has been created.
+        Type `str`. """
+        
+        self.short = None
+        """ Concise definition for space-constrained presentation.
+        Type `str`. """
+        
+        self.sliceName = None
+        """ Name for this particular element (in a set of slices).
+        Type `str`. """
+        
+        self.slicing = None
+        """ This element is sliced - slices follow.
+        Type `ElementDefinitionSlicing` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Data type and Profile for this element.
+        List of `ElementDefinitionType` items (represented as `dict` in JSON). """
+        
+        super(ElementDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ElementDefinition, self).elementProperties()
+        js.extend([
+            ("alias", "alias", str, True, None, False),
+            ("base", "base", ElementDefinitionBase, False, None, False),
+            ("binding", "binding", ElementDefinitionBinding, False, None, False),
+            ("code", "code", coding.Coding, True, None, False),
+            ("comment", "comment", str, False, None, False),
+            ("condition", "condition", str, True, None, False),
+            ("constraint", "constraint", ElementDefinitionConstraint, True, None, False),
+            ("contentReference", "contentReference", str, False, None, False),
+            ("defaultValueAddress", "defaultValueAddress", address.Address, False, "defaultValue", False),
+            ("defaultValueAge", "defaultValueAge", age.Age, False, "defaultValue", False),
+            ("defaultValueAnnotation", "defaultValueAnnotation", annotation.Annotation, False, "defaultValue", False),
+            ("defaultValueAttachment", "defaultValueAttachment", attachment.Attachment, False, "defaultValue", False),
+            ("defaultValueBase64Binary", "defaultValueBase64Binary", str, False, "defaultValue", False),
+            ("defaultValueBoolean", "defaultValueBoolean", bool, False, "defaultValue", False),
+            ("defaultValueCode", "defaultValueCode", str, False, "defaultValue", False),
+            ("defaultValueCodeableConcept", "defaultValueCodeableConcept", codeableconcept.CodeableConcept, False, "defaultValue", False),
+            ("defaultValueCoding", "defaultValueCoding", coding.Coding, False, "defaultValue", False),
+            ("defaultValueContactPoint", "defaultValueContactPoint", contactpoint.ContactPoint, False, "defaultValue", False),
+            ("defaultValueCount", "defaultValueCount", count.Count, False, "defaultValue", False),
+            ("defaultValueDate", "defaultValueDate", fhirdate.FHIRDate, False, "defaultValue", False),
+            ("defaultValueDateTime", "defaultValueDateTime", fhirdate.FHIRDate, False, "defaultValue", False),
+            ("defaultValueDecimal", "defaultValueDecimal", float, False, "defaultValue", False),
+            ("defaultValueDistance", "defaultValueDistance", distance.Distance, False, "defaultValue", False),
+            ("defaultValueDuration", "defaultValueDuration", duration.Duration, False, "defaultValue", False),
+            ("defaultValueHumanName", "defaultValueHumanName", humanname.HumanName, False, "defaultValue", False),
+            ("defaultValueId", "defaultValueId", str, False, "defaultValue", False),
+            ("defaultValueIdentifier", "defaultValueIdentifier", identifier.Identifier, False, "defaultValue", False),
+            ("defaultValueInstant", "defaultValueInstant", fhirdate.FHIRDate, False, "defaultValue", False),
+            ("defaultValueInteger", "defaultValueInteger", int, False, "defaultValue", False),
+            ("defaultValueMarkdown", "defaultValueMarkdown", str, False, "defaultValue", False),
+            ("defaultValueMeta", "defaultValueMeta", meta.Meta, False, "defaultValue", False),
+            ("defaultValueMoney", "defaultValueMoney", money.Money, False, "defaultValue", False),
+            ("defaultValueOid", "defaultValueOid", str, False, "defaultValue", False),
+            ("defaultValuePeriod", "defaultValuePeriod", period.Period, False, "defaultValue", False),
+            ("defaultValuePositiveInt", "defaultValuePositiveInt", int, False, "defaultValue", False),
+            ("defaultValueQuantity", "defaultValueQuantity", quantity.Quantity, False, "defaultValue", False),
+            ("defaultValueRange", "defaultValueRange", range.Range, False, "defaultValue", False),
+            ("defaultValueRatio", "defaultValueRatio", ratio.Ratio, False, "defaultValue", False),
+            ("defaultValueReference", "defaultValueReference", fhirreference.FHIRReference, False, "defaultValue", False),
+            ("defaultValueSampledData", "defaultValueSampledData", sampleddata.SampledData, False, "defaultValue", False),
+            ("defaultValueSignature", "defaultValueSignature", signature.Signature, False, "defaultValue", False),
+            ("defaultValueString", "defaultValueString", str, False, "defaultValue", False),
+            ("defaultValueTime", "defaultValueTime", fhirdate.FHIRDate, False, "defaultValue", False),
+            ("defaultValueTiming", "defaultValueTiming", timing.Timing, False, "defaultValue", False),
+            ("defaultValueUnsignedInt", "defaultValueUnsignedInt", int, False, "defaultValue", False),
+            ("defaultValueUri", "defaultValueUri", str, False, "defaultValue", False),
+            ("definition", "definition", str, False, None, False),
+            ("example", "example", ElementDefinitionExample, True, None, False),
+            ("fixedAddress", "fixedAddress", address.Address, False, "fixed", False),
+            ("fixedAge", "fixedAge", age.Age, False, "fixed", False),
+            ("fixedAnnotation", "fixedAnnotation", annotation.Annotation, False, "fixed", False),
+            ("fixedAttachment", "fixedAttachment", attachment.Attachment, False, "fixed", False),
+            ("fixedBase64Binary", "fixedBase64Binary", str, False, "fixed", False),
+            ("fixedBoolean", "fixedBoolean", bool, False, "fixed", False),
+            ("fixedCode", "fixedCode", str, False, "fixed", False),
+            ("fixedCodeableConcept", "fixedCodeableConcept", codeableconcept.CodeableConcept, False, "fixed", False),
+            ("fixedCoding", "fixedCoding", coding.Coding, False, "fixed", False),
+            ("fixedContactPoint", "fixedContactPoint", contactpoint.ContactPoint, False, "fixed", False),
+            ("fixedCount", "fixedCount", count.Count, False, "fixed", False),
+            ("fixedDate", "fixedDate", fhirdate.FHIRDate, False, "fixed", False),
+            ("fixedDateTime", "fixedDateTime", fhirdate.FHIRDate, False, "fixed", False),
+            ("fixedDecimal", "fixedDecimal", float, False, "fixed", False),
+            ("fixedDistance", "fixedDistance", distance.Distance, False, "fixed", False),
+            ("fixedDuration", "fixedDuration", duration.Duration, False, "fixed", False),
+            ("fixedHumanName", "fixedHumanName", humanname.HumanName, False, "fixed", False),
+            ("fixedId", "fixedId", str, False, "fixed", False),
+            ("fixedIdentifier", "fixedIdentifier", identifier.Identifier, False, "fixed", False),
+            ("fixedInstant", "fixedInstant", fhirdate.FHIRDate, False, "fixed", False),
+            ("fixedInteger", "fixedInteger", int, False, "fixed", False),
+            ("fixedMarkdown", "fixedMarkdown", str, False, "fixed", False),
+            ("fixedMeta", "fixedMeta", meta.Meta, False, "fixed", False),
+            ("fixedMoney", "fixedMoney", money.Money, False, "fixed", False),
+            ("fixedOid", "fixedOid", str, False, "fixed", False),
+            ("fixedPeriod", "fixedPeriod", period.Period, False, "fixed", False),
+            ("fixedPositiveInt", "fixedPositiveInt", int, False, "fixed", False),
+            ("fixedQuantity", "fixedQuantity", quantity.Quantity, False, "fixed", False),
+            ("fixedRange", "fixedRange", range.Range, False, "fixed", False),
+            ("fixedRatio", "fixedRatio", ratio.Ratio, False, "fixed", False),
+            ("fixedReference", "fixedReference", fhirreference.FHIRReference, False, "fixed", False),
+            ("fixedSampledData", "fixedSampledData", sampleddata.SampledData, False, "fixed", False),
+            ("fixedSignature", "fixedSignature", signature.Signature, False, "fixed", False),
+            ("fixedString", "fixedString", str, False, "fixed", False),
+            ("fixedTime", "fixedTime", fhirdate.FHIRDate, False, "fixed", False),
+            ("fixedTiming", "fixedTiming", timing.Timing, False, "fixed", False),
+            ("fixedUnsignedInt", "fixedUnsignedInt", int, False, "fixed", False),
+            ("fixedUri", "fixedUri", str, False, "fixed", False),
+            ("isModifier", "isModifier", bool, False, None, False),
+            ("isSummary", "isSummary", bool, False, None, False),
+            ("label", "label", str, False, None, False),
+            ("mapping", "mapping", ElementDefinitionMapping, True, None, False),
+            ("max", "max", str, False, None, False),
+            ("maxLength", "maxLength", int, False, None, False),
+            ("maxValueDate", "maxValueDate", fhirdate.FHIRDate, False, "maxValue", False),
+            ("maxValueDateTime", "maxValueDateTime", fhirdate.FHIRDate, False, "maxValue", False),
+            ("maxValueDecimal", "maxValueDecimal", float, False, "maxValue", False),
+            ("maxValueInstant", "maxValueInstant", fhirdate.FHIRDate, False, "maxValue", False),
+            ("maxValueInteger", "maxValueInteger", int, False, "maxValue", False),
+            ("maxValuePositiveInt", "maxValuePositiveInt", int, False, "maxValue", False),
+            ("maxValueQuantity", "maxValueQuantity", quantity.Quantity, False, "maxValue", False),
+            ("maxValueTime", "maxValueTime", fhirdate.FHIRDate, False, "maxValue", False),
+            ("maxValueUnsignedInt", "maxValueUnsignedInt", int, False, "maxValue", False),
+            ("meaningWhenMissing", "meaningWhenMissing", str, False, None, False),
+            ("min", "min", int, False, None, False),
+            ("minValueDate", "minValueDate", fhirdate.FHIRDate, False, "minValue", False),
+            ("minValueDateTime", "minValueDateTime", fhirdate.FHIRDate, False, "minValue", False),
+            ("minValueDecimal", "minValueDecimal", float, False, "minValue", False),
+            ("minValueInstant", "minValueInstant", fhirdate.FHIRDate, False, "minValue", False),
+            ("minValueInteger", "minValueInteger", int, False, "minValue", False),
+            ("minValuePositiveInt", "minValuePositiveInt", int, False, "minValue", False),
+            ("minValueQuantity", "minValueQuantity", quantity.Quantity, False, "minValue", False),
+            ("minValueTime", "minValueTime", fhirdate.FHIRDate, False, "minValue", False),
+            ("minValueUnsignedInt", "minValueUnsignedInt", int, False, "minValue", False),
+            ("mustSupport", "mustSupport", bool, False, None, False),
+            ("orderMeaning", "orderMeaning", str, False, None, False),
+            ("path", "path", str, False, None, True),
+            ("patternAddress", "patternAddress", address.Address, False, "pattern", False),
+            ("patternAge", "patternAge", age.Age, False, "pattern", False),
+            ("patternAnnotation", "patternAnnotation", annotation.Annotation, False, "pattern", False),
+            ("patternAttachment", "patternAttachment", attachment.Attachment, False, "pattern", False),
+            ("patternBase64Binary", "patternBase64Binary", str, False, "pattern", False),
+            ("patternBoolean", "patternBoolean", bool, False, "pattern", False),
+            ("patternCode", "patternCode", str, False, "pattern", False),
+            ("patternCodeableConcept", "patternCodeableConcept", codeableconcept.CodeableConcept, False, "pattern", False),
+            ("patternCoding", "patternCoding", coding.Coding, False, "pattern", False),
+            ("patternContactPoint", "patternContactPoint", contactpoint.ContactPoint, False, "pattern", False),
+            ("patternCount", "patternCount", count.Count, False, "pattern", False),
+            ("patternDate", "patternDate", fhirdate.FHIRDate, False, "pattern", False),
+            ("patternDateTime", "patternDateTime", fhirdate.FHIRDate, False, "pattern", False),
+            ("patternDecimal", "patternDecimal", float, False, "pattern", False),
+            ("patternDistance", "patternDistance", distance.Distance, False, "pattern", False),
+            ("patternDuration", "patternDuration", duration.Duration, False, "pattern", False),
+            ("patternHumanName", "patternHumanName", humanname.HumanName, False, "pattern", False),
+            ("patternId", "patternId", str, False, "pattern", False),
+            ("patternIdentifier", "patternIdentifier", identifier.Identifier, False, "pattern", False),
+            ("patternInstant", "patternInstant", fhirdate.FHIRDate, False, "pattern", False),
+            ("patternInteger", "patternInteger", int, False, "pattern", False),
+            ("patternMarkdown", "patternMarkdown", str, False, "pattern", False),
+            ("patternMeta", "patternMeta", meta.Meta, False, "pattern", False),
+            ("patternMoney", "patternMoney", money.Money, False, "pattern", False),
+            ("patternOid", "patternOid", str, False, "pattern", False),
+            ("patternPeriod", "patternPeriod", period.Period, False, "pattern", False),
+            ("patternPositiveInt", "patternPositiveInt", int, False, "pattern", False),
+            ("patternQuantity", "patternQuantity", quantity.Quantity, False, "pattern", False),
+            ("patternRange", "patternRange", range.Range, False, "pattern", False),
+            ("patternRatio", "patternRatio", ratio.Ratio, False, "pattern", False),
+            ("patternReference", "patternReference", fhirreference.FHIRReference, False, "pattern", False),
+            ("patternSampledData", "patternSampledData", sampleddata.SampledData, False, "pattern", False),
+            ("patternSignature", "patternSignature", signature.Signature, False, "pattern", False),
+            ("patternString", "patternString", str, False, "pattern", False),
+            ("patternTime", "patternTime", fhirdate.FHIRDate, False, "pattern", False),
+            ("patternTiming", "patternTiming", timing.Timing, False, "pattern", False),
+            ("patternUnsignedInt", "patternUnsignedInt", int, False, "pattern", False),
+            ("patternUri", "patternUri", str, False, "pattern", False),
+            ("representation", "representation", str, True, None, False),
+            ("requirements", "requirements", str, False, None, False),
+            ("short", "short", str, False, None, False),
+            ("sliceName", "sliceName", str, False, None, False),
+            ("slicing", "slicing", ElementDefinitionSlicing, False, None, False),
+            ("type", "type", ElementDefinitionType, True, None, False),
+        ])
+        return js
+
+
+class ElementDefinitionBase(element.Element):
+    """ Base definition information for tools.
+    
+    Information about the base definition of the element, provided to make it
+    unnecessary for tools to trace the deviation of the element through the
+    derived and related profiles. This information is provided when the element
+    definition is not the original definition of an element - i.g. either in a
+    constraint on another type, or for elements from a super type in a snap
+    shot.
+    """
+    
+    resource_type = "ElementDefinitionBase"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.max = None
+        """ Max cardinality of the base element.
+        Type `str`. """
+        
+        self.min = None
+        """ Min cardinality of the base element.
+        Type `int`. """
+        
+        self.path = None
+        """ Path that identifies the base element.
+        Type `str`. """
+        
+        super(ElementDefinitionBase, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ElementDefinitionBase, self).elementProperties()
+        js.extend([
+            ("max", "max", str, False, None, True),
+            ("min", "min", int, False, None, True),
+            ("path", "path", str, False, None, True),
+        ])
+        return js
+
+
+class ElementDefinitionBinding(element.Element):
+    """ ValueSet details if this is coded.
+    
+    Binds to a value set if this element is coded (code, Coding,
+    CodeableConcept, Quantity), or the data types (string, uri).
+    """
+    
+    resource_type = "ElementDefinitionBinding"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Human explanation of the value set.
+        Type `str`. """
+        
+        self.strength = None
+        """ required | extensible | preferred | example.
+        Type `str`. """
+        
+        self.valueSetReference = None
+        """ Source of value set.
+        Type `FHIRReference` referencing `ValueSet` (represented as `dict` in JSON). """
+        
+        self.valueSetUri = None
+        """ Source of value set.
+        Type `str`. """
+        
+        super(ElementDefinitionBinding, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ElementDefinitionBinding, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("strength", "strength", str, False, None, True),
+            ("valueSetReference", "valueSetReference", fhirreference.FHIRReference, False, "valueSet", False),
+            ("valueSetUri", "valueSetUri", str, False, "valueSet", False),
+        ])
+        return js
+
+
+class ElementDefinitionConstraint(element.Element):
+    """ Condition that must evaluate to true.
+    
+    Formal constraints such as co-occurrence and other constraints that can be
+    computationally evaluated within the context of the instance.
+    """
+    
+    resource_type = "ElementDefinitionConstraint"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.expression = None
+        """ FHIRPath expression of constraint.
+        Type `str`. """
+        
+        self.human = None
+        """ Human description of constraint.
+        Type `str`. """
+        
+        self.key = None
+        """ Target of 'condition' reference above.
+        Type `str`. """
+        
+        self.requirements = None
+        """ Why this constraint is necessary or appropriate.
+        Type `str`. """
+        
+        self.severity = None
+        """ error | warning.
+        Type `str`. """
+        
+        self.source = None
+        """ Reference to original source of constraint.
+        Type `str`. """
+        
+        self.xpath = None
+        """ XPath expression of constraint.
+        Type `str`. """
+        
+        super(ElementDefinitionConstraint, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ElementDefinitionConstraint, self).elementProperties()
+        js.extend([
+            ("expression", "expression", str, False, None, True),
+            ("human", "human", str, False, None, True),
+            ("key", "key", str, False, None, True),
+            ("requirements", "requirements", str, False, None, False),
+            ("severity", "severity", str, False, None, True),
+            ("source", "source", str, False, None, False),
+            ("xpath", "xpath", str, False, None, False),
+        ])
+        return js
+
+
+class ElementDefinitionExample(element.Element):
+    """ Example value (as defined for type).
+    
+    A sample value for this element demonstrating the type of information that
+    would typically be found in the element.
+    """
+    
+    resource_type = "ElementDefinitionExample"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.label = None
+        """ Describes the purpose of this example.
+        Type `str`. """
+        
+        self.valueAddress = None
+        """ Value of Example (one of allowed types).
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.valueAge = None
+        """ Value of Example (one of allowed types).
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.valueAnnotation = None
+        """ Value of Example (one of allowed types).
+        Type `Annotation` (represented as `dict` in JSON). """
+        
+        self.valueAttachment = None
+        """ Value of Example (one of allowed types).
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.valueBase64Binary = None
+        """ Value of Example (one of allowed types).
+        Type `str`. """
+        
+        self.valueBoolean = None
+        """ Value of Example (one of allowed types).
+        Type `bool`. """
+        
+        self.valueCode = None
+        """ Value of Example (one of allowed types).
+        Type `str`. """
+        
+        self.valueCodeableConcept = None
+        """ Value of Example (one of allowed types).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueCoding = None
+        """ Value of Example (one of allowed types).
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.valueContactPoint = None
+        """ Value of Example (one of allowed types).
+        Type `ContactPoint` (represented as `dict` in JSON). """
+        
+        self.valueCount = None
+        """ Value of Example (one of allowed types).
+        Type `Count` (represented as `dict` in JSON). """
+        
+        self.valueDate = None
+        """ Value of Example (one of allowed types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDateTime = None
+        """ Value of Example (one of allowed types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDecimal = None
+        """ Value of Example (one of allowed types).
+        Type `float`. """
+        
+        self.valueDistance = None
+        """ Value of Example (one of allowed types).
+        Type `Distance` (represented as `dict` in JSON). """
+        
+        self.valueDuration = None
+        """ Value of Example (one of allowed types).
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.valueHumanName = None
+        """ Value of Example (one of allowed types).
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.valueId = None
+        """ Value of Example (one of allowed types).
+        Type `str`. """
+        
+        self.valueIdentifier = None
+        """ Value of Example (one of allowed types).
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.valueInstant = None
+        """ Value of Example (one of allowed types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueInteger = None
+        """ Value of Example (one of allowed types).
+        Type `int`. """
+        
+        self.valueMarkdown = None
+        """ Value of Example (one of allowed types).
+        Type `str`. """
+        
+        self.valueMeta = None
+        """ Value of Example (one of allowed types).
+        Type `Meta` (represented as `dict` in JSON). """
+        
+        self.valueMoney = None
+        """ Value of Example (one of allowed types).
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.valueOid = None
+        """ Value of Example (one of allowed types).
+        Type `str`. """
+        
+        self.valuePeriod = None
+        """ Value of Example (one of allowed types).
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.valuePositiveInt = None
+        """ Value of Example (one of allowed types).
+        Type `int`. """
+        
+        self.valueQuantity = None
+        """ Value of Example (one of allowed types).
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueRange = None
+        """ Value of Example (one of allowed types).
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.valueRatio = None
+        """ Value of Example (one of allowed types).
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.valueReference = None
+        """ Value of Example (one of allowed types).
+        Type `FHIRReference` (represented as `dict` in JSON). """
+        
+        self.valueSampledData = None
+        """ Value of Example (one of allowed types).
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.valueSignature = None
+        """ Value of Example (one of allowed types).
+        Type `Signature` (represented as `dict` in JSON). """
+        
+        self.valueString = None
+        """ Value of Example (one of allowed types).
+        Type `str`. """
+        
+        self.valueTime = None
+        """ Value of Example (one of allowed types).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueTiming = None
+        """ Value of Example (one of allowed types).
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.valueUnsignedInt = None
+        """ Value of Example (one of allowed types).
+        Type `int`. """
+        
+        self.valueUri = None
+        """ Value of Example (one of allowed types).
+        Type `str`. """
+        
+        super(ElementDefinitionExample, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ElementDefinitionExample, self).elementProperties()
+        js.extend([
+            ("label", "label", str, False, None, True),
+            ("valueAddress", "valueAddress", address.Address, False, "value", True),
+            ("valueAge", "valueAge", age.Age, False, "value", True),
+            ("valueAnnotation", "valueAnnotation", annotation.Annotation, False, "value", True),
+            ("valueAttachment", "valueAttachment", attachment.Attachment, False, "value", True),
+            ("valueBase64Binary", "valueBase64Binary", str, False, "value", True),
+            ("valueBoolean", "valueBoolean", bool, False, "value", True),
+            ("valueCode", "valueCode", str, False, "value", True),
+            ("valueCodeableConcept", "valueCodeableConcept", codeableconcept.CodeableConcept, False, "value", True),
+            ("valueCoding", "valueCoding", coding.Coding, False, "value", True),
+            ("valueContactPoint", "valueContactPoint", contactpoint.ContactPoint, False, "value", True),
+            ("valueCount", "valueCount", count.Count, False, "value", True),
+            ("valueDate", "valueDate", fhirdate.FHIRDate, False, "value", True),
+            ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", True),
+            ("valueDecimal", "valueDecimal", float, False, "value", True),
+            ("valueDistance", "valueDistance", distance.Distance, False, "value", True),
+            ("valueDuration", "valueDuration", duration.Duration, False, "value", True),
+            ("valueHumanName", "valueHumanName", humanname.HumanName, False, "value", True),
+            ("valueId", "valueId", str, False, "value", True),
+            ("valueIdentifier", "valueIdentifier", identifier.Identifier, False, "value", True),
+            ("valueInstant", "valueInstant", fhirdate.FHIRDate, False, "value", True),
+            ("valueInteger", "valueInteger", int, False, "value", True),
+            ("valueMarkdown", "valueMarkdown", str, False, "value", True),
+            ("valueMeta", "valueMeta", meta.Meta, False, "value", True),
+            ("valueMoney", "valueMoney", money.Money, False, "value", True),
+            ("valueOid", "valueOid", str, False, "value", True),
+            ("valuePeriod", "valuePeriod", period.Period, False, "value", True),
+            ("valuePositiveInt", "valuePositiveInt", int, False, "value", True),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", True),
+            ("valueRange", "valueRange", range.Range, False, "value", True),
+            ("valueRatio", "valueRatio", ratio.Ratio, False, "value", True),
+            ("valueReference", "valueReference", fhirreference.FHIRReference, False, "value", True),
+            ("valueSampledData", "valueSampledData", sampleddata.SampledData, False, "value", True),
+            ("valueSignature", "valueSignature", signature.Signature, False, "value", True),
+            ("valueString", "valueString", str, False, "value", True),
+            ("valueTime", "valueTime", fhirdate.FHIRDate, False, "value", True),
+            ("valueTiming", "valueTiming", timing.Timing, False, "value", True),
+            ("valueUnsignedInt", "valueUnsignedInt", int, False, "value", True),
+            ("valueUri", "valueUri", str, False, "value", True),
+        ])
+        return js
+
+
+class ElementDefinitionMapping(element.Element):
+    """ Map element to another set of definitions.
+    
+    Identifies a concept from an external specification that roughly
+    corresponds to this element.
+    """
+    
+    resource_type = "ElementDefinitionMapping"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.comment = None
+        """ Comments about the mapping or its use.
+        Type `str`. """
+        
+        self.identity = None
+        """ Reference to mapping declaration.
+        Type `str`. """
+        
+        self.language = None
+        """ Computable language of mapping.
+        Type `str`. """
+        
+        self.map = None
+        """ Details of the mapping.
+        Type `str`. """
+        
+        super(ElementDefinitionMapping, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ElementDefinitionMapping, self).elementProperties()
+        js.extend([
+            ("comment", "comment", str, False, None, False),
+            ("identity", "identity", str, False, None, True),
+            ("language", "language", str, False, None, False),
+            ("map", "map", str, False, None, True),
+        ])
+        return js
+
+
+class ElementDefinitionSlicing(element.Element):
+    """ This element is sliced - slices follow.
+    
+    Indicates that the element is sliced into a set of alternative definitions
+    (i.e. in a structure definition, there are multiple different constraints
+    on a single element in the base resource). Slicing can be used in any
+    resource that has cardinality ..* on the base resource, or any resource
+    with a choice of types. The set of slices is any elements that come after
+    this in the element sequence that have the same path, until a shorter path
+    occurs (the shorter path terminates the set).
+    """
+    
+    resource_type = "ElementDefinitionSlicing"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Text description of how slicing works (or not).
+        Type `str`. """
+        
+        self.discriminator = None
+        """ Element values that are used to distinguish the slices.
+        List of `ElementDefinitionSlicingDiscriminator` items (represented as `dict` in JSON). """
+        
+        self.ordered = None
+        """ If elements must be in same order as slices.
+        Type `bool`. """
+        
+        self.rules = None
+        """ closed | open | openAtEnd.
+        Type `str`. """
+        
+        super(ElementDefinitionSlicing, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ElementDefinitionSlicing, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("discriminator", "discriminator", ElementDefinitionSlicingDiscriminator, True, None, False),
+            ("ordered", "ordered", bool, False, None, False),
+            ("rules", "rules", str, False, None, True),
+        ])
+        return js
+
+
+class ElementDefinitionSlicingDiscriminator(element.Element):
+    """ Element values that are used to distinguish the slices.
+    
+    Designates which child elements are used to discriminate between the slices
+    when processing an instance. If one or more discriminators are provided,
+    the value of the child elements in the instance data SHALL completely
+    distinguish which slice the element in the resource matches based on the
+    allowed values for those elements in each of the slices.
+    """
+    
+    resource_type = "ElementDefinitionSlicingDiscriminator"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.path = None
+        """ Path to element value.
+        Type `str`. """
+        
+        self.type = None
+        """ value | exists | pattern | type | profile.
+        Type `str`. """
+        
+        super(ElementDefinitionSlicingDiscriminator, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ElementDefinitionSlicingDiscriminator, self).elementProperties()
+        js.extend([
+            ("path", "path", str, False, None, True),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+class ElementDefinitionType(element.Element):
+    """ Data type and Profile for this element.
+    
+    The data type or resource that the value of this element is permitted to
+    be.
+    """
+    
+    resource_type = "ElementDefinitionType"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.aggregation = None
+        """ contained | referenced | bundled - how aggregated.
+        List of `str` items. """
+        
+        self.code = None
+        """ Data type or Resource (reference to definition).
+        Type `str`. """
+        
+        self.profile = None
+        """ Profile (StructureDefinition) to apply (or IG).
+        Type `str`. """
+        
+        self.targetProfile = None
+        """ Profile (StructureDefinition) to apply to reference target (or IG).
+        Type `str`. """
+        
+        self.versioning = None
+        """ either | independent | specific.
+        Type `str`. """
+        
+        super(ElementDefinitionType, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ElementDefinitionType, self).elementProperties()
+        js.extend([
+            ("aggregation", "aggregation", str, True, None, False),
+            ("code", "code", str, False, None, True),
+            ("profile", "profile", str, False, None, False),
+            ("targetProfile", "targetProfile", str, False, None, False),
+            ("versioning", "versioning", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import age
+except ImportError:
+    age = sys.modules[__package__ + '.age']
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import count
+except ImportError:
+    count = sys.modules[__package__ + '.count']
+try:
+    from . import distance
+except ImportError:
+    distance = sys.modules[__package__ + '.distance']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import humanname
+except ImportError:
+    humanname = sys.modules[__package__ + '.humanname']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import meta
+except ImportError:
+    meta = sys.modules[__package__ + '.meta']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
+try:
+    from . import sampleddata
+except ImportError:
+    sampleddata = sys.modules[__package__ + '.sampleddata']
+try:
+    from . import signature
+except ImportError:
+    signature = sys.modules[__package__ + '.signature']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/eligibilityrequest.py b/fhirclient/models/eligibilityrequest.py
new file mode 100644
index 0000000..ff0d176
--- /dev/null
+++ b/fhirclient/models/eligibilityrequest.py
@@ -0,0 +1,138 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/EligibilityRequest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class EligibilityRequest(domainresource.DomainResource):
+    """ Determine insurance validity and scope of coverage.
+    
+    The EligibilityRequest provides patient and insurance coverage information
+    to an insurer for them to respond, in the form of an EligibilityResponse,
+    with information regarding whether the stated coverage is valid and in-
+    force and optionally to provide the insurance details of the policy.
+    """
+    
+    resource_type = "EligibilityRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.benefitCategory = None
+        """ Type of services covered.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.benefitSubCategory = None
+        """ Detailed services covered within the type.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.businessArrangement = None
+        """ Business agreement.
+        Type `str`. """
+        
+        self.coverage = None
+        """ Insurance or medical plan.
+        Type `FHIRReference` referencing `Coverage` (represented as `dict` in JSON). """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.enterer = None
+        """ Author.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.facility = None
+        """ Servicing Facility.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.insurer = None
+        """ Target.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Responsible organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ The subject of the Products and Services.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ Desired processing priority.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.provider = None
+        """ Responsible practitioner.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.servicedDate = None
+        """ Estimated date or dates of Service.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.servicedPeriod = None
+        """ Estimated date or dates of Service.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        super(EligibilityRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EligibilityRequest, self).elementProperties()
+        js.extend([
+            ("benefitCategory", "benefitCategory", codeableconcept.CodeableConcept, False, None, False),
+            ("benefitSubCategory", "benefitSubCategory", codeableconcept.CodeableConcept, False, None, False),
+            ("businessArrangement", "businessArrangement", str, False, None, False),
+            ("coverage", "coverage", fhirreference.FHIRReference, False, None, False),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("enterer", "enterer", fhirreference.FHIRReference, False, None, False),
+            ("facility", "facility", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("insurer", "insurer", fhirreference.FHIRReference, False, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, False),
+            ("priority", "priority", codeableconcept.CodeableConcept, False, None, False),
+            ("provider", "provider", fhirreference.FHIRReference, False, None, False),
+            ("servicedDate", "servicedDate", fhirdate.FHIRDate, False, "serviced", False),
+            ("servicedPeriod", "servicedPeriod", period.Period, False, "serviced", False),
+            ("status", "status", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/eligibilityrequest_tests.py b/fhirclient/models/eligibilityrequest_tests.py
new file mode 100644
index 0000000..b4d8b49
--- /dev/null
+++ b/fhirclient/models/eligibilityrequest_tests.py
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import eligibilityrequest
+from .fhirdate import FHIRDate
+
+
+class EligibilityRequestTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("EligibilityRequest", js["resourceType"])
+        return eligibilityrequest.EligibilityRequest(js)
+    
+    def testEligibilityRequest1(self):
+        inst = self.instantiate_from("eligibilityrequest-example-2.json")
+        self.assertIsNotNone(inst, "Must have instantiated a EligibilityRequest instance")
+        self.implEligibilityRequest1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("EligibilityRequest", js["resourceType"])
+        inst2 = eligibilityrequest.EligibilityRequest(js)
+        self.implEligibilityRequest1(inst2)
+    
+    def implEligibilityRequest1(self, inst):
+        self.assertEqual(inst.benefitCategory.coding[0].code, "medical")
+        self.assertEqual(inst.benefitCategory.coding[0].system, "http://hl7.org/fhir/benefit-category")
+        self.assertEqual(inst.benefitSubCategory.coding[0].code, "69")
+        self.assertEqual(inst.benefitSubCategory.coding[0].display, "Maternity")
+        self.assertEqual(inst.benefitSubCategory.coding[0].system, "http://hl7.org/fhir/benefit-subcategory")
+        self.assertEqual(inst.businessArrangement, "NB8742")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "52346")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/elegibilityrequest")
+        self.assertEqual(inst.identifier[0].value, "52346")
+        self.assertEqual(inst.priority.coding[0].code, "normal")
+        self.assertEqual(inst.servicedDate.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.servicedDate.as_json(), "2014-09-17")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the EligibilityRequest</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testEligibilityRequest2(self):
+        inst = self.instantiate_from("eligibilityrequest-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a EligibilityRequest instance")
+        self.implEligibilityRequest2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("EligibilityRequest", js["resourceType"])
+        inst2 = eligibilityrequest.EligibilityRequest(js)
+        self.implEligibilityRequest2(inst2)
+    
+    def implEligibilityRequest2(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "52345")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/elegibilityrequest")
+        self.assertEqual(inst.identifier[0].value, "52345")
+        self.assertEqual(inst.priority.coding[0].code, "normal")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the EligibilityRequest</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/eligibilityresponse.py b/fhirclient/models/eligibilityresponse.py
new file mode 100644
index 0000000..90711ef
--- /dev/null
+++ b/fhirclient/models/eligibilityresponse.py
@@ -0,0 +1,319 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/EligibilityResponse) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class EligibilityResponse(domainresource.DomainResource):
+    """ EligibilityResponse resource.
+    
+    This resource provides eligibility and plan details from the processing of
+    an Eligibility resource.
+    """
+    
+    resource_type = "EligibilityResponse"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.disposition = None
+        """ Disposition Message.
+        Type `str`. """
+        
+        self.error = None
+        """ Processing errors.
+        List of `EligibilityResponseError` items (represented as `dict` in JSON). """
+        
+        self.form = None
+        """ Printed Form Identifier.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.inforce = None
+        """ Coverage inforce indicator.
+        Type `bool`. """
+        
+        self.insurance = None
+        """ Details by insurance coverage.
+        List of `EligibilityResponseInsurance` items (represented as `dict` in JSON). """
+        
+        self.insurer = None
+        """ Insurer issuing the coverage.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.outcome = None
+        """ complete | error | partial.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.request = None
+        """ Eligibility reference.
+        Type `FHIRReference` referencing `EligibilityRequest` (represented as `dict` in JSON). """
+        
+        self.requestOrganization = None
+        """ Responsible organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.requestProvider = None
+        """ Responsible practitioner.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        super(EligibilityResponse, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EligibilityResponse, self).elementProperties()
+        js.extend([
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("disposition", "disposition", str, False, None, False),
+            ("error", "error", EligibilityResponseError, True, None, False),
+            ("form", "form", codeableconcept.CodeableConcept, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("inforce", "inforce", bool, False, None, False),
+            ("insurance", "insurance", EligibilityResponseInsurance, True, None, False),
+            ("insurer", "insurer", fhirreference.FHIRReference, False, None, False),
+            ("outcome", "outcome", codeableconcept.CodeableConcept, False, None, False),
+            ("request", "request", fhirreference.FHIRReference, False, None, False),
+            ("requestOrganization", "requestOrganization", fhirreference.FHIRReference, False, None, False),
+            ("requestProvider", "requestProvider", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class EligibilityResponseError(backboneelement.BackboneElement):
+    """ Processing errors.
+    
+    Mutually exclusive with Services Provided (Item).
+    """
+    
+    resource_type = "EligibilityResponseError"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Error code detailing processing issues.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(EligibilityResponseError, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EligibilityResponseError, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+        ])
+        return js
+
+
+class EligibilityResponseInsurance(backboneelement.BackboneElement):
+    """ Details by insurance coverage.
+    
+    The insurer may provide both the details for the requested coverage as well
+    as details for additional coverages known to the insurer.
+    """
+    
+    resource_type = "EligibilityResponseInsurance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.benefitBalance = None
+        """ Benefits by Category.
+        List of `EligibilityResponseInsuranceBenefitBalance` items (represented as `dict` in JSON). """
+        
+        self.contract = None
+        """ Contract details.
+        Type `FHIRReference` referencing `Contract` (represented as `dict` in JSON). """
+        
+        self.coverage = None
+        """ Updated Coverage details.
+        Type `FHIRReference` referencing `Coverage` (represented as `dict` in JSON). """
+        
+        super(EligibilityResponseInsurance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EligibilityResponseInsurance, self).elementProperties()
+        js.extend([
+            ("benefitBalance", "benefitBalance", EligibilityResponseInsuranceBenefitBalance, True, None, False),
+            ("contract", "contract", fhirreference.FHIRReference, False, None, False),
+            ("coverage", "coverage", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+class EligibilityResponseInsuranceBenefitBalance(backboneelement.BackboneElement):
+    """ Benefits by Category.
+    
+    Benefits and optionally current balances by Category.
+    """
+    
+    resource_type = "EligibilityResponseInsuranceBenefitBalance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ Type of services covered.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Description of the benefit or services covered.
+        Type `str`. """
+        
+        self.excluded = None
+        """ Excluded from the plan.
+        Type `bool`. """
+        
+        self.financial = None
+        """ Benefit Summary.
+        List of `EligibilityResponseInsuranceBenefitBalanceFinancial` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Short name for the benefit.
+        Type `str`. """
+        
+        self.network = None
+        """ In or out of network.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.subCategory = None
+        """ Detailed services covered within the type.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.term = None
+        """ Annual or lifetime.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.unit = None
+        """ Individual or family.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(EligibilityResponseInsuranceBenefitBalance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EligibilityResponseInsuranceBenefitBalance, self).elementProperties()
+        js.extend([
+            ("category", "category", codeableconcept.CodeableConcept, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("excluded", "excluded", bool, False, None, False),
+            ("financial", "financial", EligibilityResponseInsuranceBenefitBalanceFinancial, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("network", "network", codeableconcept.CodeableConcept, False, None, False),
+            ("subCategory", "subCategory", codeableconcept.CodeableConcept, False, None, False),
+            ("term", "term", codeableconcept.CodeableConcept, False, None, False),
+            ("unit", "unit", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class EligibilityResponseInsuranceBenefitBalanceFinancial(backboneelement.BackboneElement):
+    """ Benefit Summary.
+    
+    Benefits Used to date.
+    """
+    
+    resource_type = "EligibilityResponseInsuranceBenefitBalanceFinancial"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.allowedMoney = None
+        """ Benefits allowed.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.allowedString = None
+        """ Benefits allowed.
+        Type `str`. """
+        
+        self.allowedUnsignedInt = None
+        """ Benefits allowed.
+        Type `int`. """
+        
+        self.type = None
+        """ Deductable, visits, benefit amount.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.usedMoney = None
+        """ Benefits used.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.usedUnsignedInt = None
+        """ Benefits used.
+        Type `int`. """
+        
+        super(EligibilityResponseInsuranceBenefitBalanceFinancial, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EligibilityResponseInsuranceBenefitBalanceFinancial, self).elementProperties()
+        js.extend([
+            ("allowedMoney", "allowedMoney", money.Money, False, "allowed", False),
+            ("allowedString", "allowedString", str, False, "allowed", False),
+            ("allowedUnsignedInt", "allowedUnsignedInt", int, False, "allowed", False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+            ("usedMoney", "usedMoney", money.Money, False, "used", False),
+            ("usedUnsignedInt", "usedUnsignedInt", int, False, "used", False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
diff --git a/fhirclient/models/eligibilityresponse_tests.py b/fhirclient/models/eligibilityresponse_tests.py
new file mode 100644
index 0000000..b349e2b
--- /dev/null
+++ b/fhirclient/models/eligibilityresponse_tests.py
@@ -0,0 +1,271 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import eligibilityresponse
+from .fhirdate import FHIRDate
+
+
+class EligibilityResponseTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("EligibilityResponse", js["resourceType"])
+        return eligibilityresponse.EligibilityResponse(js)
+    
+    def testEligibilityResponse1(self):
+        inst = self.instantiate_from("eligibilityresponse-example-benefits-2.json")
+        self.assertIsNotNone(inst, "Must have instantiated a EligibilityResponse instance")
+        self.implEligibilityResponse1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("EligibilityResponse", js["resourceType"])
+        inst2 = eligibilityresponse.EligibilityResponse(js)
+        self.implEligibilityResponse1(inst2)
+    
+    def implEligibilityResponse1(self, inst):
+        self.assertEqual(inst.contained[0].id, "patient-1")
+        self.assertEqual(inst.contained[1].id, "coverage-1")
+        self.assertEqual(inst.created.date, FHIRDate("2014-09-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-09-16")
+        self.assertEqual(inst.disposition, "Policy is currently in-force.")
+        self.assertEqual(inst.form.coding[0].code, "ELRSP/2017/01")
+        self.assertEqual(inst.form.coding[0].system, "http://national.org/form")
+        self.assertEqual(inst.id, "E2502")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/eligibilityresponse")
+        self.assertEqual(inst.identifier[0].value, "8812342")
+        self.assertTrue(inst.inforce)
+        self.assertEqual(inst.insurance[0].benefitBalance[0].category.coding[0].code, "medical")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].category.coding[0].system, "http://hl7.org/fhir/benefit-category")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].allowedMoney.code, "USD")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].allowedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].allowedMoney.value, 500000)
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].type.coding[0].code, "benefit")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].usedMoney.code, "USD")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].usedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].usedMoney.value, 3748.0)
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[1].allowedMoney.code, "USD")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[1].allowedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[1].allowedMoney.value, 100)
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[1].type.coding[0].code, "copay-maximum")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[2].allowedUnsignedInt, 20)
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[2].type.coding[0].code, "copay-percent")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].network.coding[0].code, "in")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].network.coding[0].system, "http://hl7.org/fhir/benefit-network")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].subCategory.coding[0].code, "30")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].subCategory.coding[0].display, "Health Benefit Plan Coverage")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].subCategory.coding[0].system, "http://hl7.org/fhir/benefit-subcategory")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].term.coding[0].code, "annual")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].term.coding[0].system, "http://hl7.org/fhir/benefit-term")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].unit.coding[0].code, "individual")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].unit.coding[0].system, "http://hl7.org/fhir/benefit-unit")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].category.coding[0].code, "medical")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].category.coding[0].system, "http://hl7.org/fhir/benefit-category")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].financial[0].allowedMoney.code, "USD")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].financial[0].allowedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].financial[0].allowedMoney.value, 15000)
+        self.assertEqual(inst.insurance[0].benefitBalance[1].financial[0].type.coding[0].code, "benefit")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].network.coding[0].code, "in")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].network.coding[0].system, "http://hl7.org/fhir/benefit-network")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].subCategory.coding[0].code, "69")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].subCategory.coding[0].display, "Maternity")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].subCategory.coding[0].system, "http://hl7.org/fhir/benefit-subcategory")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].term.coding[0].code, "annual")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].term.coding[0].system, "http://hl7.org/fhir/benefit-term")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].unit.coding[0].code, "individual")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].unit.coding[0].system, "http://hl7.org/fhir/benefit-unit")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].category.coding[0].code, "oral")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].category.coding[0].system, "http://hl7.org/fhir/benefit-category")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].financial[0].allowedMoney.code, "USD")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].financial[0].allowedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].financial[0].allowedMoney.value, 2000)
+        self.assertEqual(inst.insurance[0].benefitBalance[2].financial[0].type.coding[0].code, "benefit")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].network.coding[0].code, "in")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].network.coding[0].system, "http://hl7.org/fhir/benefit-network")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].subCategory.coding[0].code, "F3")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].subCategory.coding[0].display, "Dental Coverage")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].subCategory.coding[0].system, "http://hl7.org/fhir/benefit-subcategory")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].term.coding[0].code, "annual")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].term.coding[0].system, "http://hl7.org/fhir/benefit-term")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].unit.coding[0].code, "individual")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].unit.coding[0].system, "http://hl7.org/fhir/benefit-unit")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].category.coding[0].code, "vision")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].category.coding[0].system, "http://hl7.org/fhir/benefit-category")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].description, "Vision products and services such as exams, glasses and contatc lenses.")
+        self.assertTrue(inst.insurance[0].benefitBalance[3].excluded)
+        self.assertEqual(inst.insurance[0].benefitBalance[3].name, "Vision")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].subCategory.coding[0].code, "F6")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].subCategory.coding[0].display, "Vision Coverage")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].subCategory.coding[0].system, "http://hl7.org/fhir/benefit-subcategory")
+        self.assertEqual(inst.outcome.coding[0].code, "complete")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/remittance-outcome")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the EligibilityResponse.</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testEligibilityResponse2(self):
+        inst = self.instantiate_from("eligibilityresponse-example-benefits.json")
+        self.assertIsNotNone(inst, "Must have instantiated a EligibilityResponse instance")
+        self.implEligibilityResponse2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("EligibilityResponse", js["resourceType"])
+        inst2 = eligibilityresponse.EligibilityResponse(js)
+        self.implEligibilityResponse2(inst2)
+    
+    def implEligibilityResponse2(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.disposition, "Policy is currently in-force.")
+        self.assertEqual(inst.id, "E2501")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/eligibilityresponse")
+        self.assertEqual(inst.identifier[0].value, "881234")
+        self.assertTrue(inst.inforce)
+        self.assertEqual(inst.insurance[0].benefitBalance[0].category.coding[0].code, "medical")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].category.coding[0].system, "http://hl7.org/fhir/benefit-category")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].allowedMoney.code, "SAR")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].allowedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].allowedMoney.value, 500000)
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[0].type.coding[0].code, "benefit")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[1].allowedMoney.code, "SAR")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[1].allowedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[1].allowedMoney.value, 100)
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[1].type.coding[0].code, "copay-maximum")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[2].allowedUnsignedInt, 20)
+        self.assertEqual(inst.insurance[0].benefitBalance[0].financial[2].type.coding[0].code, "copay-percent")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].network.coding[0].code, "in")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].network.coding[0].system, "http://hl7.org/fhir/benefit-network")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].subCategory.coding[0].code, "30")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].subCategory.coding[0].display, "Health Benefit Plan Coverage")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].subCategory.coding[0].system, "http://hl7.org/fhir/benefit-subcategory")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].term.coding[0].code, "annual")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].term.coding[0].system, "http://hl7.org/fhir/benefit-term")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].unit.coding[0].code, "individual")
+        self.assertEqual(inst.insurance[0].benefitBalance[0].unit.coding[0].system, "http://hl7.org/fhir/benefit-unit")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].category.coding[0].code, "medical")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].category.coding[0].system, "http://hl7.org/fhir/benefit-category")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].financial[0].allowedMoney.code, "SAR")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].financial[0].allowedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].financial[0].allowedMoney.value, 15000)
+        self.assertEqual(inst.insurance[0].benefitBalance[1].financial[0].type.coding[0].code, "benefit")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].network.coding[0].code, "in")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].network.coding[0].system, "http://hl7.org/fhir/benefit-network")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].subCategory.coding[0].code, "69")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].subCategory.coding[0].display, "Maternity")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].subCategory.coding[0].system, "http://hl7.org/fhir/benefit-subcategory")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].term.coding[0].code, "annual")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].term.coding[0].system, "http://hl7.org/fhir/benefit-term")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].unit.coding[0].code, "individual")
+        self.assertEqual(inst.insurance[0].benefitBalance[1].unit.coding[0].system, "http://hl7.org/fhir/benefit-unit")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].category.coding[0].code, "oral")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].category.coding[0].system, "http://hl7.org/fhir/benefit-category")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].financial[0].allowedMoney.code, "SAR")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].financial[0].allowedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].financial[0].allowedMoney.value, 2000)
+        self.assertEqual(inst.insurance[0].benefitBalance[2].financial[0].type.coding[0].code, "benefit")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].network.coding[0].code, "in")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].network.coding[0].system, "http://hl7.org/fhir/benefit-network")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].subCategory.coding[0].code, "F3")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].subCategory.coding[0].display, "Dental Coverage")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].subCategory.coding[0].system, "http://hl7.org/fhir/benefit-subcategory")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].term.coding[0].code, "annual")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].term.coding[0].system, "http://hl7.org/fhir/benefit-term")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].unit.coding[0].code, "individual")
+        self.assertEqual(inst.insurance[0].benefitBalance[2].unit.coding[0].system, "http://hl7.org/fhir/benefit-unit")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].category.coding[0].code, "vision")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].category.coding[0].system, "http://hl7.org/fhir/benefit-category")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].financial[0].allowedMoney.code, "SAR")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].financial[0].allowedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].financial[0].allowedMoney.value, 400)
+        self.assertEqual(inst.insurance[0].benefitBalance[3].financial[0].type.coding[0].code, "benefit")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].network.coding[0].code, "in")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].network.coding[0].system, "http://hl7.org/fhir/benefit-network")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].subCategory.coding[0].code, "F6")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].subCategory.coding[0].display, "Vision Coverage")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].subCategory.coding[0].system, "http://hl7.org/fhir/benefit-subcategory")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].term.coding[0].code, "annual")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].term.coding[0].system, "http://hl7.org/fhir/benefit-term")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].unit.coding[0].code, "individual")
+        self.assertEqual(inst.insurance[0].benefitBalance[3].unit.coding[0].system, "http://hl7.org/fhir/benefit-unit")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].category.coding[0].code, "vision")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].category.coding[0].system, "http://hl7.org/fhir/benefit-category")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].financial[0].allowedString, "shared")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].financial[0].type.coding[0].code, "room")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].financial[1].allowedMoney.code, "SAR")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].financial[1].allowedMoney.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].financial[1].allowedMoney.value, 600)
+        self.assertEqual(inst.insurance[0].benefitBalance[4].financial[1].type.coding[0].code, "benefit")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].network.coding[0].code, "in")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].network.coding[0].system, "http://hl7.org/fhir/benefit-network")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].subCategory.coding[0].code, "49")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].subCategory.coding[0].display, "Hospital Room and Board")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].subCategory.coding[0].system, "http://hl7.org/fhir/benefit-subcategory")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].term.coding[0].code, "day")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].term.coding[0].system, "http://hl7.org/fhir/benefit-term")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].unit.coding[0].code, "individual")
+        self.assertEqual(inst.insurance[0].benefitBalance[4].unit.coding[0].system, "http://hl7.org/fhir/benefit-unit")
+        self.assertEqual(inst.outcome.coding[0].code, "complete")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/remittance-outcome")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the EligibilityResponse.</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testEligibilityResponse3(self):
+        inst = self.instantiate_from("eligibilityresponse-example-error.json")
+        self.assertIsNotNone(inst, "Must have instantiated a EligibilityResponse instance")
+        self.implEligibilityResponse3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("EligibilityResponse", js["resourceType"])
+        inst2 = eligibilityresponse.EligibilityResponse(js)
+        self.implEligibilityResponse3(inst2)
+    
+    def implEligibilityResponse3(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-09-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-09-16")
+        self.assertEqual(inst.disposition, "Eligibiliy request could not be processed, please address errors before submitting.")
+        self.assertEqual(inst.error[0].code.coding[0].code, "a001")
+        self.assertEqual(inst.error[0].code.coding[0].system, "http://hl7.org/fhir/adjudication-error")
+        self.assertEqual(inst.form.coding[0].code, "ELRSP/2017/01")
+        self.assertEqual(inst.form.coding[0].system, "http://national.org/form")
+        self.assertEqual(inst.id, "E2503")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/eligibilityresponse")
+        self.assertEqual(inst.identifier[0].value, "8812343")
+        self.assertEqual(inst.outcome.coding[0].code, "error")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/remittance-outcome")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the EligibilityResponse.</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testEligibilityResponse4(self):
+        inst = self.instantiate_from("eligibilityresponse-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a EligibilityResponse instance")
+        self.implEligibilityResponse4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("EligibilityResponse", js["resourceType"])
+        inst2 = eligibilityresponse.EligibilityResponse(js)
+        self.implEligibilityResponse4(inst2)
+    
+    def implEligibilityResponse4(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.disposition, "Policy is currently in-force.")
+        self.assertEqual(inst.id, "E2500")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/eligibilityresponse")
+        self.assertEqual(inst.identifier[0].value, "881234")
+        self.assertTrue(inst.inforce)
+        self.assertEqual(inst.outcome.coding[0].code, "complete")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/remittance-outcome")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the EligibilityResponse.</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/encounter.py b/fhirclient/models/encounter.py
new file mode 100644
index 0000000..52339fd
--- /dev/null
+++ b/fhirclient/models/encounter.py
@@ -0,0 +1,438 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Encounter) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Encounter(domainresource.DomainResource):
+    """ An interaction during which services are provided to the patient.
+    
+    An interaction between a patient and healthcare provider(s) for the purpose
+    of providing healthcare service(s) or assessing the health status of a
+    patient.
+    """
+    
+    resource_type = "Encounter"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.account = None
+        """ The set of accounts that may be used for billing for this Encounter.
+        List of `FHIRReference` items referencing `Account` (represented as `dict` in JSON). """
+        
+        self.appointment = None
+        """ The appointment that scheduled this encounter.
+        Type `FHIRReference` referencing `Appointment` (represented as `dict` in JSON). """
+        
+        self.classHistory = None
+        """ List of past encounter classes.
+        List of `EncounterClassHistory` items (represented as `dict` in JSON). """
+        
+        self.class_fhir = None
+        """ inpatient | outpatient | ambulatory | emergency +.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.diagnosis = None
+        """ The list of diagnosis relevant to this encounter.
+        List of `EncounterDiagnosis` items (represented as `dict` in JSON). """
+        
+        self.episodeOfCare = None
+        """ Episode(s) of care that this encounter should be recorded against.
+        List of `FHIRReference` items referencing `EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.hospitalization = None
+        """ Details about the admission to a healthcare service.
+        Type `EncounterHospitalization` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Identifier(s) by which this encounter is known.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.incomingReferral = None
+        """ The ReferralRequest that initiated this encounter.
+        List of `FHIRReference` items referencing `ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.length = None
+        """ Quantity of time the encounter lasted (less time absent).
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.location = None
+        """ List of locations where the patient has been.
+        List of `EncounterLocation` items (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Another Encounter this encounter is part of.
+        Type `FHIRReference` referencing `Encounter` (represented as `dict` in JSON). """
+        
+        self.participant = None
+        """ List of participants involved in the encounter.
+        List of `EncounterParticipant` items (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ The start and end time of the encounter.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ Indicates the urgency of the encounter.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reason = None
+        """ Reason the encounter takes place (code).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.serviceProvider = None
+        """ The custodian organization of this Encounter record.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ planned | arrived | triaged | in-progress | onleave | finished |
+        cancelled +.
+        Type `str`. """
+        
+        self.statusHistory = None
+        """ List of past encounter statuses.
+        List of `EncounterStatusHistory` items (represented as `dict` in JSON). """
+        
+        self.subject = None
+        """ The patient ro group present at the encounter.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Specific type of encounter.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(Encounter, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Encounter, self).elementProperties()
+        js.extend([
+            ("account", "account", fhirreference.FHIRReference, True, None, False),
+            ("appointment", "appointment", fhirreference.FHIRReference, False, None, False),
+            ("classHistory", "classHistory", EncounterClassHistory, True, None, False),
+            ("class_fhir", "class", coding.Coding, False, None, False),
+            ("diagnosis", "diagnosis", EncounterDiagnosis, True, None, False),
+            ("episodeOfCare", "episodeOfCare", fhirreference.FHIRReference, True, None, False),
+            ("hospitalization", "hospitalization", EncounterHospitalization, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("incomingReferral", "incomingReferral", fhirreference.FHIRReference, True, None, False),
+            ("length", "length", duration.Duration, False, None, False),
+            ("location", "location", EncounterLocation, True, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, False, None, False),
+            ("participant", "participant", EncounterParticipant, True, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("priority", "priority", codeableconcept.CodeableConcept, False, None, False),
+            ("reason", "reason", codeableconcept.CodeableConcept, True, None, False),
+            ("serviceProvider", "serviceProvider", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("statusHistory", "statusHistory", EncounterStatusHistory, True, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class EncounterClassHistory(backboneelement.BackboneElement):
+    """ List of past encounter classes.
+    
+    The class history permits the tracking of the encounters transitions
+    without needing to go  through the resource history.
+    
+    This would be used for a case where an admission starts of as an emergency
+    encounter, then transisions into an inpatient scenario. Doing this and not
+    restarting a new encounter ensures that any lab/diagnostic results can more
+    easily follow the patient and not require re-processing and not get lost or
+    cancelled during a kindof discharge from emergency to inpatient.
+    """
+    
+    resource_type = "EncounterClassHistory"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.class_fhir = None
+        """ inpatient | outpatient | ambulatory | emergency +.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ The time that the episode was in the specified class.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(EncounterClassHistory, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EncounterClassHistory, self).elementProperties()
+        js.extend([
+            ("class_fhir", "class", coding.Coding, False, None, True),
+            ("period", "period", period.Period, False, None, True),
+        ])
+        return js
+
+
+class EncounterDiagnosis(backboneelement.BackboneElement):
+    """ The list of diagnosis relevant to this encounter.
+    """
+    
+    resource_type = "EncounterDiagnosis"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.condition = None
+        """ Reason the encounter takes place (resource).
+        Type `FHIRReference` referencing `Condition, Procedure` (represented as `dict` in JSON). """
+        
+        self.rank = None
+        """ Ranking of the diagnosis (for each role type).
+        Type `int`. """
+        
+        self.role = None
+        """ Role that this diagnosis has within the encounter (e.g. admission,
+        billing, discharge …).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(EncounterDiagnosis, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EncounterDiagnosis, self).elementProperties()
+        js.extend([
+            ("condition", "condition", fhirreference.FHIRReference, False, None, True),
+            ("rank", "rank", int, False, None, False),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class EncounterHospitalization(backboneelement.BackboneElement):
+    """ Details about the admission to a healthcare service.
+    """
+    
+    resource_type = "EncounterHospitalization"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.admitSource = None
+        """ From where patient was admitted (physician referral, transfer).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.destination = None
+        """ Location to which the patient is discharged.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.dietPreference = None
+        """ Diet preferences reported by the patient.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.dischargeDisposition = None
+        """ Category or kind of location after discharge.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.origin = None
+        """ The location from which the patient came before admission.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.preAdmissionIdentifier = None
+        """ Pre-admission identifier.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.reAdmission = None
+        """ The type of hospital re-admission that has occurred (if any). If
+        the value is absent, then this is not identified as a readmission.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.specialArrangement = None
+        """ Wheelchair, translator, stretcher, etc..
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.specialCourtesy = None
+        """ Special courtesies (VIP, board member).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(EncounterHospitalization, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EncounterHospitalization, self).elementProperties()
+        js.extend([
+            ("admitSource", "admitSource", codeableconcept.CodeableConcept, False, None, False),
+            ("destination", "destination", fhirreference.FHIRReference, False, None, False),
+            ("dietPreference", "dietPreference", codeableconcept.CodeableConcept, True, None, False),
+            ("dischargeDisposition", "dischargeDisposition", codeableconcept.CodeableConcept, False, None, False),
+            ("origin", "origin", fhirreference.FHIRReference, False, None, False),
+            ("preAdmissionIdentifier", "preAdmissionIdentifier", identifier.Identifier, False, None, False),
+            ("reAdmission", "reAdmission", codeableconcept.CodeableConcept, False, None, False),
+            ("specialArrangement", "specialArrangement", codeableconcept.CodeableConcept, True, None, False),
+            ("specialCourtesy", "specialCourtesy", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+class EncounterLocation(backboneelement.BackboneElement):
+    """ List of locations where the patient has been.
+    
+    List of locations where  the patient has been during this encounter.
+    """
+    
+    resource_type = "EncounterLocation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.location = None
+        """ Location the encounter takes place.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Time period during which the patient was present at the location.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ planned | active | reserved | completed.
+        Type `str`. """
+        
+        super(EncounterLocation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EncounterLocation, self).elementProperties()
+        js.extend([
+            ("location", "location", fhirreference.FHIRReference, False, None, True),
+            ("period", "period", period.Period, False, None, False),
+            ("status", "status", str, False, None, False),
+        ])
+        return js
+
+
+class EncounterParticipant(backboneelement.BackboneElement):
+    """ List of participants involved in the encounter.
+    
+    The list of people responsible for providing the service.
+    """
+    
+    resource_type = "EncounterParticipant"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.individual = None
+        """ Persons involved in the encounter other than the patient.
+        Type `FHIRReference` referencing `Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Period of time during the encounter that the participant
+        participated.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Role of participant in encounter.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(EncounterParticipant, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EncounterParticipant, self).elementProperties()
+        js.extend([
+            ("individual", "individual", fhirreference.FHIRReference, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+class EncounterStatusHistory(backboneelement.BackboneElement):
+    """ List of past encounter statuses.
+    
+    The status history permits the encounter resource to contain the status
+    history without needing to read through the historical versions of the
+    resource, or even have the server store them.
+    """
+    
+    resource_type = "EncounterStatusHistory"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.period = None
+        """ The time that the episode was in the specified status.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ planned | arrived | triaged | in-progress | onleave | finished |
+        cancelled +.
+        Type `str`. """
+        
+        super(EncounterStatusHistory, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EncounterStatusHistory, self).elementProperties()
+        js.extend([
+            ("period", "period", period.Period, False, None, True),
+            ("status", "status", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/encounter_tests.py b/fhirclient/models/encounter_tests.py
new file mode 100644
index 0000000..a512e28
--- /dev/null
+++ b/fhirclient/models/encounter_tests.py
@@ -0,0 +1,432 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import encounter
+from .fhirdate import FHIRDate
+
+
+class EncounterTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Encounter", js["resourceType"])
+        return encounter.Encounter(js)
+    
+    def testEncounter1(self):
+        inst = self.instantiate_from("encounter-example-emerg.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Encounter instance")
+        self.implEncounter1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Encounter", js["resourceType"])
+        inst2 = encounter.Encounter(js)
+        self.implEncounter1(inst2)
+    
+    def implEncounter1(self, inst):
+        self.assertEqual(inst.classHistory[0].class_fhir.code, "EMER")
+        self.assertEqual(inst.classHistory[0].class_fhir.display, "emergency")
+        self.assertEqual(inst.classHistory[0].class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.classHistory[0].period.end.date, FHIRDate("2017-02-01T09:27:00+10:00").date)
+        self.assertEqual(inst.classHistory[0].period.end.as_json(), "2017-02-01T09:27:00+10:00")
+        self.assertEqual(inst.classHistory[0].period.start.date, FHIRDate("2017-02-01T07:15:00+10:00").date)
+        self.assertEqual(inst.classHistory[0].period.start.as_json(), "2017-02-01T07:15:00+10:00")
+        self.assertEqual(inst.classHistory[1].class_fhir.code, "IMP")
+        self.assertEqual(inst.classHistory[1].class_fhir.display, "inpatient encounter")
+        self.assertEqual(inst.classHistory[1].class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.classHistory[1].period.start.date, FHIRDate("2017-02-01T09:27:00+10:00").date)
+        self.assertEqual(inst.classHistory[1].period.start.as_json(), "2017-02-01T09:27:00+10:00")
+        self.assertEqual(inst.class_fhir.code, "IMP")
+        self.assertEqual(inst.class_fhir.display, "inpatient encounter")
+        self.assertEqual(inst.class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].code, "emd")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].display, "From accident/emergency department")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].system, "http://hl7.org/fhir/admit-source")
+        self.assertEqual(inst.id, "emerg")
+        self.assertEqual(inst.location[0].period.end.date, FHIRDate("2017-02-01T08:45:00+10:00").date)
+        self.assertEqual(inst.location[0].period.end.as_json(), "2017-02-01T08:45:00+10:00")
+        self.assertEqual(inst.location[0].period.start.date, FHIRDate("2017-02-01T07:15:00+10:00").date)
+        self.assertEqual(inst.location[0].period.start.as_json(), "2017-02-01T07:15:00+10:00")
+        self.assertEqual(inst.location[0].status, "active")
+        self.assertEqual(inst.location[1].period.end.date, FHIRDate("2017-02-01T09:27:00+10:00").date)
+        self.assertEqual(inst.location[1].period.end.as_json(), "2017-02-01T09:27:00+10:00")
+        self.assertEqual(inst.location[1].period.start.date, FHIRDate("2017-02-01T08:45:00+10:00").date)
+        self.assertEqual(inst.location[1].period.start.as_json(), "2017-02-01T08:45:00+10:00")
+        self.assertEqual(inst.location[1].status, "active")
+        self.assertEqual(inst.location[2].period.end.date, FHIRDate("2017-02-01T12:15:00+10:00").date)
+        self.assertEqual(inst.location[2].period.end.as_json(), "2017-02-01T12:15:00+10:00")
+        self.assertEqual(inst.location[2].period.start.date, FHIRDate("2017-02-01T09:27:00+10:00").date)
+        self.assertEqual(inst.location[2].period.start.as_json(), "2017-02-01T09:27:00+10:00")
+        self.assertEqual(inst.location[2].status, "active")
+        self.assertEqual(inst.location[3].period.end.date, FHIRDate("2017-02-01T12:45:00+10:00").date)
+        self.assertEqual(inst.location[3].period.end.as_json(), "2017-02-01T12:45:00+10:00")
+        self.assertEqual(inst.location[3].period.start.date, FHIRDate("2017-02-01T12:15:00+10:00").date)
+        self.assertEqual(inst.location[3].period.start.as_json(), "2017-02-01T12:15:00+10:00")
+        self.assertEqual(inst.location[3].status, "reserved")
+        self.assertEqual(inst.location[4].period.start.date, FHIRDate("2017-02-01T12:45:00+10:00").date)
+        self.assertEqual(inst.location[4].period.start.as_json(), "2017-02-01T12:45:00+10:00")
+        self.assertEqual(inst.location[4].status, "active")
+        self.assertEqual(inst.period.start.date, FHIRDate("2017-02-01T07:15:00+10:00").date)
+        self.assertEqual(inst.period.start.as_json(), "2017-02-01T07:15:00+10:00")
+        self.assertEqual(inst.status, "in-progress")
+        self.assertEqual(inst.statusHistory[0].period.end.date, FHIRDate("2017-02-01T07:35:00+10:00").date)
+        self.assertEqual(inst.statusHistory[0].period.end.as_json(), "2017-02-01T07:35:00+10:00")
+        self.assertEqual(inst.statusHistory[0].period.start.date, FHIRDate("2017-02-01T07:15:00+10:00").date)
+        self.assertEqual(inst.statusHistory[0].period.start.as_json(), "2017-02-01T07:15:00+10:00")
+        self.assertEqual(inst.statusHistory[0].status, "arrived")
+        self.assertEqual(inst.statusHistory[1].period.end.date, FHIRDate("2017-02-01T08:45:00+10:00").date)
+        self.assertEqual(inst.statusHistory[1].period.end.as_json(), "2017-02-01T08:45:00+10:00")
+        self.assertEqual(inst.statusHistory[1].period.start.date, FHIRDate("2017-02-01T07:35:00+10:00").date)
+        self.assertEqual(inst.statusHistory[1].period.start.as_json(), "2017-02-01T07:35:00+10:00")
+        self.assertEqual(inst.statusHistory[1].status, "triaged")
+        self.assertEqual(inst.statusHistory[2].period.end.date, FHIRDate("2017-02-01T12:15:00+10:00").date)
+        self.assertEqual(inst.statusHistory[2].period.end.as_json(), "2017-02-01T12:15:00+10:00")
+        self.assertEqual(inst.statusHistory[2].period.start.date, FHIRDate("2017-02-01T08:45:00+10:00").date)
+        self.assertEqual(inst.statusHistory[2].period.start.as_json(), "2017-02-01T08:45:00+10:00")
+        self.assertEqual(inst.statusHistory[2].status, "in-progress")
+        self.assertEqual(inst.statusHistory[3].period.end.date, FHIRDate("2017-02-01T12:45:00+10:00").date)
+        self.assertEqual(inst.statusHistory[3].period.end.as_json(), "2017-02-01T12:45:00+10:00")
+        self.assertEqual(inst.statusHistory[3].period.start.date, FHIRDate("2017-02-01T12:15:00+10:00").date)
+        self.assertEqual(inst.statusHistory[3].period.start.as_json(), "2017-02-01T12:15:00+10:00")
+        self.assertEqual(inst.statusHistory[3].status, "onleave")
+        self.assertEqual(inst.statusHistory[4].period.start.date, FHIRDate("2017-02-01T12:45:00+10:00").date)
+        self.assertEqual(inst.statusHistory[4].period.start.as_json(), "2017-02-01T12:45:00+10:00")
+        self.assertEqual(inst.statusHistory[4].status, "in-progress")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Emergency visit that escalated into inpatient patient @example</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testEncounter2(self):
+        inst = self.instantiate_from("encounter-example-f001-heart.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Encounter instance")
+        self.implEncounter2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Encounter", js["resourceType"])
+        inst2 = encounter.Encounter(js)
+        self.implEncounter2(inst2)
+    
+    def implEncounter2(self, inst):
+        self.assertEqual(inst.class_fhir.code, "AMB")
+        self.assertEqual(inst.class_fhir.display, "ambulatory")
+        self.assertEqual(inst.class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].code, "305956004")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].display, "Referral by physician")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.hospitalization.dischargeDisposition.coding[0].code, "306689006")
+        self.assertEqual(inst.hospitalization.dischargeDisposition.coding[0].display, "Discharge to home")
+        self.assertEqual(inst.hospitalization.dischargeDisposition.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.hospitalization.preAdmissionIdentifier.system, "http://www.amc.nl/zorgportal/identifiers/pre-admissions")
+        self.assertEqual(inst.hospitalization.preAdmissionIdentifier.use, "official")
+        self.assertEqual(inst.hospitalization.preAdmissionIdentifier.value, "93042")
+        self.assertEqual(inst.id, "f001")
+        self.assertEqual(inst.identifier[0].system, "http://www.amc.nl/zorgportal/identifiers/visits")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "v1451")
+        self.assertEqual(inst.length.code, "min")
+        self.assertEqual(inst.length.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.length.unit, "min")
+        self.assertEqual(inst.length.value, 140)
+        self.assertEqual(inst.priority.coding[0].code, "310361003")
+        self.assertEqual(inst.priority.coding[0].display, "Non-urgent cardiological admission")
+        self.assertEqual(inst.priority.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reason[0].coding[0].code, "34068001")
+        self.assertEqual(inst.reason[0].coding[0].display, "Heart valve replacement")
+        self.assertEqual(inst.reason[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.status, "finished")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "270427003")
+        self.assertEqual(inst.type[0].coding[0].display, "Patient-initiated encounter")
+        self.assertEqual(inst.type[0].coding[0].system, "http://snomed.info/sct")
+    
+    def testEncounter3(self):
+        inst = self.instantiate_from("encounter-example-f002-lung.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Encounter instance")
+        self.implEncounter3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Encounter", js["resourceType"])
+        inst2 = encounter.Encounter(js)
+        self.implEncounter3(inst2)
+    
+    def implEncounter3(self, inst):
+        self.assertEqual(inst.class_fhir.code, "AMB")
+        self.assertEqual(inst.class_fhir.display, "ambulatory")
+        self.assertEqual(inst.class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].code, "305997006")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].display, "Referral by radiologist")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.hospitalization.dischargeDisposition.coding[0].code, "306689006")
+        self.assertEqual(inst.hospitalization.dischargeDisposition.coding[0].display, "Discharge to home")
+        self.assertEqual(inst.hospitalization.dischargeDisposition.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.hospitalization.preAdmissionIdentifier.system, "http://www.bmc.nl/zorgportal/identifiers/pre-admissions")
+        self.assertEqual(inst.hospitalization.preAdmissionIdentifier.use, "official")
+        self.assertEqual(inst.hospitalization.preAdmissionIdentifier.value, "98682")
+        self.assertEqual(inst.id, "f002")
+        self.assertEqual(inst.identifier[0].system, "http://www.bmc.nl/zorgportal/identifiers/encounters")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "v3251")
+        self.assertEqual(inst.length.code, "min")
+        self.assertEqual(inst.length.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.length.unit, "min")
+        self.assertEqual(inst.length.value, 140)
+        self.assertEqual(inst.priority.coding[0].code, "103391001")
+        self.assertEqual(inst.priority.coding[0].display, "Urgent")
+        self.assertEqual(inst.priority.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reason[0].coding[0].code, "34068001")
+        self.assertEqual(inst.reason[0].coding[0].display, "Partial lobectomy of lung")
+        self.assertEqual(inst.reason[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.status, "finished")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "270427003")
+        self.assertEqual(inst.type[0].coding[0].display, "Patient-initiated encounter")
+        self.assertEqual(inst.type[0].coding[0].system, "http://snomed.info/sct")
+    
+    def testEncounter4(self):
+        inst = self.instantiate_from("encounter-example-f003-abscess.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Encounter instance")
+        self.implEncounter4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Encounter", js["resourceType"])
+        inst2 = encounter.Encounter(js)
+        self.implEncounter4(inst2)
+    
+    def implEncounter4(self, inst):
+        self.assertEqual(inst.class_fhir.code, "AMB")
+        self.assertEqual(inst.class_fhir.display, "ambulatory")
+        self.assertEqual(inst.class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].code, "305956004")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].display, "Referral by physician")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.hospitalization.dischargeDisposition.coding[0].code, "306689006")
+        self.assertEqual(inst.hospitalization.dischargeDisposition.coding[0].display, "Discharge to home")
+        self.assertEqual(inst.hospitalization.dischargeDisposition.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.hospitalization.preAdmissionIdentifier.system, "http://www.bmc.nl/zorgportal/identifiers/pre-admissions")
+        self.assertEqual(inst.hospitalization.preAdmissionIdentifier.use, "official")
+        self.assertEqual(inst.hospitalization.preAdmissionIdentifier.value, "93042")
+        self.assertEqual(inst.id, "f003")
+        self.assertEqual(inst.identifier[0].system, "http://www.bmc.nl/zorgportal/identifiers/encounters")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "v6751")
+        self.assertEqual(inst.length.code, "min")
+        self.assertEqual(inst.length.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.length.unit, "min")
+        self.assertEqual(inst.length.value, 90)
+        self.assertEqual(inst.priority.coding[0].code, "103391001")
+        self.assertEqual(inst.priority.coding[0].display, "Non-urgent ear, nose and throat admission")
+        self.assertEqual(inst.priority.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reason[0].coding[0].code, "18099001")
+        self.assertEqual(inst.reason[0].coding[0].display, "Retropharyngeal abscess")
+        self.assertEqual(inst.reason[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reason[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/encounter-primaryDiagnosis")
+        self.assertEqual(inst.reason[0].extension[0].valuePositiveInt, 1)
+        self.assertEqual(inst.status, "finished")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "270427003")
+        self.assertEqual(inst.type[0].coding[0].display, "Patient-initiated encounter")
+        self.assertEqual(inst.type[0].coding[0].system, "http://snomed.info/sct")
+    
+    def testEncounter5(self):
+        inst = self.instantiate_from("encounter-example-f201-20130404.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Encounter instance")
+        self.implEncounter5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Encounter", js["resourceType"])
+        inst2 = encounter.Encounter(js)
+        self.implEncounter5(inst2)
+    
+    def implEncounter5(self, inst):
+        self.assertEqual(inst.class_fhir.code, "AMB")
+        self.assertEqual(inst.class_fhir.display, "ambulatory")
+        self.assertEqual(inst.class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.identifier[0].use, "temp")
+        self.assertEqual(inst.identifier[0].value, "Encounter_Roel_20130404")
+        self.assertEqual(inst.priority.coding[0].code, "17621005")
+        self.assertEqual(inst.priority.coding[0].display, "Normal")
+        self.assertEqual(inst.priority.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reason[0].text, "The patient had fever peaks over the last couple of days. He is worried about these peaks.")
+        self.assertEqual(inst.status, "finished")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "11429006")
+        self.assertEqual(inst.type[0].coding[0].display, "Consultation")
+        self.assertEqual(inst.type[0].coding[0].system, "http://snomed.info/sct")
+    
+    def testEncounter6(self):
+        inst = self.instantiate_from("encounter-example-f202-20130128.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Encounter instance")
+        self.implEncounter6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Encounter", js["resourceType"])
+        inst2 = encounter.Encounter(js)
+        self.implEncounter6(inst2)
+    
+    def implEncounter6(self, inst):
+        self.assertEqual(inst.class_fhir.code, "AMB")
+        self.assertEqual(inst.class_fhir.display, "ambulatory")
+        self.assertEqual(inst.class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.diagnosis[0].rank, 1)
+        self.assertEqual(inst.diagnosis[0].role.coding[0].code, "AD")
+        self.assertEqual(inst.diagnosis[0].role.coding[0].display, "Admission diagnosis")
+        self.assertEqual(inst.diagnosis[0].role.coding[0].system, "http://hl7.org/fhir/diagnosis-role")
+        self.assertEqual(inst.id, "f202")
+        self.assertEqual(inst.identifier[0].use, "temp")
+        self.assertEqual(inst.identifier[0].value, "Encounter_Roel_20130128")
+        self.assertEqual(inst.length.code, "min")
+        self.assertEqual(inst.length.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.length.unit, "minutes")
+        self.assertEqual(inst.length.value, 56)
+        self.assertEqual(inst.priority.coding[0].code, "103391001")
+        self.assertEqual(inst.priority.coding[0].display, "Urgent")
+        self.assertEqual(inst.priority.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reason[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/encounter-primaryDiagnosis")
+        self.assertEqual(inst.reason[0].extension[0].valuePositiveInt, 2)
+        self.assertEqual(inst.reason[0].text, "The patient is treated for a tumor.")
+        self.assertEqual(inst.status, "finished")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "367336001")
+        self.assertEqual(inst.type[0].coding[0].display, "Chemotherapy")
+        self.assertEqual(inst.type[0].coding[0].system, "http://snomed.info/sct")
+    
+    def testEncounter7(self):
+        inst = self.instantiate_from("encounter-example-f203-20130311.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Encounter instance")
+        self.implEncounter7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Encounter", js["resourceType"])
+        inst2 = encounter.Encounter(js)
+        self.implEncounter7(inst2)
+    
+    def implEncounter7(self, inst):
+        self.assertEqual(inst.class_fhir.code, "IMP")
+        self.assertEqual(inst.class_fhir.display, "inpatient encounter")
+        self.assertEqual(inst.class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.diagnosis[0].rank, 1)
+        self.assertEqual(inst.diagnosis[0].role.coding[0].code, "AD")
+        self.assertEqual(inst.diagnosis[0].role.coding[0].display, "Admission diagnosis")
+        self.assertEqual(inst.diagnosis[0].role.coding[0].system, "http://hl7.org/fhir/diagnosis-role")
+        self.assertEqual(inst.diagnosis[1].role.coding[0].code, "DD")
+        self.assertEqual(inst.diagnosis[1].role.coding[0].display, "Discharge diagnosis")
+        self.assertEqual(inst.diagnosis[1].role.coding[0].system, "http://hl7.org/fhir/diagnosis-role")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].code, "309902002")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].display, "Clinical Oncology Department")
+        self.assertEqual(inst.hospitalization.admitSource.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.hospitalization.dietPreference[0].coding[0].code, "276026009")
+        self.assertEqual(inst.hospitalization.dietPreference[0].coding[0].display, "Fluid balance regulation")
+        self.assertEqual(inst.hospitalization.dietPreference[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.hospitalization.reAdmission.coding[0].display, "readmitted")
+        self.assertEqual(inst.hospitalization.specialArrangement[0].coding[0].code, "wheel")
+        self.assertEqual(inst.hospitalization.specialArrangement[0].coding[0].display, "Wheelchair")
+        self.assertEqual(inst.hospitalization.specialArrangement[0].coding[0].system, "http://hl7.org/fhir/encounter-special-arrangements")
+        self.assertEqual(inst.hospitalization.specialCourtesy[0].coding[0].code, "NRM")
+        self.assertEqual(inst.hospitalization.specialCourtesy[0].coding[0].display, "normal courtesy")
+        self.assertEqual(inst.hospitalization.specialCourtesy[0].coding[0].system, "http://hl7.org/fhir/v3/EncounterSpecialCourtesy")
+        self.assertEqual(inst.id, "f203")
+        self.assertEqual(inst.identifier[0].use, "temp")
+        self.assertEqual(inst.identifier[0].value, "Encounter_Roel_20130311")
+        self.assertEqual(inst.participant[0].type[0].coding[0].code, "PART")
+        self.assertEqual(inst.participant[0].type[0].coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.period.end.date, FHIRDate("2013-03-20").date)
+        self.assertEqual(inst.period.end.as_json(), "2013-03-20")
+        self.assertEqual(inst.period.start.date, FHIRDate("2013-03-11").date)
+        self.assertEqual(inst.period.start.as_json(), "2013-03-11")
+        self.assertEqual(inst.priority.coding[0].code, "394849002")
+        self.assertEqual(inst.priority.coding[0].display, "High priority")
+        self.assertEqual(inst.priority.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.reason[0].text, "The patient seems to suffer from bilateral pneumonia and renal insufficiency, most likely due to chemotherapy.")
+        self.assertEqual(inst.status, "finished")
+        self.assertEqual(inst.statusHistory[0].period.start.date, FHIRDate("2013-03-08").date)
+        self.assertEqual(inst.statusHistory[0].period.start.as_json(), "2013-03-08")
+        self.assertEqual(inst.statusHistory[0].status, "arrived")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "183807002")
+        self.assertEqual(inst.type[0].coding[0].display, "Inpatient stay for nine days")
+        self.assertEqual(inst.type[0].coding[0].system, "http://snomed.info/sct")
+    
+    def testEncounter8(self):
+        inst = self.instantiate_from("encounter-example-home.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Encounter instance")
+        self.implEncounter8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Encounter", js["resourceType"])
+        inst2 = encounter.Encounter(js)
+        self.implEncounter8(inst2)
+    
+    def implEncounter8(self, inst):
+        self.assertEqual(inst.class_fhir.code, "HH")
+        self.assertEqual(inst.class_fhir.display, "home health")
+        self.assertEqual(inst.class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.contained[0].id, "home")
+        self.assertEqual(inst.id, "home")
+        self.assertEqual(inst.location[0].period.end.date, FHIRDate("2015-01-17T16:30:00+10:00").date)
+        self.assertEqual(inst.location[0].period.end.as_json(), "2015-01-17T16:30:00+10:00")
+        self.assertEqual(inst.location[0].period.start.date, FHIRDate("2015-01-17T16:00:00+10:00").date)
+        self.assertEqual(inst.location[0].period.start.as_json(), "2015-01-17T16:00:00+10:00")
+        self.assertEqual(inst.location[0].status, "completed")
+        self.assertEqual(inst.participant[0].period.end.date, FHIRDate("2015-01-17T16:30:00+10:00").date)
+        self.assertEqual(inst.participant[0].period.end.as_json(), "2015-01-17T16:30:00+10:00")
+        self.assertEqual(inst.participant[0].period.start.date, FHIRDate("2015-01-17T16:00:00+10:00").date)
+        self.assertEqual(inst.participant[0].period.start.as_json(), "2015-01-17T16:00:00+10:00")
+        self.assertEqual(inst.period.end.date, FHIRDate("2015-01-17T16:30:00+10:00").date)
+        self.assertEqual(inst.period.end.as_json(), "2015-01-17T16:30:00+10:00")
+        self.assertEqual(inst.period.start.date, FHIRDate("2015-01-17T16:00:00+10:00").date)
+        self.assertEqual(inst.period.start.as_json(), "2015-01-17T16:00:00+10:00")
+        self.assertEqual(inst.status, "finished")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Encounter with patient @example who is at home</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testEncounter9(self):
+        inst = self.instantiate_from("encounter-example-xcda.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Encounter instance")
+        self.implEncounter9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Encounter", js["resourceType"])
+        inst2 = encounter.Encounter(js)
+        self.implEncounter9(inst2)
+    
+    def implEncounter9(self, inst):
+        self.assertEqual(inst.class_fhir.code, "AMB")
+        self.assertEqual(inst.class_fhir.display, "ambulatory")
+        self.assertEqual(inst.class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.id, "xcda")
+        self.assertEqual(inst.identifier[0].system, "http://healthcare.example.org/identifiers/enocunter")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "1234213.52345873")
+        self.assertEqual(inst.reason[0].coding[0].code, "T-D8200")
+        self.assertEqual(inst.reason[0].coding[0].display, "Arm")
+        self.assertEqual(inst.reason[0].coding[0].system, "http://ihe.net/xds/connectathon/eventCodes")
+        self.assertEqual(inst.status, "finished")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testEncounter10(self):
+        inst = self.instantiate_from("encounter-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Encounter instance")
+        self.implEncounter10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Encounter", js["resourceType"])
+        inst2 = encounter.Encounter(js)
+        self.implEncounter10(inst2)
+    
+    def implEncounter10(self, inst):
+        self.assertEqual(inst.class_fhir.code, "IMP")
+        self.assertEqual(inst.class_fhir.display, "inpatient encounter")
+        self.assertEqual(inst.class_fhir.system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.status, "in-progress")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Encounter with patient @example</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/endpoint.py b/fhirclient/models/endpoint.py
new file mode 100644
index 0000000..1a11048
--- /dev/null
+++ b/fhirclient/models/endpoint.py
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Endpoint) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Endpoint(domainresource.DomainResource):
+    """ The technical details of an endpoint that can be used for electronic
+    services.
+    
+    The technical details of an endpoint that can be used for electronic
+    services, such as for web services providing XDS.b or a REST endpoint for
+    another FHIR server. This may include any security context information.
+    """
+    
+    resource_type = "Endpoint"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.address = None
+        """ The technical base address for connecting to this endpoint.
+        Type `str`. """
+        
+        self.connectionType = None
+        """ Protocol/Profile/Standard to be used with this endpoint connection.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.contact = None
+        """ Contact details for source (e.g. troubleshooting).
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        self.header = None
+        """ Usage depends on the channel type.
+        List of `str` items. """
+        
+        self.identifier = None
+        """ Identifies this endpoint across multiple systems.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.managingOrganization = None
+        """ Organization that manages this endpoint (may not be the
+        organization that exposes the endpoint).
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ A name that this endpoint can be identified by.
+        Type `str`. """
+        
+        self.payloadMimeType = None
+        """ Mimetype to send. If not specified, the content could be anything
+        (including no payload, if the connectionType defined this).
+        List of `str` items. """
+        
+        self.payloadType = None
+        """ The type of content that may be used at this endpoint (e.g. XDS
+        Discharge summaries).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Interval the endpoint is expected to be operational.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | suspended | error | off | entered-in-error | test.
+        Type `str`. """
+        
+        super(Endpoint, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Endpoint, self).elementProperties()
+        js.extend([
+            ("address", "address", str, False, None, True),
+            ("connectionType", "connectionType", coding.Coding, False, None, True),
+            ("contact", "contact", contactpoint.ContactPoint, True, None, False),
+            ("header", "header", str, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("managingOrganization", "managingOrganization", fhirreference.FHIRReference, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("payloadMimeType", "payloadMimeType", str, True, None, False),
+            ("payloadType", "payloadType", codeableconcept.CodeableConcept, True, None, True),
+            ("period", "period", period.Period, False, None, False),
+            ("status", "status", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/endpoint_tests.py b/fhirclient/models/endpoint_tests.py
new file mode 100644
index 0000000..6f1a16c
--- /dev/null
+++ b/fhirclient/models/endpoint_tests.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import endpoint
+from .fhirdate import FHIRDate
+
+
+class EndpointTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Endpoint", js["resourceType"])
+        return endpoint.Endpoint(js)
+    
+    def testEndpoint1(self):
+        inst = self.instantiate_from("endpoint-example-iid.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Endpoint instance")
+        self.implEndpoint1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Endpoint", js["resourceType"])
+        inst2 = endpoint.Endpoint(js)
+        self.implEndpoint1(inst2)
+    
+    def implEndpoint1(self, inst):
+        self.assertEqual(inst.address, "https://pacs.hospital.org/IHEInvokeImageDisplay")
+        self.assertEqual(inst.connectionType.code, "ihe-iid")
+        self.assertEqual(inst.connectionType.system, "http://hl7.org/fhir/endpoint-connection-type")
+        self.assertEqual(inst.id, "example-iid")
+        self.assertEqual(inst.name, "PACS Hospital Invoke Image Display endpoint")
+        self.assertEqual(inst.payloadType[0].text, "DICOM IID")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testEndpoint2(self):
+        inst = self.instantiate_from("endpoint-example-wadors.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Endpoint instance")
+        self.implEndpoint2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Endpoint", js["resourceType"])
+        inst2 = endpoint.Endpoint(js)
+        self.implEndpoint2(inst2)
+    
+    def implEndpoint2(self, inst):
+        self.assertEqual(inst.address, "https://pacs.hospital.org/wado-rs")
+        self.assertEqual(inst.connectionType.code, "dicom-wado-rs")
+        self.assertEqual(inst.connectionType.system, "http://hl7.org/fhir/endpoint-connection-type")
+        self.assertEqual(inst.id, "example-wadors")
+        self.assertEqual(inst.name, "PACS Hospital DICOM WADO-RS endpoint")
+        self.assertEqual(inst.payloadMimeType[0], "application/dicom")
+        self.assertEqual(inst.payloadType[0].text, "DICOM WADO-RS")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testEndpoint3(self):
+        inst = self.instantiate_from("endpoint-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Endpoint instance")
+        self.implEndpoint3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Endpoint", js["resourceType"])
+        inst2 = endpoint.Endpoint(js)
+        self.implEndpoint3(inst2)
+    
+    def implEndpoint3(self, inst):
+        self.assertEqual(inst.address, "http://fhir3.healthintersections.com.au/open/CarePlan")
+        self.assertEqual(inst.connectionType.code, "hl7-fhir-rest")
+        self.assertEqual(inst.connectionType.system, "http://hl7.org/fhir/endpoint-connection-type")
+        self.assertEqual(inst.contact[0].system, "email")
+        self.assertEqual(inst.contact[0].use, "work")
+        self.assertEqual(inst.contact[0].value, "endpointmanager at example.org")
+        self.assertEqual(inst.header[0], "bearer-code BASGS534s4")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/enpoint-identifier")
+        self.assertEqual(inst.identifier[0].value, "epcp12")
+        self.assertEqual(inst.name, "Health Intersections CarePlan Hub")
+        self.assertEqual(inst.payloadMimeType[0], "application/fhir+xml")
+        self.assertEqual(inst.payloadType[0].coding[0].code, "CarePlan")
+        self.assertEqual(inst.payloadType[0].coding[0].system, "http://hl7.org/fhir/resource-types")
+        self.assertEqual(inst.period.start.date, FHIRDate("2014-09-01").date)
+        self.assertEqual(inst.period.start.as_json(), "2014-09-01")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/enrollmentrequest.py b/fhirclient/models/enrollmentrequest.py
new file mode 100644
index 0000000..44d8de1
--- /dev/null
+++ b/fhirclient/models/enrollmentrequest.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/EnrollmentRequest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class EnrollmentRequest(domainresource.DomainResource):
+    """ Enrollment request.
+    
+    This resource provides the insurance enrollment details to the insurer
+    regarding a specified coverage.
+    """
+    
+    resource_type = "EnrollmentRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.coverage = None
+        """ Insurance information.
+        Type `FHIRReference` referencing `Coverage` (represented as `dict` in JSON). """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.insurer = None
+        """ Target.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Responsible organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.provider = None
+        """ Responsible practitioner.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ The subject of the Products and Services.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        super(EnrollmentRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EnrollmentRequest, self).elementProperties()
+        js.extend([
+            ("coverage", "coverage", fhirreference.FHIRReference, False, None, False),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("insurer", "insurer", fhirreference.FHIRReference, False, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("provider", "provider", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/enrollmentrequest_tests.py b/fhirclient/models/enrollmentrequest_tests.py
new file mode 100644
index 0000000..5eb0eff
--- /dev/null
+++ b/fhirclient/models/enrollmentrequest_tests.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import enrollmentrequest
+from .fhirdate import FHIRDate
+
+
+class EnrollmentRequestTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("EnrollmentRequest", js["resourceType"])
+        return enrollmentrequest.EnrollmentRequest(js)
+    
+    def testEnrollmentRequest1(self):
+        inst = self.instantiate_from("enrollmentrequest-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a EnrollmentRequest instance")
+        self.implEnrollmentRequest1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("EnrollmentRequest", js["resourceType"])
+        inst2 = enrollmentrequest.EnrollmentRequest(js)
+        self.implEnrollmentRequest1(inst2)
+    
+    def implEnrollmentRequest1(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "22345")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/enrollmentrequest")
+        self.assertEqual(inst.identifier[0].value, "EN22345")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the EnrollmentRequest.</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/enrollmentresponse.py b/fhirclient/models/enrollmentresponse.py
new file mode 100644
index 0000000..62df1ef
--- /dev/null
+++ b/fhirclient/models/enrollmentresponse.py
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/EnrollmentResponse) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class EnrollmentResponse(domainresource.DomainResource):
+    """ EnrollmentResponse resource.
+    
+    This resource provides enrollment and plan details from the processing of
+    an Enrollment resource.
+    """
+    
+    resource_type = "EnrollmentResponse"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.disposition = None
+        """ Disposition Message.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Business Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Insurer.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.outcome = None
+        """ complete | error | partial.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.request = None
+        """ Claim reference.
+        Type `FHIRReference` referencing `EnrollmentRequest` (represented as `dict` in JSON). """
+        
+        self.requestOrganization = None
+        """ Responsible organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.requestProvider = None
+        """ Responsible practitioner.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        super(EnrollmentResponse, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EnrollmentResponse, self).elementProperties()
+        js.extend([
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("disposition", "disposition", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("outcome", "outcome", codeableconcept.CodeableConcept, False, None, False),
+            ("request", "request", fhirreference.FHIRReference, False, None, False),
+            ("requestOrganization", "requestOrganization", fhirreference.FHIRReference, False, None, False),
+            ("requestProvider", "requestProvider", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/enrollmentresponse_tests.py b/fhirclient/models/enrollmentresponse_tests.py
new file mode 100644
index 0000000..c51a026
--- /dev/null
+++ b/fhirclient/models/enrollmentresponse_tests.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import enrollmentresponse
+from .fhirdate import FHIRDate
+
+
+class EnrollmentResponseTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("EnrollmentResponse", js["resourceType"])
+        return enrollmentresponse.EnrollmentResponse(js)
+    
+    def testEnrollmentResponse1(self):
+        inst = self.instantiate_from("enrollmentresponse-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a EnrollmentResponse instance")
+        self.implEnrollmentResponse1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("EnrollmentResponse", js["resourceType"])
+        inst2 = enrollmentresponse.EnrollmentResponse(js)
+        self.implEnrollmentResponse1(inst2)
+    
+    def implEnrollmentResponse1(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.disposition, "Dependant added to policy.")
+        self.assertEqual(inst.id, "ER2500")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/enrollmentresponse")
+        self.assertEqual(inst.identifier[0].value, "781234")
+        self.assertEqual(inst.outcome.coding[0].code, "complete")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/remittance-outcome")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the EnrollmentResponse</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/episodeofcare.py b/fhirclient/models/episodeofcare.py
new file mode 100644
index 0000000..84b4542
--- /dev/null
+++ b/fhirclient/models/episodeofcare.py
@@ -0,0 +1,198 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/EpisodeOfCare) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class EpisodeOfCare(domainresource.DomainResource):
+    """ An association of a Patient with an Organization and  Healthcare
+    Provider(s) for a period of time that the Organization assumes some level
+    of responsibility.
+    
+    An association between a patient and an organization / healthcare
+    provider(s) during which time encounters may occur. The managing
+    organization assumes a level of responsibility for the patient during this
+    time.
+    """
+    
+    resource_type = "EpisodeOfCare"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.account = None
+        """ The set of accounts that may be used for billing for this
+        EpisodeOfCare.
+        List of `FHIRReference` items referencing `Account` (represented as `dict` in JSON). """
+        
+        self.careManager = None
+        """ Care manager/care co-ordinator for the patient.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.diagnosis = None
+        """ The list of diagnosis relevant to this episode of care.
+        List of `EpisodeOfCareDiagnosis` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier(s) relevant for this EpisodeOfCare.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.managingOrganization = None
+        """ Organization that assumes care.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ The patient who is the focus of this episode of care.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Interval during responsibility is assumed.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.referralRequest = None
+        """ Originating Referral Request(s).
+        List of `FHIRReference` items referencing `ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ planned | waitlist | active | onhold | finished | cancelled |
+        entered-in-error.
+        Type `str`. """
+        
+        self.statusHistory = None
+        """ Past list of status codes (the current status may be included to
+        cover the start date of the status).
+        List of `EpisodeOfCareStatusHistory` items (represented as `dict` in JSON). """
+        
+        self.team = None
+        """ Other practitioners facilitating this episode of care.
+        List of `FHIRReference` items referencing `CareTeam` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type/class  - e.g. specialist referral, disease management.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(EpisodeOfCare, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EpisodeOfCare, self).elementProperties()
+        js.extend([
+            ("account", "account", fhirreference.FHIRReference, True, None, False),
+            ("careManager", "careManager", fhirreference.FHIRReference, False, None, False),
+            ("diagnosis", "diagnosis", EpisodeOfCareDiagnosis, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("managingOrganization", "managingOrganization", fhirreference.FHIRReference, False, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("period", "period", period.Period, False, None, False),
+            ("referralRequest", "referralRequest", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("statusHistory", "statusHistory", EpisodeOfCareStatusHistory, True, None, False),
+            ("team", "team", fhirreference.FHIRReference, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class EpisodeOfCareDiagnosis(backboneelement.BackboneElement):
+    """ The list of diagnosis relevant to this episode of care.
+    """
+    
+    resource_type = "EpisodeOfCareDiagnosis"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.condition = None
+        """ Conditions/problems/diagnoses this episode of care is for.
+        Type `FHIRReference` referencing `Condition` (represented as `dict` in JSON). """
+        
+        self.rank = None
+        """ Ranking of the diagnosis (for each role type).
+        Type `int`. """
+        
+        self.role = None
+        """ Role that this diagnosis has within the episode of care (e.g.
+        admission, billing, discharge …).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(EpisodeOfCareDiagnosis, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EpisodeOfCareDiagnosis, self).elementProperties()
+        js.extend([
+            ("condition", "condition", fhirreference.FHIRReference, False, None, True),
+            ("rank", "rank", int, False, None, False),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class EpisodeOfCareStatusHistory(backboneelement.BackboneElement):
+    """ Past list of status codes (the current status may be included to cover the
+    start date of the status).
+    
+    The history of statuses that the EpisodeOfCare has been through (without
+    requiring processing the history of the resource).
+    """
+    
+    resource_type = "EpisodeOfCareStatusHistory"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.period = None
+        """ Duration the EpisodeOfCare was in the specified status.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ planned | waitlist | active | onhold | finished | cancelled |
+        entered-in-error.
+        Type `str`. """
+        
+        super(EpisodeOfCareStatusHistory, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(EpisodeOfCareStatusHistory, self).elementProperties()
+        js.extend([
+            ("period", "period", period.Period, False, None, True),
+            ("status", "status", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/episodeofcare_tests.py b/fhirclient/models/episodeofcare_tests.py
new file mode 100644
index 0000000..fbe520a
--- /dev/null
+++ b/fhirclient/models/episodeofcare_tests.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import episodeofcare
+from .fhirdate import FHIRDate
+
+
+class EpisodeOfCareTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("EpisodeOfCare", js["resourceType"])
+        return episodeofcare.EpisodeOfCare(js)
+    
+    def testEpisodeOfCare1(self):
+        inst = self.instantiate_from("episodeofcare-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a EpisodeOfCare instance")
+        self.implEpisodeOfCare1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("EpisodeOfCare", js["resourceType"])
+        inst2 = episodeofcare.EpisodeOfCare(js)
+        self.implEpisodeOfCare1(inst2)
+    
+    def implEpisodeOfCare1(self, inst):
+        self.assertEqual(inst.diagnosis[0].rank, 1)
+        self.assertEqual(inst.diagnosis[0].role.coding[0].code, "CC")
+        self.assertEqual(inst.diagnosis[0].role.coding[0].display, "Chief complaint")
+        self.assertEqual(inst.diagnosis[0].role.coding[0].system, "http://hl7.org/fhir/diagnosis-role")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/sampleepisodeofcare-identifier")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.period.start.date, FHIRDate("2014-09-01").date)
+        self.assertEqual(inst.period.start.as_json(), "2014-09-01")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.statusHistory[0].period.end.date, FHIRDate("2014-09-14").date)
+        self.assertEqual(inst.statusHistory[0].period.end.as_json(), "2014-09-14")
+        self.assertEqual(inst.statusHistory[0].period.start.date, FHIRDate("2014-09-01").date)
+        self.assertEqual(inst.statusHistory[0].period.start.as_json(), "2014-09-01")
+        self.assertEqual(inst.statusHistory[0].status, "planned")
+        self.assertEqual(inst.statusHistory[1].period.end.date, FHIRDate("2014-09-21").date)
+        self.assertEqual(inst.statusHistory[1].period.end.as_json(), "2014-09-21")
+        self.assertEqual(inst.statusHistory[1].period.start.date, FHIRDate("2014-09-15").date)
+        self.assertEqual(inst.statusHistory[1].period.start.as_json(), "2014-09-15")
+        self.assertEqual(inst.statusHistory[1].status, "active")
+        self.assertEqual(inst.statusHistory[2].period.end.date, FHIRDate("2014-09-24").date)
+        self.assertEqual(inst.statusHistory[2].period.end.as_json(), "2014-09-24")
+        self.assertEqual(inst.statusHistory[2].period.start.date, FHIRDate("2014-09-22").date)
+        self.assertEqual(inst.statusHistory[2].period.start.as_json(), "2014-09-22")
+        self.assertEqual(inst.statusHistory[2].status, "onhold")
+        self.assertEqual(inst.statusHistory[3].period.start.date, FHIRDate("2014-09-25").date)
+        self.assertEqual(inst.statusHistory[3].period.start.as_json(), "2014-09-25")
+        self.assertEqual(inst.statusHistory[3].status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "hacc")
+        self.assertEqual(inst.type[0].coding[0].display, "Home and Community Care")
+        self.assertEqual(inst.type[0].coding[0].system, "http://hl7.org/fhir/episodeofcare-type")
+
diff --git a/fhirclient/models/expansionprofile.py b/fhirclient/models/expansionprofile.py
new file mode 100644
index 0000000..e09d75b
--- /dev/null
+++ b/fhirclient/models/expansionprofile.py
@@ -0,0 +1,418 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ExpansionProfile) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ExpansionProfile(domainresource.DomainResource):
+    """ Defines behaviour and contraints on the ValueSet Expansion operation.
+    
+    Resource to define constraints on the Expansion of a FHIR ValueSet.
+    """
+    
+    resource_type = "ExpansionProfile"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.activeOnly = None
+        """ Include or exclude inactive concepts in the expansion.
+        Type `bool`. """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the expansion profile.
+        Type `str`. """
+        
+        self.designation = None
+        """ When the expansion profile imposes designation contraints.
+        Type `ExpansionProfileDesignation` (represented as `dict` in JSON). """
+        
+        self.displayLanguage = None
+        """ Specify the language for the display element of codes in the value
+        set expansion.
+        Type `str`. """
+        
+        self.excludeNested = None
+        """ Nested codes in the expansion or not.
+        Type `bool`. """
+        
+        self.excludeNotForUI = None
+        """ Include or exclude codes which cannot be rendered in user
+        interfaces in the value set expansion.
+        Type `bool`. """
+        
+        self.excludePostCoordinated = None
+        """ Include or exclude codes which are post coordinated expressions in
+        the value set expansion.
+        Type `bool`. """
+        
+        self.excludedSystem = None
+        """ Systems/Versions to be exclude.
+        Type `ExpansionProfileExcludedSystem` (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.fixedVersion = None
+        """ Fix use of a code system to a particular version.
+        List of `ExpansionProfileFixedVersion` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Additional identifier for the expansion profile.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.includeDefinition = None
+        """ Include or exclude the value set definition in the expansion.
+        Type `bool`. """
+        
+        self.includeDesignations = None
+        """ Whether the expansion should include concept designations.
+        Type `bool`. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for expansion profile (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.limitedExpansion = None
+        """ Controls behaviour of the value set expand operation when value
+        sets are too large to be completely expanded.
+        Type `bool`. """
+        
+        self.name = None
+        """ Name for this expansion profile (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this expansion profile (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the expansion profile.
+        Type `str`. """
+        
+        super(ExpansionProfile, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExpansionProfile, self).elementProperties()
+        js.extend([
+            ("activeOnly", "activeOnly", bool, False, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("designation", "designation", ExpansionProfileDesignation, False, None, False),
+            ("displayLanguage", "displayLanguage", str, False, None, False),
+            ("excludeNested", "excludeNested", bool, False, None, False),
+            ("excludeNotForUI", "excludeNotForUI", bool, False, None, False),
+            ("excludePostCoordinated", "excludePostCoordinated", bool, False, None, False),
+            ("excludedSystem", "excludedSystem", ExpansionProfileExcludedSystem, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("fixedVersion", "fixedVersion", ExpansionProfileFixedVersion, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("includeDefinition", "includeDefinition", bool, False, None, False),
+            ("includeDesignations", "includeDesignations", bool, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("limitedExpansion", "limitedExpansion", bool, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ExpansionProfileDesignation(backboneelement.BackboneElement):
+    """ When the expansion profile imposes designation contraints.
+    
+    A set of criteria that provide the constraints imposed on the value set
+    expansion by including or excluding designations.
+    """
+    
+    resource_type = "ExpansionProfileDesignation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.exclude = None
+        """ Designations to be excluded.
+        Type `ExpansionProfileDesignationExclude` (represented as `dict` in JSON). """
+        
+        self.include = None
+        """ Designations to be included.
+        Type `ExpansionProfileDesignationInclude` (represented as `dict` in JSON). """
+        
+        super(ExpansionProfileDesignation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExpansionProfileDesignation, self).elementProperties()
+        js.extend([
+            ("exclude", "exclude", ExpansionProfileDesignationExclude, False, None, False),
+            ("include", "include", ExpansionProfileDesignationInclude, False, None, False),
+        ])
+        return js
+
+
+class ExpansionProfileDesignationExclude(backboneelement.BackboneElement):
+    """ Designations to be excluded.
+    """
+    
+    resource_type = "ExpansionProfileDesignationExclude"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.designation = None
+        """ The designation to be excluded.
+        List of `ExpansionProfileDesignationExcludeDesignation` items (represented as `dict` in JSON). """
+        
+        super(ExpansionProfileDesignationExclude, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExpansionProfileDesignationExclude, self).elementProperties()
+        js.extend([
+            ("designation", "designation", ExpansionProfileDesignationExcludeDesignation, True, None, False),
+        ])
+        return js
+
+
+class ExpansionProfileDesignationExcludeDesignation(backboneelement.BackboneElement):
+    """ The designation to be excluded.
+    
+    A data group for each designation to be excluded.
+    """
+    
+    resource_type = "ExpansionProfileDesignationExcludeDesignation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.language = None
+        """ Human language of the designation to be excluded.
+        Type `str`. """
+        
+        self.use = None
+        """ What kind of Designation to exclude.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(ExpansionProfileDesignationExcludeDesignation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExpansionProfileDesignationExcludeDesignation, self).elementProperties()
+        js.extend([
+            ("language", "language", str, False, None, False),
+            ("use", "use", coding.Coding, False, None, False),
+        ])
+        return js
+
+
+class ExpansionProfileDesignationInclude(backboneelement.BackboneElement):
+    """ Designations to be included.
+    """
+    
+    resource_type = "ExpansionProfileDesignationInclude"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.designation = None
+        """ The designation to be included.
+        List of `ExpansionProfileDesignationIncludeDesignation` items (represented as `dict` in JSON). """
+        
+        super(ExpansionProfileDesignationInclude, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExpansionProfileDesignationInclude, self).elementProperties()
+        js.extend([
+            ("designation", "designation", ExpansionProfileDesignationIncludeDesignation, True, None, False),
+        ])
+        return js
+
+
+class ExpansionProfileDesignationIncludeDesignation(backboneelement.BackboneElement):
+    """ The designation to be included.
+    
+    A data group for each designation to be included.
+    """
+    
+    resource_type = "ExpansionProfileDesignationIncludeDesignation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.language = None
+        """ Human language of the designation to be included.
+        Type `str`. """
+        
+        self.use = None
+        """ What kind of Designation to include.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(ExpansionProfileDesignationIncludeDesignation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExpansionProfileDesignationIncludeDesignation, self).elementProperties()
+        js.extend([
+            ("language", "language", str, False, None, False),
+            ("use", "use", coding.Coding, False, None, False),
+        ])
+        return js
+
+
+class ExpansionProfileExcludedSystem(backboneelement.BackboneElement):
+    """ Systems/Versions to be exclude.
+    
+    Code system, or a particular version of a code system to be excluded from
+    value set expansions.
+    """
+    
+    resource_type = "ExpansionProfileExcludedSystem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.system = None
+        """ The specific code system to be excluded.
+        Type `str`. """
+        
+        self.version = None
+        """ Specific version of the code system referred to.
+        Type `str`. """
+        
+        super(ExpansionProfileExcludedSystem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExpansionProfileExcludedSystem, self).elementProperties()
+        js.extend([
+            ("system", "system", str, False, None, True),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+class ExpansionProfileFixedVersion(backboneelement.BackboneElement):
+    """ Fix use of a code system to a particular version.
+    
+    Fix use of a particular code system to a particular version.
+    """
+    
+    resource_type = "ExpansionProfileFixedVersion"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.mode = None
+        """ default | check | override.
+        Type `str`. """
+        
+        self.system = None
+        """ System to have its version fixed.
+        Type `str`. """
+        
+        self.version = None
+        """ Specific version of the code system referred to.
+        Type `str`. """
+        
+        super(ExpansionProfileFixedVersion, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExpansionProfileFixedVersion, self).elementProperties()
+        js.extend([
+            ("mode", "mode", str, False, None, True),
+            ("system", "system", str, False, None, True),
+            ("version", "version", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/expansionprofile_tests.py b/fhirclient/models/expansionprofile_tests.py
new file mode 100644
index 0000000..89616ed
--- /dev/null
+++ b/fhirclient/models/expansionprofile_tests.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import expansionprofile
+from .fhirdate import FHIRDate
+
+
+class ExpansionProfileTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ExpansionProfile", js["resourceType"])
+        return expansionprofile.ExpansionProfile(js)
+    
+    def testExpansionProfile1(self):
+        inst = self.instantiate_from("expansionprofile-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ExpansionProfile instance")
+        self.implExpansionProfile1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ExpansionProfile", js["resourceType"])
+        inst2 = expansionprofile.ExpansionProfile(js)
+        self.implExpansionProfile1(inst2)
+    
+    def implExpansionProfile1(self, inst):
+        self.assertEqual(inst.contact[0].name, "FHIR project team")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.date.date, FHIRDate("2016-12-23").date)
+        self.assertEqual(inst.date.as_json(), "2016-12-23")
+        self.assertEqual(inst.description, "exanple ExpansionProfile for publication")
+        self.assertTrue(inst.excludeNested)
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier.system, "http://example.org/profiles")
+        self.assertEqual(inst.identifier.value, "example")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "001")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "World")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "http://unstats.un.org/unsd/methods/m49/m49.htm")
+        self.assertEqual(inst.name, "Example Expansion Profile")
+        self.assertEqual(inst.publisher, "HL7 International")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[ Provide Rendering ]</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/ExpansionProfile/example")
+        self.assertEqual(inst.version, "0.1")
+
diff --git a/fhirclient/models/explanationofbenefit.py b/fhirclient/models/explanationofbenefit.py
new file mode 100644
index 0000000..72de616
--- /dev/null
+++ b/fhirclient/models/explanationofbenefit.py
@@ -0,0 +1,1408 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ExplanationOfBenefit(domainresource.DomainResource):
+    """ Explanation of Benefit resource.
+    
+    This resource provides: the claim details; adjudication details from the
+    processing of a Claim; and optionally account balance information, for
+    informing the subscriber of the benefits provided.
+    """
+    
+    resource_type = "ExplanationOfBenefit"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.accident = None
+        """ Details of an accident.
+        Type `ExplanationOfBenefitAccident` (represented as `dict` in JSON). """
+        
+        self.addItem = None
+        """ Insurer added line items.
+        List of `ExplanationOfBenefitAddItem` items (represented as `dict` in JSON). """
+        
+        self.benefitBalance = None
+        """ Balance by Benefit Category.
+        List of `ExplanationOfBenefitBenefitBalance` items (represented as `dict` in JSON). """
+        
+        self.billablePeriod = None
+        """ Period for charge submission.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.careTeam = None
+        """ Care Team members.
+        List of `ExplanationOfBenefitCareTeam` items (represented as `dict` in JSON). """
+        
+        self.claim = None
+        """ Claim reference.
+        Type `FHIRReference` referencing `Claim` (represented as `dict` in JSON). """
+        
+        self.claimResponse = None
+        """ Claim response reference.
+        Type `FHIRReference` referencing `ClaimResponse` (represented as `dict` in JSON). """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.diagnosis = None
+        """ List of Diagnosis.
+        List of `ExplanationOfBenefitDiagnosis` items (represented as `dict` in JSON). """
+        
+        self.disposition = None
+        """ Disposition Message.
+        Type `str`. """
+        
+        self.employmentImpacted = None
+        """ Period unable to work.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.enterer = None
+        """ Author.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.facility = None
+        """ Servicing Facility.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.form = None
+        """ Printed Form Identifier.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.hospitalization = None
+        """ Period in hospital.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.information = None
+        """ Exceptions, special considerations, the condition, situation, prior
+        or concurrent issues.
+        List of `ExplanationOfBenefitInformation` items (represented as `dict` in JSON). """
+        
+        self.insurance = None
+        """ Insurance or medical plan.
+        Type `ExplanationOfBenefitInsurance` (represented as `dict` in JSON). """
+        
+        self.insurer = None
+        """ Insurer responsible for the EOB.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.item = None
+        """ Goods and Services.
+        List of `ExplanationOfBenefitItem` items (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Responsible organization for the claim.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.originalPrescription = None
+        """ Original prescription if superceded by fulfiller.
+        Type `FHIRReference` referencing `MedicationRequest` (represented as `dict` in JSON). """
+        
+        self.outcome = None
+        """ complete | error | partial.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ The subject of the Products and Services.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.payee = None
+        """ Party to be paid any benefits payable.
+        Type `ExplanationOfBenefitPayee` (represented as `dict` in JSON). """
+        
+        self.payment = None
+        """ Payment (if paid).
+        Type `ExplanationOfBenefitPayment` (represented as `dict` in JSON). """
+        
+        self.precedence = None
+        """ Precedence (primary, secondary, etc.).
+        Type `int`. """
+        
+        self.prescription = None
+        """ Prescription authorizing services or products.
+        Type `FHIRReference` referencing `MedicationRequest, VisionPrescription` (represented as `dict` in JSON). """
+        
+        self.procedure = None
+        """ Procedures performed.
+        List of `ExplanationOfBenefitProcedure` items (represented as `dict` in JSON). """
+        
+        self.processNote = None
+        """ Processing notes.
+        List of `ExplanationOfBenefitProcessNote` items (represented as `dict` in JSON). """
+        
+        self.provider = None
+        """ Responsible provider for the claim.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.referral = None
+        """ Treatment Referral.
+        Type `FHIRReference` referencing `ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.related = None
+        """ Related Claims which may be revelant to processing this claim.
+        List of `ExplanationOfBenefitRelated` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        self.subType = None
+        """ Finer grained claim type information.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.totalBenefit = None
+        """ Total benefit payable for the Claim.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.totalCost = None
+        """ Total Cost of service from the Claim.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type or discipline.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.unallocDeductable = None
+        """ Unallocated deductable.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefit, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefit, self).elementProperties()
+        js.extend([
+            ("accident", "accident", ExplanationOfBenefitAccident, False, None, False),
+            ("addItem", "addItem", ExplanationOfBenefitAddItem, True, None, False),
+            ("benefitBalance", "benefitBalance", ExplanationOfBenefitBenefitBalance, True, None, False),
+            ("billablePeriod", "billablePeriod", period.Period, False, None, False),
+            ("careTeam", "careTeam", ExplanationOfBenefitCareTeam, True, None, False),
+            ("claim", "claim", fhirreference.FHIRReference, False, None, False),
+            ("claimResponse", "claimResponse", fhirreference.FHIRReference, False, None, False),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("diagnosis", "diagnosis", ExplanationOfBenefitDiagnosis, True, None, False),
+            ("disposition", "disposition", str, False, None, False),
+            ("employmentImpacted", "employmentImpacted", period.Period, False, None, False),
+            ("enterer", "enterer", fhirreference.FHIRReference, False, None, False),
+            ("facility", "facility", fhirreference.FHIRReference, False, None, False),
+            ("form", "form", codeableconcept.CodeableConcept, False, None, False),
+            ("hospitalization", "hospitalization", period.Period, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("information", "information", ExplanationOfBenefitInformation, True, None, False),
+            ("insurance", "insurance", ExplanationOfBenefitInsurance, False, None, False),
+            ("insurer", "insurer", fhirreference.FHIRReference, False, None, False),
+            ("item", "item", ExplanationOfBenefitItem, True, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("originalPrescription", "originalPrescription", fhirreference.FHIRReference, False, None, False),
+            ("outcome", "outcome", codeableconcept.CodeableConcept, False, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, False),
+            ("payee", "payee", ExplanationOfBenefitPayee, False, None, False),
+            ("payment", "payment", ExplanationOfBenefitPayment, False, None, False),
+            ("precedence", "precedence", int, False, None, False),
+            ("prescription", "prescription", fhirreference.FHIRReference, False, None, False),
+            ("procedure", "procedure", ExplanationOfBenefitProcedure, True, None, False),
+            ("processNote", "processNote", ExplanationOfBenefitProcessNote, True, None, False),
+            ("provider", "provider", fhirreference.FHIRReference, False, None, False),
+            ("referral", "referral", fhirreference.FHIRReference, False, None, False),
+            ("related", "related", ExplanationOfBenefitRelated, True, None, False),
+            ("status", "status", str, False, None, False),
+            ("subType", "subType", codeableconcept.CodeableConcept, True, None, False),
+            ("totalBenefit", "totalBenefit", money.Money, False, None, False),
+            ("totalCost", "totalCost", money.Money, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+            ("unallocDeductable", "unallocDeductable", money.Money, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ExplanationOfBenefitAccident(backboneelement.BackboneElement):
+    """ Details of an accident.
+    
+    An accident which resulted in the need for healthcare services.
+    """
+    
+    resource_type = "ExplanationOfBenefitAccident"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.date = None
+        """ When the accident occurred.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.locationAddress = None
+        """ Accident Place.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.locationReference = None
+        """ Accident Place.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ The nature of the accident.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitAccident, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitAccident, self).elementProperties()
+        js.extend([
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("locationAddress", "locationAddress", address.Address, False, "location", False),
+            ("locationReference", "locationReference", fhirreference.FHIRReference, False, "location", False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitAddItem(backboneelement.BackboneElement):
+    """ Insurer added line items.
+    
+    The first tier service adjudications for payor added services.
+    """
+    
+    resource_type = "ExplanationOfBenefitAddItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjudication = None
+        """ Added items adjudication.
+        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Type of service or product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.detail = None
+        """ Added items details.
+        List of `ExplanationOfBenefitAddItemDetail` items (represented as `dict` in JSON). """
+        
+        self.fee = None
+        """ Professional fee or Product charge.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.modifier = None
+        """ Service/Product billing modifiers.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.noteNumber = None
+        """ List of note numbers which apply.
+        List of `int` items. """
+        
+        self.revenue = None
+        """ Revenue or cost center code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequenceLinkId = None
+        """ Service instances.
+        List of `int` items. """
+        
+        self.service = None
+        """ Billing Code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitAddItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitAddItem, self).elementProperties()
+        js.extend([
+            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("detail", "detail", ExplanationOfBenefitAddItemDetail, True, None, False),
+            ("fee", "fee", money.Money, False, None, False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, True, None, False),
+            ("noteNumber", "noteNumber", int, True, None, False),
+            ("revenue", "revenue", codeableconcept.CodeableConcept, False, None, False),
+            ("sequenceLinkId", "sequenceLinkId", int, True, None, False),
+            ("service", "service", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitAddItemDetail(backboneelement.BackboneElement):
+    """ Added items details.
+    
+    The second tier service adjudications for payor added services.
+    """
+    
+    resource_type = "ExplanationOfBenefitAddItemDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjudication = None
+        """ Added items detail adjudication.
+        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Type of service or product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.fee = None
+        """ Professional fee or Product charge.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.modifier = None
+        """ Service/Product billing modifiers.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.noteNumber = None
+        """ List of note numbers which apply.
+        List of `int` items. """
+        
+        self.revenue = None
+        """ Revenue or cost center code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.service = None
+        """ Billing Code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitAddItemDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitAddItemDetail, self).elementProperties()
+        js.extend([
+            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("fee", "fee", money.Money, False, None, False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, True, None, False),
+            ("noteNumber", "noteNumber", int, True, None, False),
+            ("revenue", "revenue", codeableconcept.CodeableConcept, False, None, False),
+            ("service", "service", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitBenefitBalance(backboneelement.BackboneElement):
+    """ Balance by Benefit Category.
+    """
+    
+    resource_type = "ExplanationOfBenefitBenefitBalance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ Type of services covered.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Description of the benefit or services covered.
+        Type `str`. """
+        
+        self.excluded = None
+        """ Excluded from the plan.
+        Type `bool`. """
+        
+        self.financial = None
+        """ Benefit Summary.
+        List of `ExplanationOfBenefitBenefitBalanceFinancial` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Short name for the benefit.
+        Type `str`. """
+        
+        self.network = None
+        """ In or out of network.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.subCategory = None
+        """ Detailed services covered within the type.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.term = None
+        """ Annual or lifetime.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.unit = None
+        """ Individual or family.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitBenefitBalance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitBenefitBalance, self).elementProperties()
+        js.extend([
+            ("category", "category", codeableconcept.CodeableConcept, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("excluded", "excluded", bool, False, None, False),
+            ("financial", "financial", ExplanationOfBenefitBenefitBalanceFinancial, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("network", "network", codeableconcept.CodeableConcept, False, None, False),
+            ("subCategory", "subCategory", codeableconcept.CodeableConcept, False, None, False),
+            ("term", "term", codeableconcept.CodeableConcept, False, None, False),
+            ("unit", "unit", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitBenefitBalanceFinancial(backboneelement.BackboneElement):
+    """ Benefit Summary.
+    
+    Benefits Used to date.
+    """
+    
+    resource_type = "ExplanationOfBenefitBenefitBalanceFinancial"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.allowedMoney = None
+        """ Benefits allowed.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.allowedString = None
+        """ Benefits allowed.
+        Type `str`. """
+        
+        self.allowedUnsignedInt = None
+        """ Benefits allowed.
+        Type `int`. """
+        
+        self.type = None
+        """ Deductable, visits, benefit amount.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.usedMoney = None
+        """ Benefits used.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.usedUnsignedInt = None
+        """ Benefits used.
+        Type `int`. """
+        
+        super(ExplanationOfBenefitBenefitBalanceFinancial, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitBenefitBalanceFinancial, self).elementProperties()
+        js.extend([
+            ("allowedMoney", "allowedMoney", money.Money, False, "allowed", False),
+            ("allowedString", "allowedString", str, False, "allowed", False),
+            ("allowedUnsignedInt", "allowedUnsignedInt", int, False, "allowed", False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+            ("usedMoney", "usedMoney", money.Money, False, "used", False),
+            ("usedUnsignedInt", "usedUnsignedInt", int, False, "used", False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitCareTeam(backboneelement.BackboneElement):
+    """ Care Team members.
+    
+    The members of the team who provided the overall service as well as their
+    role and whether responsible and qualifications.
+    """
+    
+    resource_type = "ExplanationOfBenefitCareTeam"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.provider = None
+        """ Member of the Care Team.
+        Type `FHIRReference` referencing `Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.qualification = None
+        """ Type, classification or Specialization.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.responsible = None
+        """ Billing practitioner.
+        Type `bool`. """
+        
+        self.role = None
+        """ Role on the team.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Number to covey order of careteam.
+        Type `int`. """
+        
+        super(ExplanationOfBenefitCareTeam, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitCareTeam, self).elementProperties()
+        js.extend([
+            ("provider", "provider", fhirreference.FHIRReference, False, None, True),
+            ("qualification", "qualification", codeableconcept.CodeableConcept, False, None, False),
+            ("responsible", "responsible", bool, False, None, False),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+        ])
+        return js
+
+
+class ExplanationOfBenefitDiagnosis(backboneelement.BackboneElement):
+    """ List of Diagnosis.
+    
+    Ordered list of patient diagnosis for which care is sought.
+    """
+    
+    resource_type = "ExplanationOfBenefitDiagnosis"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.diagnosisCodeableConcept = None
+        """ Patient's diagnosis.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.diagnosisReference = None
+        """ Patient's diagnosis.
+        Type `FHIRReference` referencing `Condition` (represented as `dict` in JSON). """
+        
+        self.packageCode = None
+        """ Package billing code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Number to covey order of diagnosis.
+        Type `int`. """
+        
+        self.type = None
+        """ Timing or nature of the diagnosis.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitDiagnosis, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitDiagnosis, self).elementProperties()
+        js.extend([
+            ("diagnosisCodeableConcept", "diagnosisCodeableConcept", codeableconcept.CodeableConcept, False, "diagnosis", True),
+            ("diagnosisReference", "diagnosisReference", fhirreference.FHIRReference, False, "diagnosis", True),
+            ("packageCode", "packageCode", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+            ("type", "type", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitInformation(backboneelement.BackboneElement):
+    """ Exceptions, special considerations, the condition, situation, prior or
+    concurrent issues.
+    
+    Additional information codes regarding exceptions, special considerations,
+    the condition, situation, prior or concurrent issues. Often there are
+    mutiple jurisdiction specific valuesets which are required.
+    """
+    
+    resource_type = "ExplanationOfBenefitInformation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ General class of information.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Type of information.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reason = None
+        """ Reason associated with the information.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Information instance identifier.
+        Type `int`. """
+        
+        self.timingDate = None
+        """ When it occurred.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.timingPeriod = None
+        """ When it occurred.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.valueAttachment = None
+        """ Additional Data or supporting information.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.valueQuantity = None
+        """ Additional Data or supporting information.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueReference = None
+        """ Additional Data or supporting information.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.valueString = None
+        """ Additional Data or supporting information.
+        Type `str`. """
+        
+        super(ExplanationOfBenefitInformation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitInformation, self).elementProperties()
+        js.extend([
+            ("category", "category", codeableconcept.CodeableConcept, False, None, True),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("reason", "reason", coding.Coding, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+            ("timingDate", "timingDate", fhirdate.FHIRDate, False, "timing", False),
+            ("timingPeriod", "timingPeriod", period.Period, False, "timing", False),
+            ("valueAttachment", "valueAttachment", attachment.Attachment, False, "value", False),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", False),
+            ("valueReference", "valueReference", fhirreference.FHIRReference, False, "value", False),
+            ("valueString", "valueString", str, False, "value", False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitInsurance(backboneelement.BackboneElement):
+    """ Insurance or medical plan.
+    
+    Financial instrument by which payment information for health care.
+    """
+    
+    resource_type = "ExplanationOfBenefitInsurance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.coverage = None
+        """ Insurance information.
+        Type `FHIRReference` referencing `Coverage` (represented as `dict` in JSON). """
+        
+        self.preAuthRef = None
+        """ Pre-Authorization/Determination Reference.
+        List of `str` items. """
+        
+        super(ExplanationOfBenefitInsurance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitInsurance, self).elementProperties()
+        js.extend([
+            ("coverage", "coverage", fhirreference.FHIRReference, False, None, False),
+            ("preAuthRef", "preAuthRef", str, True, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitItem(backboneelement.BackboneElement):
+    """ Goods and Services.
+    
+    First tier of goods and services.
+    """
+    
+    resource_type = "ExplanationOfBenefitItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjudication = None
+        """ Adjudication details.
+        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """
+        
+        self.bodySite = None
+        """ Service Location.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.careTeamLinkId = None
+        """ Applicable careteam members.
+        List of `int` items. """
+        
+        self.category = None
+        """ Type of service or product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.detail = None
+        """ Additional items.
+        List of `ExplanationOfBenefitItemDetail` items (represented as `dict` in JSON). """
+        
+        self.diagnosisLinkId = None
+        """ Applicable diagnoses.
+        List of `int` items. """
+        
+        self.encounter = None
+        """ Encounters related to this billed item.
+        List of `FHIRReference` items referencing `Encounter` (represented as `dict` in JSON). """
+        
+        self.factor = None
+        """ Price scaling factor.
+        Type `float`. """
+        
+        self.informationLinkId = None
+        """ Applicable exception and supporting information.
+        List of `int` items. """
+        
+        self.locationAddress = None
+        """ Place of service.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.locationCodeableConcept = None
+        """ Place of service.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.locationReference = None
+        """ Place of service.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.modifier = None
+        """ Service/Product billing modifiers.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.net = None
+        """ Total item cost.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.noteNumber = None
+        """ List of note numbers which apply.
+        List of `int` items. """
+        
+        self.procedureLinkId = None
+        """ Applicable procedures.
+        List of `int` items. """
+        
+        self.programCode = None
+        """ Program specific reason for item inclusion.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Count of Products or Services.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.revenue = None
+        """ Revenue or cost center code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Service instance.
+        Type `int`. """
+        
+        self.service = None
+        """ Billing Code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.servicedDate = None
+        """ Date or dates of Service.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.servicedPeriod = None
+        """ Date or dates of Service.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.subSite = None
+        """ Service Sub-location.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.udi = None
+        """ Unique Device Identifier.
+        List of `FHIRReference` items referencing `Device` (represented as `dict` in JSON). """
+        
+        self.unitPrice = None
+        """ Fee, charge or cost per point.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitItem, self).elementProperties()
+        js.extend([
+            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, True, None, False),
+            ("bodySite", "bodySite", codeableconcept.CodeableConcept, False, None, False),
+            ("careTeamLinkId", "careTeamLinkId", int, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("detail", "detail", ExplanationOfBenefitItemDetail, True, None, False),
+            ("diagnosisLinkId", "diagnosisLinkId", int, True, None, False),
+            ("encounter", "encounter", fhirreference.FHIRReference, True, None, False),
+            ("factor", "factor", float, False, None, False),
+            ("informationLinkId", "informationLinkId", int, True, None, False),
+            ("locationAddress", "locationAddress", address.Address, False, "location", False),
+            ("locationCodeableConcept", "locationCodeableConcept", codeableconcept.CodeableConcept, False, "location", False),
+            ("locationReference", "locationReference", fhirreference.FHIRReference, False, "location", False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, True, None, False),
+            ("net", "net", money.Money, False, None, False),
+            ("noteNumber", "noteNumber", int, True, None, False),
+            ("procedureLinkId", "procedureLinkId", int, True, None, False),
+            ("programCode", "programCode", codeableconcept.CodeableConcept, True, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("revenue", "revenue", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+            ("service", "service", codeableconcept.CodeableConcept, False, None, False),
+            ("servicedDate", "servicedDate", fhirdate.FHIRDate, False, "serviced", False),
+            ("servicedPeriod", "servicedPeriod", period.Period, False, "serviced", False),
+            ("subSite", "subSite", codeableconcept.CodeableConcept, True, None, False),
+            ("udi", "udi", fhirreference.FHIRReference, True, None, False),
+            ("unitPrice", "unitPrice", money.Money, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitItemAdjudication(backboneelement.BackboneElement):
+    """ Adjudication details.
+    
+    The adjudications results.
+    """
+    
+    resource_type = "ExplanationOfBenefitItemAdjudication"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.amount = None
+        """ Monetary amount.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Adjudication category such as co-pay, eligible, benefit, etc..
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reason = None
+        """ Explanation of Adjudication outcome.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.value = None
+        """ Non-monitory value.
+        Type `float`. """
+        
+        super(ExplanationOfBenefitItemAdjudication, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitItemAdjudication, self).elementProperties()
+        js.extend([
+            ("amount", "amount", money.Money, False, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, True),
+            ("reason", "reason", codeableconcept.CodeableConcept, False, None, False),
+            ("value", "value", float, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitItemDetail(backboneelement.BackboneElement):
+    """ Additional items.
+    
+    Second tier of goods and services.
+    """
+    
+    resource_type = "ExplanationOfBenefitItemDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjudication = None
+        """ Detail level adjudication details.
+        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Type of service or product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.factor = None
+        """ Price scaling factor.
+        Type `float`. """
+        
+        self.modifier = None
+        """ Service/Product billing modifiers.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.net = None
+        """ Total additional item cost.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.noteNumber = None
+        """ List of note numbers which apply.
+        List of `int` items. """
+        
+        self.programCode = None
+        """ Program specific reason for item inclusion.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Count of Products or Services.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.revenue = None
+        """ Revenue or cost center code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Service instance.
+        Type `int`. """
+        
+        self.service = None
+        """ Billing Code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.subDetail = None
+        """ Additional items.
+        List of `ExplanationOfBenefitItemDetailSubDetail` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Group or type of product or service.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.udi = None
+        """ Unique Device Identifier.
+        List of `FHIRReference` items referencing `Device` (represented as `dict` in JSON). """
+        
+        self.unitPrice = None
+        """ Fee, charge or cost per point.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitItemDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitItemDetail, self).elementProperties()
+        js.extend([
+            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("factor", "factor", float, False, None, False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, True, None, False),
+            ("net", "net", money.Money, False, None, False),
+            ("noteNumber", "noteNumber", int, True, None, False),
+            ("programCode", "programCode", codeableconcept.CodeableConcept, True, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("revenue", "revenue", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+            ("service", "service", codeableconcept.CodeableConcept, False, None, False),
+            ("subDetail", "subDetail", ExplanationOfBenefitItemDetailSubDetail, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+            ("udi", "udi", fhirreference.FHIRReference, True, None, False),
+            ("unitPrice", "unitPrice", money.Money, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitItemDetailSubDetail(backboneelement.BackboneElement):
+    """ Additional items.
+    
+    Third tier of goods and services.
+    """
+    
+    resource_type = "ExplanationOfBenefitItemDetailSubDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjudication = None
+        """ Language if different from the resource.
+        List of `ExplanationOfBenefitItemAdjudication` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Type of service or product.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.factor = None
+        """ Price scaling factor.
+        Type `float`. """
+        
+        self.modifier = None
+        """ Service/Product billing modifiers.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.net = None
+        """ Net additional item cost.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.noteNumber = None
+        """ List of note numbers which apply.
+        List of `int` items. """
+        
+        self.programCode = None
+        """ Program specific reason for item inclusion.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Count of Products or Services.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.revenue = None
+        """ Revenue or cost center code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Service instance.
+        Type `int`. """
+        
+        self.service = None
+        """ Billing Code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type of product or service.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.udi = None
+        """ Unique Device Identifier.
+        List of `FHIRReference` items referencing `Device` (represented as `dict` in JSON). """
+        
+        self.unitPrice = None
+        """ Fee, charge or cost per point.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitItemDetailSubDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitItemDetailSubDetail, self).elementProperties()
+        js.extend([
+            ("adjudication", "adjudication", ExplanationOfBenefitItemAdjudication, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("factor", "factor", float, False, None, False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, True, None, False),
+            ("net", "net", money.Money, False, None, False),
+            ("noteNumber", "noteNumber", int, True, None, False),
+            ("programCode", "programCode", codeableconcept.CodeableConcept, True, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("revenue", "revenue", codeableconcept.CodeableConcept, False, None, False),
+            ("sequence", "sequence", int, False, None, True),
+            ("service", "service", codeableconcept.CodeableConcept, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+            ("udi", "udi", fhirreference.FHIRReference, True, None, False),
+            ("unitPrice", "unitPrice", money.Money, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitPayee(backboneelement.BackboneElement):
+    """ Party to be paid any benefits payable.
+    
+    The party to be reimbursed for the services.
+    """
+    
+    resource_type = "ExplanationOfBenefitPayee"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.party = None
+        """ Party to receive the payable.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.resourceType = None
+        """ organization | patient | practitioner | relatedperson.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type of party: Subscriber, Provider, other.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitPayee, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitPayee, self).elementProperties()
+        js.extend([
+            ("party", "party", fhirreference.FHIRReference, False, None, False),
+            ("resourceType", "resourceType", codeableconcept.CodeableConcept, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitPayment(backboneelement.BackboneElement):
+    """ Payment (if paid).
+    
+    Payment details for the claim if the claim has been paid.
+    """
+    
+    resource_type = "ExplanationOfBenefitPayment"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.adjustment = None
+        """ Payment adjustment for non-Claim issues.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.adjustmentReason = None
+        """ Explanation for the non-claim adjustment.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.amount = None
+        """ Payable amount after adjustment.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Expected date of Payment.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.identifier = None
+        """ Identifier of the payment instrument.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Partial or Complete.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitPayment, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitPayment, self).elementProperties()
+        js.extend([
+            ("adjustment", "adjustment", money.Money, False, None, False),
+            ("adjustmentReason", "adjustmentReason", codeableconcept.CodeableConcept, False, None, False),
+            ("amount", "amount", money.Money, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitProcedure(backboneelement.BackboneElement):
+    """ Procedures performed.
+    
+    Ordered list of patient procedures performed to support the adjudication.
+    """
+    
+    resource_type = "ExplanationOfBenefitProcedure"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.date = None
+        """ When the procedure was performed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.procedureCodeableConcept = None
+        """ Patient's list of procedures performed.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.procedureReference = None
+        """ Patient's list of procedures performed.
+        Type `FHIRReference` referencing `Procedure` (represented as `dict` in JSON). """
+        
+        self.sequence = None
+        """ Procedure sequence for reference.
+        Type `int`. """
+        
+        super(ExplanationOfBenefitProcedure, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitProcedure, self).elementProperties()
+        js.extend([
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("procedureCodeableConcept", "procedureCodeableConcept", codeableconcept.CodeableConcept, False, "procedure", True),
+            ("procedureReference", "procedureReference", fhirreference.FHIRReference, False, "procedure", True),
+            ("sequence", "sequence", int, False, None, True),
+        ])
+        return js
+
+
+class ExplanationOfBenefitProcessNote(backboneelement.BackboneElement):
+    """ Processing notes.
+    
+    Note text.
+    """
+    
+    resource_type = "ExplanationOfBenefitProcessNote"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.language = None
+        """ Language if different from the resource.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.number = None
+        """ Sequence number for this note.
+        Type `int`. """
+        
+        self.text = None
+        """ Note explanitory text.
+        Type `str`. """
+        
+        self.type = None
+        """ display | print | printoper.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitProcessNote, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitProcessNote, self).elementProperties()
+        js.extend([
+            ("language", "language", codeableconcept.CodeableConcept, False, None, False),
+            ("number", "number", int, False, None, False),
+            ("text", "text", str, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ExplanationOfBenefitRelated(backboneelement.BackboneElement):
+    """ Related Claims which may be revelant to processing this claim.
+    
+    Other claims which are related to this claim such as prior claim versions
+    or for related services.
+    """
+    
+    resource_type = "ExplanationOfBenefitRelated"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.claim = None
+        """ Reference to the related claim.
+        Type `FHIRReference` referencing `Claim` (represented as `dict` in JSON). """
+        
+        self.reference = None
+        """ Related file or case reference.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.relationship = None
+        """ How the reference claim is related.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ExplanationOfBenefitRelated, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ExplanationOfBenefitRelated, self).elementProperties()
+        js.extend([
+            ("claim", "claim", fhirreference.FHIRReference, False, None, False),
+            ("reference", "reference", identifier.Identifier, False, None, False),
+            ("relationship", "relationship", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/explanationofbenefit_tests.py b/fhirclient/models/explanationofbenefit_tests.py
new file mode 100644
index 0000000..18d9431
--- /dev/null
+++ b/fhirclient/models/explanationofbenefit_tests.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import explanationofbenefit
+from .fhirdate import FHIRDate
+
+
+class ExplanationOfBenefitTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ExplanationOfBenefit", js["resourceType"])
+        return explanationofbenefit.ExplanationOfBenefit(js)
+    
+    def testExplanationOfBenefit1(self):
+        inst = self.instantiate_from("explanationofbenefit-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ExplanationOfBenefit instance")
+        self.implExplanationOfBenefit1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ExplanationOfBenefit", js["resourceType"])
+        inst2 = explanationofbenefit.ExplanationOfBenefit(js)
+        self.implExplanationOfBenefit1(inst2)
+    
+    def implExplanationOfBenefit1(self, inst):
+        self.assertEqual(inst.careTeam[0].sequence, 1)
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.disposition, "Claim settled as per contract.")
+        self.assertEqual(inst.id, "EB3500")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/explanationofbenefit")
+        self.assertEqual(inst.identifier[0].value, "987654321")
+        self.assertEqual(inst.item[0].adjudication[0].amount.code, "USD")
+        self.assertEqual(inst.item[0].adjudication[0].amount.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].adjudication[0].amount.value, 120.0)
+        self.assertEqual(inst.item[0].adjudication[0].category.coding[0].code, "eligible")
+        self.assertEqual(inst.item[0].adjudication[1].category.coding[0].code, "eligpercent")
+        self.assertEqual(inst.item[0].adjudication[1].value, 0.8)
+        self.assertEqual(inst.item[0].adjudication[2].amount.code, "USD")
+        self.assertEqual(inst.item[0].adjudication[2].amount.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].adjudication[2].amount.value, 96.0)
+        self.assertEqual(inst.item[0].adjudication[2].category.coding[0].code, "benefit")
+        self.assertEqual(inst.item[0].careTeamLinkId[0], 1)
+        self.assertEqual(inst.item[0].net.code, "USD")
+        self.assertEqual(inst.item[0].net.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].net.value, 135.57)
+        self.assertEqual(inst.item[0].sequence, 1)
+        self.assertEqual(inst.item[0].service.coding[0].code, "1200")
+        self.assertEqual(inst.item[0].service.coding[0].system, "http://hl7.org/fhir/service-uscls")
+        self.assertEqual(inst.item[0].servicedDate.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.item[0].servicedDate.as_json(), "2014-08-16")
+        self.assertEqual(inst.item[0].unitPrice.code, "USD")
+        self.assertEqual(inst.item[0].unitPrice.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.item[0].unitPrice.value, 135.57)
+        self.assertEqual(inst.outcome.coding[0].code, "complete")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/remittance-outcome")
+        self.assertEqual(inst.payee.type.coding[0].code, "provider")
+        self.assertEqual(inst.payee.type.coding[0].system, "http://hl7.org/fhir/payeetype")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the ExplanationOfBenefit</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.totalBenefit.code, "USD")
+        self.assertEqual(inst.totalBenefit.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.totalBenefit.value, 96.0)
+        self.assertEqual(inst.totalCost.code, "USD")
+        self.assertEqual(inst.totalCost.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.totalCost.value, 135.57)
+        self.assertEqual(inst.type.coding[0].code, "oral")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/ex-claimtype")
+
diff --git a/fhirclient/models/extension.py b/fhirclient/models/extension.py
new file mode 100644
index 0000000..5b9bc83
--- /dev/null
+++ b/fhirclient/models/extension.py
@@ -0,0 +1,322 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Extension) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Extension(element.Element):
+    """ Optional Extensions Element.
+    
+    Optional Extension Element - found in all resources.
+    """
+    
+    resource_type = "Extension"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.url = None
+        """ identifies the meaning of the extension.
+        Type `str`. """
+        
+        self.valueAddress = None
+        """ Value of extension.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.valueAge = None
+        """ Value of extension.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.valueAnnotation = None
+        """ Value of extension.
+        Type `Annotation` (represented as `dict` in JSON). """
+        
+        self.valueAttachment = None
+        """ Value of extension.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.valueBase64Binary = None
+        """ Value of extension.
+        Type `str`. """
+        
+        self.valueBoolean = None
+        """ Value of extension.
+        Type `bool`. """
+        
+        self.valueCode = None
+        """ Value of extension.
+        Type `str`. """
+        
+        self.valueCodeableConcept = None
+        """ Value of extension.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueCoding = None
+        """ Value of extension.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.valueContactPoint = None
+        """ Value of extension.
+        Type `ContactPoint` (represented as `dict` in JSON). """
+        
+        self.valueCount = None
+        """ Value of extension.
+        Type `Count` (represented as `dict` in JSON). """
+        
+        self.valueDate = None
+        """ Value of extension.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDateTime = None
+        """ Value of extension.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDecimal = None
+        """ Value of extension.
+        Type `float`. """
+        
+        self.valueDistance = None
+        """ Value of extension.
+        Type `Distance` (represented as `dict` in JSON). """
+        
+        self.valueDuration = None
+        """ Value of extension.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.valueHumanName = None
+        """ Value of extension.
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.valueId = None
+        """ Value of extension.
+        Type `str`. """
+        
+        self.valueIdentifier = None
+        """ Value of extension.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.valueInstant = None
+        """ Value of extension.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueInteger = None
+        """ Value of extension.
+        Type `int`. """
+        
+        self.valueMarkdown = None
+        """ Value of extension.
+        Type `str`. """
+        
+        self.valueMeta = None
+        """ Value of extension.
+        Type `Meta` (represented as `dict` in JSON). """
+        
+        self.valueMoney = None
+        """ Value of extension.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.valueOid = None
+        """ Value of extension.
+        Type `str`. """
+        
+        self.valuePeriod = None
+        """ Value of extension.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.valuePositiveInt = None
+        """ Value of extension.
+        Type `int`. """
+        
+        self.valueQuantity = None
+        """ Value of extension.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueRange = None
+        """ Value of extension.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.valueRatio = None
+        """ Value of extension.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.valueReference = None
+        """ Value of extension.
+        Type `FHIRReference` (represented as `dict` in JSON). """
+        
+        self.valueSampledData = None
+        """ Value of extension.
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.valueSignature = None
+        """ Value of extension.
+        Type `Signature` (represented as `dict` in JSON). """
+        
+        self.valueString = None
+        """ Value of extension.
+        Type `str`. """
+        
+        self.valueTime = None
+        """ Value of extension.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueTiming = None
+        """ Value of extension.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.valueUnsignedInt = None
+        """ Value of extension.
+        Type `int`. """
+        
+        self.valueUri = None
+        """ Value of extension.
+        Type `str`. """
+        
+        super(Extension, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Extension, self).elementProperties()
+        js.extend([
+            ("url", "url", str, False, None, True),
+            ("valueAddress", "valueAddress", address.Address, False, "value", False),
+            ("valueAge", "valueAge", age.Age, False, "value", False),
+            ("valueAnnotation", "valueAnnotation", annotation.Annotation, False, "value", False),
+            ("valueAttachment", "valueAttachment", attachment.Attachment, False, "value", False),
+            ("valueBase64Binary", "valueBase64Binary", str, False, "value", False),
+            ("valueBoolean", "valueBoolean", bool, False, "value", False),
+            ("valueCode", "valueCode", str, False, "value", False),
+            ("valueCodeableConcept", "valueCodeableConcept", codeableconcept.CodeableConcept, False, "value", False),
+            ("valueCoding", "valueCoding", coding.Coding, False, "value", False),
+            ("valueContactPoint", "valueContactPoint", contactpoint.ContactPoint, False, "value", False),
+            ("valueCount", "valueCount", count.Count, False, "value", False),
+            ("valueDate", "valueDate", fhirdate.FHIRDate, False, "value", False),
+            ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", False),
+            ("valueDecimal", "valueDecimal", float, False, "value", False),
+            ("valueDistance", "valueDistance", distance.Distance, False, "value", False),
+            ("valueDuration", "valueDuration", duration.Duration, False, "value", False),
+            ("valueHumanName", "valueHumanName", humanname.HumanName, False, "value", False),
+            ("valueId", "valueId", str, False, "value", False),
+            ("valueIdentifier", "valueIdentifier", identifier.Identifier, False, "value", False),
+            ("valueInstant", "valueInstant", fhirdate.FHIRDate, False, "value", False),
+            ("valueInteger", "valueInteger", int, False, "value", False),
+            ("valueMarkdown", "valueMarkdown", str, False, "value", False),
+            ("valueMeta", "valueMeta", meta.Meta, False, "value", False),
+            ("valueMoney", "valueMoney", money.Money, False, "value", False),
+            ("valueOid", "valueOid", str, False, "value", False),
+            ("valuePeriod", "valuePeriod", period.Period, False, "value", False),
+            ("valuePositiveInt", "valuePositiveInt", int, False, "value", False),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", False),
+            ("valueRange", "valueRange", range.Range, False, "value", False),
+            ("valueRatio", "valueRatio", ratio.Ratio, False, "value", False),
+            ("valueReference", "valueReference", fhirreference.FHIRReference, False, "value", False),
+            ("valueSampledData", "valueSampledData", sampleddata.SampledData, False, "value", False),
+            ("valueSignature", "valueSignature", signature.Signature, False, "value", False),
+            ("valueString", "valueString", str, False, "value", False),
+            ("valueTime", "valueTime", fhirdate.FHIRDate, False, "value", False),
+            ("valueTiming", "valueTiming", timing.Timing, False, "value", False),
+            ("valueUnsignedInt", "valueUnsignedInt", int, False, "value", False),
+            ("valueUri", "valueUri", str, False, "value", False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import age
+except ImportError:
+    age = sys.modules[__package__ + '.age']
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import count
+except ImportError:
+    count = sys.modules[__package__ + '.count']
+try:
+    from . import distance
+except ImportError:
+    distance = sys.modules[__package__ + '.distance']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import humanname
+except ImportError:
+    humanname = sys.modules[__package__ + '.humanname']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import meta
+except ImportError:
+    meta = sys.modules[__package__ + '.meta']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
+try:
+    from . import sampleddata
+except ImportError:
+    sampleddata = sys.modules[__package__ + '.sampleddata']
+try:
+    from . import signature
+except ImportError:
+    signature = sys.modules[__package__ + '.signature']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/familymemberhistory.py b/fhirclient/models/familymemberhistory.py
new file mode 100644
index 0000000..1913d89
--- /dev/null
+++ b/fhirclient/models/familymemberhistory.py
@@ -0,0 +1,263 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class FamilyMemberHistory(domainresource.DomainResource):
+    """ Information about patient's relatives, relevant for patient.
+    
+    Significant health events and conditions for a person related to the
+    patient relevant in the context of care for the patient.
+    """
+    
+    resource_type = "FamilyMemberHistory"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.ageAge = None
+        """ (approximate) age.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.ageRange = None
+        """ (approximate) age.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.ageString = None
+        """ (approximate) age.
+        Type `str`. """
+        
+        self.bornDate = None
+        """ (approximate) date of birth.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.bornPeriod = None
+        """ (approximate) date of birth.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.bornString = None
+        """ (approximate) date of birth.
+        Type `str`. """
+        
+        self.condition = None
+        """ Condition that the related person had.
+        List of `FamilyMemberHistoryCondition` items (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ When history was captured/updated.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.deceasedAge = None
+        """ Dead? How old/when?.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.deceasedBoolean = None
+        """ Dead? How old/when?.
+        Type `bool`. """
+        
+        self.deceasedDate = None
+        """ Dead? How old/when?.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.deceasedRange = None
+        """ Dead? How old/when?.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.deceasedString = None
+        """ Dead? How old/when?.
+        Type `str`. """
+        
+        self.definition = None
+        """ Instantiates protocol or definition.
+        List of `FHIRReference` items referencing `PlanDefinition, Questionnaire` (represented as `dict` in JSON). """
+        
+        self.estimatedAge = None
+        """ Age is estimated?.
+        Type `bool`. """
+        
+        self.gender = None
+        """ male | female | other | unknown.
+        Type `str`. """
+        
+        self.identifier = None
+        """ External Id(s) for this record.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ The family member described.
+        Type `str`. """
+        
+        self.notDone = None
+        """ The taking of a family member's history did not occur.
+        Type `bool`. """
+        
+        self.notDoneReason = None
+        """ subject-unknown | withheld | unable-to-obtain | deferred.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ General note about related person.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ Patient history is about.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.reasonCode = None
+        """ Why was family member history performed?.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Why was family member history performed?.
+        List of `FHIRReference` items referencing `Condition, Observation, AllergyIntolerance, QuestionnaireResponse` (represented as `dict` in JSON). """
+        
+        self.relationship = None
+        """ Relationship to the subject.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ partial | completed | entered-in-error | health-unknown.
+        Type `str`. """
+        
+        super(FamilyMemberHistory, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(FamilyMemberHistory, self).elementProperties()
+        js.extend([
+            ("ageAge", "ageAge", age.Age, False, "age", False),
+            ("ageRange", "ageRange", range.Range, False, "age", False),
+            ("ageString", "ageString", str, False, "age", False),
+            ("bornDate", "bornDate", fhirdate.FHIRDate, False, "born", False),
+            ("bornPeriod", "bornPeriod", period.Period, False, "born", False),
+            ("bornString", "bornString", str, False, "born", False),
+            ("condition", "condition", FamilyMemberHistoryCondition, True, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("deceasedAge", "deceasedAge", age.Age, False, "deceased", False),
+            ("deceasedBoolean", "deceasedBoolean", bool, False, "deceased", False),
+            ("deceasedDate", "deceasedDate", fhirdate.FHIRDate, False, "deceased", False),
+            ("deceasedRange", "deceasedRange", range.Range, False, "deceased", False),
+            ("deceasedString", "deceasedString", str, False, "deceased", False),
+            ("definition", "definition", fhirreference.FHIRReference, True, None, False),
+            ("estimatedAge", "estimatedAge", bool, False, None, False),
+            ("gender", "gender", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("notDone", "notDone", bool, False, None, False),
+            ("notDoneReason", "notDoneReason", codeableconcept.CodeableConcept, False, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("relationship", "relationship", codeableconcept.CodeableConcept, False, None, True),
+            ("status", "status", str, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class FamilyMemberHistoryCondition(backboneelement.BackboneElement):
+    """ Condition that the related person had.
+    
+    The significant Conditions (or condition) that the family member had. This
+    is a repeating section to allow a system to represent more than one
+    condition per resource, though there is nothing stopping multiple resources
+    - one per condition.
+    """
+    
+    resource_type = "FamilyMemberHistoryCondition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Condition suffered by relation.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Extra information about condition.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.onsetAge = None
+        """ When condition first manifested.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.onsetPeriod = None
+        """ When condition first manifested.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.onsetRange = None
+        """ When condition first manifested.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.onsetString = None
+        """ When condition first manifested.
+        Type `str`. """
+        
+        self.outcome = None
+        """ deceased | permanent disability | etc..
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(FamilyMemberHistoryCondition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(FamilyMemberHistoryCondition, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("onsetAge", "onsetAge", age.Age, False, "onset", False),
+            ("onsetPeriod", "onsetPeriod", period.Period, False, "onset", False),
+            ("onsetRange", "onsetRange", range.Range, False, "onset", False),
+            ("onsetString", "onsetString", str, False, "onset", False),
+            ("outcome", "outcome", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import age
+except ImportError:
+    age = sys.modules[__package__ + '.age']
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
diff --git a/fhirclient/models/familymemberhistory_tests.py b/fhirclient/models/familymemberhistory_tests.py
new file mode 100644
index 0000000..fd3521c
--- /dev/null
+++ b/fhirclient/models/familymemberhistory_tests.py
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import familymemberhistory
+from .fhirdate import FHIRDate
+
+
+class FamilyMemberHistoryTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("FamilyMemberHistory", js["resourceType"])
+        return familymemberhistory.FamilyMemberHistory(js)
+    
+    def testFamilyMemberHistory1(self):
+        inst = self.instantiate_from("familymemberhistory-example-mother.json")
+        self.assertIsNotNone(inst, "Must have instantiated a FamilyMemberHistory instance")
+        self.implFamilyMemberHistory1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("FamilyMemberHistory", js["resourceType"])
+        inst2 = familymemberhistory.FamilyMemberHistory(js)
+        self.implFamilyMemberHistory1(inst2)
+    
+    def implFamilyMemberHistory1(self, inst):
+        self.assertEqual(inst.condition[0].code.coding[0].code, "371041009")
+        self.assertEqual(inst.condition[0].code.coding[0].display, "Embolic Stroke")
+        self.assertEqual(inst.condition[0].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.condition[0].code.text, "Stroke")
+        self.assertEqual(inst.condition[0].onsetAge.code, "a")
+        self.assertEqual(inst.condition[0].onsetAge.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.condition[0].onsetAge.unit, "yr")
+        self.assertEqual(inst.condition[0].onsetAge.value, 56)
+        self.assertEqual(inst.id, "mother")
+        self.assertEqual(inst.relationship.coding[0].code, "MTH")
+        self.assertEqual(inst.relationship.coding[0].display, "mother")
+        self.assertEqual(inst.relationship.coding[0].system, "http://hl7.org/fhir/v3/RoleCode")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Mother died of a stroke aged 56</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testFamilyMemberHistory2(self):
+        inst = self.instantiate_from("familymemberhistory-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a FamilyMemberHistory instance")
+        self.implFamilyMemberHistory2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("FamilyMemberHistory", js["resourceType"])
+        inst2 = familymemberhistory.FamilyMemberHistory(js)
+        self.implFamilyMemberHistory2(inst2)
+    
+    def implFamilyMemberHistory2(self, inst):
+        self.assertEqual(inst.condition[0].code.coding[0].code, "315619001")
+        self.assertEqual(inst.condition[0].code.coding[0].display, "Myocardial Infarction")
+        self.assertEqual(inst.condition[0].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.condition[0].code.text, "Heart Attack")
+        self.assertEqual(inst.condition[0].note[0].text, "Was fishing at the time. At least he went doing someting he loved.")
+        self.assertEqual(inst.condition[0].onsetAge.code, "a")
+        self.assertEqual(inst.condition[0].onsetAge.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.condition[0].onsetAge.unit, "yr")
+        self.assertEqual(inst.condition[0].onsetAge.value, 74)
+        self.assertEqual(inst.date.date, FHIRDate("2011-03-18").date)
+        self.assertEqual(inst.date.as_json(), "2011-03-18")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "father")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertFalse(inst.notDone)
+        self.assertEqual(inst.relationship.coding[0].code, "FTH")
+        self.assertEqual(inst.relationship.coding[0].display, "father")
+        self.assertEqual(inst.relationship.coding[0].system, "http://hl7.org/fhir/v3/RoleCode")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Father died of a heart attack aged 74</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/fhirabstractbase.py b/fhirclient/models/fhirabstractbase.py
new file mode 100644
index 0000000..27ce44f
--- /dev/null
+++ b/fhirclient/models/fhirabstractbase.py
@@ -0,0 +1,357 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Base class for all FHIR elements.
+
+import sys
+import logging
+
+logger = logging.getLogger(__name__)
+
+
+class FHIRValidationError(Exception):
+    """ Exception raised when one or more errors occurred during model
+    validation.
+    """
+    
+    def __init__(self, errors, path=None):
+        """ Initializer.
+        
+        :param errors: List of Exception instances. Also accepts a string,
+            which is converted to a TypeError.
+        :param str path: The property path on the object where errors occurred
+        """
+        if not isinstance(errors, list):
+            errors = [TypeError(errors)]
+        msgs = "\n  ".join([str(e).replace("\n", "\n  ") for e in errors])
+        message = "{}:\n  {}".format(path or "{root}", msgs)
+        
+        super(FHIRValidationError, self).__init__(message)
+        
+        self.errors = errors
+        """ A list of validation errors encountered. Typically contains
+        TypeError, KeyError, possibly AttributeError and others. """
+        
+        self.path = path
+        """ The path on the object where the errors occurred. """
+    
+    def prefixed(self, path_prefix):
+        """ Creates a new instance of the receiver, with the given path prefix
+        applied. """
+        path = '{}.{}'.format(path_prefix, self.path) if self.path is not None else path_prefix
+        return self.__class__(self.errors, path)
+
+
+class FHIRAbstractBase(object):
+    """ Abstract base class for all FHIR elements.
+    """
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initializer. If strict is true, raises on errors, otherwise uses
+        `logger.warning()`.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self._resolved = None
+        """ Dictionary of resolved resources. """
+        
+        self._owner = None
+        """ Points to the parent resource, if there is one. """
+        
+        if jsondict is not None:
+            if strict:
+                self.update_with_json(jsondict)
+            else:
+                try:
+                    self.update_with_json(jsondict)
+                except FHIRValidationError as e:
+                    for err in e.errors:
+                        logger.warning(err)
+    
+    
+    # MARK: Instantiation from JSON
+    
+    @classmethod
+    def with_json(cls, jsonobj):
+        """ Initialize an element from a JSON dictionary or array.
+        
+        If the JSON dictionary has a "resourceType" entry and the specified
+        resource type is not the receiving classes type, uses
+        `FHIRElementFactory` to return a correct class instance.
+        
+        :raises: TypeError on anything but dict or list of dicts
+        :raises: FHIRValidationError if instantiation fails
+        :param jsonobj: A dict or list of dicts to instantiate from
+        :returns: An instance or a list of instances created from JSON data
+        """
+        if isinstance(jsonobj, dict):
+            return cls._with_json_dict(jsonobj)
+        
+        if isinstance(jsonobj, list):
+            arr = []
+            for jsondict in jsonobj:
+                try:
+                    arr.append(cls._with_json_dict(jsondict))
+                except FHIRValidationError as e:
+                    raise e.prefixed(str(len(arr)))
+            return arr
+        
+        raise TypeError("`with_json()` on {} only takes dict or list of dict, but you provided {}"
+            .format(cls, type(jsonobj)))
+    
+    @classmethod
+    def _with_json_dict(cls, jsondict):
+        """ Internal method to instantiate from JSON dictionary.
+        
+        :raises: TypeError on anything but dict
+        :raises: FHIRValidationError if instantiation fails
+        :returns: An instance created from dictionary data
+        """
+        if not isinstance(jsondict, dict):
+            raise TypeError("Can only use `_with_json_dict()` on {} with a dictionary, got {}"
+                .format(type(self), type(jsondict)))
+        return cls(jsondict)
+    
+    @classmethod
+    def with_json_and_owner(cls, jsonobj, owner):
+        """ Instantiates by forwarding to `with_json()`, then remembers the
+        "owner" of the instantiated elements. The "owner" is the resource
+        containing the receiver and is used to resolve contained resources.
+        
+        :raises: TypeError on anything but dict or list of dicts
+        :raises: FHIRValidationError if instantiation fails
+        :param dict jsonobj: Decoded JSON dictionary (or list thereof)
+        :param FHIRElement owner: The owning parent
+        :returns: An instance or a list of instances created from JSON data
+        """
+        instance = cls.with_json(jsonobj)
+        if isinstance(instance, list):
+            for inst in instance:
+                inst._owner = owner
+        else:
+            instance._owner = owner
+        
+        return instance
+    
+    
+    # MARK: (De)Serialization
+    
+    def elementProperties(self):
+        """ Returns a list of tuples, one tuple for each property that should
+        be serialized, as: ("name", "json_name", type, is_list, "of_many", not_optional)
+        """
+        return []
+    
+    def update_with_json(self, jsondict):
+        """ Update the receiver with data in a JSON dictionary.
+        
+        :raises: FHIRValidationError on validation errors
+        :param dict jsondict: The JSON dictionary to use to update the receiver
+        :returns: None on success, a list of errors if there were errors
+        """
+        if jsondict is None:
+            return
+        
+        if not isinstance(jsondict, dict):
+            raise FHIRValidationError("Non-dict type {} fed to `update_with_json` on {}"
+                .format(type(jsondict), type(self)))
+        
+        # loop all registered properties and instantiate
+        errs = []
+        valid = set(['resourceType'])   # used to also contain `fhir_comments` until STU-3
+        found = set()
+        nonoptionals = set()
+        for name, jsname, typ, is_list, of_many, not_optional in self.elementProperties():
+            valid.add(jsname)
+            if of_many is not None:
+                valid.add(of_many)
+            
+            # bring the value in shape
+            err = None
+            value = jsondict.get(jsname)
+            if value is not None and hasattr(typ, 'with_json_and_owner'):
+                try:
+                    value = typ.with_json_and_owner(value, self)
+                except Exception as e:
+                    value = None
+                    err = e
+            
+            # got a value, test if it is of required type and assign
+            if value is not None:
+                testval = value
+                if is_list:
+                    if not isinstance(value, list):
+                        err = TypeError("Wrong type {} for list property \"{}\" on {}, expecting a list of {}"
+                            .format(type(value), name, type(self), typ))
+                        testval = None
+                    else:
+                        testval = value[0] if value and len(value) > 0 else None
+                
+                if testval is not None and not self._matches_type(testval, typ):
+                    err = TypeError("Wrong type {} for property \"{}\" on {}, expecting {}"
+                        .format(type(testval), name, type(self), typ))
+                else:
+                    setattr(self, name, value)
+                
+                found.add(jsname)
+                if of_many is not None:
+                    found.add(of_many)
+            
+            # not optional and missing, report (we clean `of_many` later on)
+            elif not_optional:
+                nonoptionals.add(of_many or jsname)
+            
+            # TODO: look at `_name` only if this is a primitive!
+            _jsname = '_'+jsname
+            _value = jsondict.get(_jsname)
+            if _value is not None:
+                valid.add(_jsname)
+                found.add(_jsname)
+            
+            # report errors
+            if err is not None:
+                errs.append(err.prefixed(name) if isinstance(err, FHIRValidationError) else FHIRValidationError([err], name))
+        
+        # were there missing non-optional entries?
+        if len(nonoptionals) > 0:
+            for miss in nonoptionals - found:
+                errs.append(KeyError("Non-optional property \"{}\" on {} is missing"
+                    .format(miss, self)))
+        
+        # were there superfluous dictionary keys?
+        if len(set(jsondict.keys()) - valid) > 0:
+            for supflu in set(jsondict.keys()) - valid:
+                errs.append(AttributeError("Superfluous entry \"{}\" in data for {}"
+                    .format(supflu, self)))
+        
+        if len(errs) > 0:
+            raise FHIRValidationError(errs)
+    
+    def as_json(self):
+        """ Serializes to JSON by inspecting `elementProperties()` and creating
+        a JSON dictionary of all registered properties. Checks:
+        
+        - whether required properties are not None (and lists not empty)
+        - whether not-None properties are of the correct type
+        
+        :raises: FHIRValidationError if properties have the wrong type or if
+            required properties are empty
+        :returns: A validated dict object that can be JSON serialized
+        """
+        js = {}
+        errs = []
+        
+        # JSONify all registered properties
+        found = set()
+        nonoptionals = set()
+        for name, jsname, typ, is_list, of_many, not_optional in self.elementProperties():
+            if not_optional:
+                nonoptionals.add(of_many or jsname)
+            
+            err = None
+            value = getattr(self, name)
+            if value is None:
+                continue
+            
+            if is_list:
+                if not isinstance(value, list):
+                   err = TypeError("Expecting property \"{}\" on {} to be list, but is {}"
+                       .format(name, type(self), type(value)))
+                elif len(value) > 0:
+                    if not self._matches_type(value[0], typ):
+                        err = TypeError("Expecting property \"{}\" on {} to be {}, but is {}"
+                            .format(name, type(self), typ, type(value[0])))
+                    else:
+                        lst = []
+                        for v in value:
+                            try:
+                                lst.append(v.as_json() if hasattr(v, 'as_json') else v)
+                            except FHIRValidationError as e:
+                                err = e.prefixed(str(len(lst))).prefixed(name)
+                        found.add(of_many or jsname)
+                        js[jsname] = lst
+            else:
+                if not self._matches_type(value, typ):
+                    err = TypeError("Expecting property \"{}\" on {} to be {}, but is {}"
+                        .format(name, type(self), typ, type(value)))
+                else:
+                    try:
+                        found.add(of_many or jsname)
+                        js[jsname] = value.as_json() if hasattr(value, 'as_json') else value
+                    except FHIRValidationError as e:
+                        err = e.prefixed(name)
+            
+            if err is not None:
+                errs.append(err if isinstance(err, FHIRValidationError) else FHIRValidationError([err], name))
+        
+        # any missing non-optionals?
+        if len(nonoptionals - found) > 0:
+            for nonop in nonoptionals - found:
+                errs.append(KeyError("Property \"{}\" on {} is not optional, you must provide a value for it"
+                    .format(nonop, self)))
+        
+        if len(errs) > 0:
+            raise FHIRValidationError(errs)
+        return js
+    
+    def _matches_type(self, value, typ):
+        if value is None:
+            return True
+        if isinstance(value, typ):
+            return True
+        if int == typ or float == typ:
+            return (isinstance(value, int) or isinstance(value, float))
+        if (sys.version_info < (3, 0)) and (str == typ or unicode == typ):
+            return (isinstance(value, str) or isinstance(value, unicode))
+        return False
+    
+    
+    # MARK: Handling References
+    
+    def owningResource(self):
+        """ Walks the owner hierarchy and returns the next parent that is a
+        `DomainResource` instance.
+        """
+        owner = self._owner
+        while owner is not None and not hasattr(owner, "contained"):
+            owner = owner._owner
+        return owner
+    
+    def owningBundle(self):
+        """ Walks the owner hierarchy and returns the next parent that is a
+        `Bundle` instance.
+        """
+        owner = self._owner
+        while owner is not None and not 'Bundle' == owner.resource_type:
+            owner = owner._owner
+        return owner
+    
+    def resolvedReference(self, refid):
+        """ Returns the resolved reference with the given id, if it has been
+        resolved already. If it hasn't, forwards the call to its owner if it
+        has one.
+        
+        You should probably use `resolve()` on the `FHIRReference` itself.
+        
+        :param refid: The id of the resource to resolve
+        :returns: An instance of `Resource`, if it was found
+        """
+        if self._resolved and refid in self._resolved:
+            return self._resolved[refid]
+        return self._owner.resolvedReference(refid) if self._owner is not None else None
+    
+    def didResolveReference(self, refid, resolved):
+        """ Called by `FHIRResource` when it resolves a reference. Stores the
+        resolved reference into the `_resolved` dictionary.
+        
+        :param refid: The id of the resource that was resolved
+        :param refid: The resolved resource, ready to be cached
+        """
+        if self._resolved is not None:
+            self._resolved[refid] = resolved
+        else:
+            self._resolved = {refid: resolved}
+
diff --git a/fhirclient/models/fhirabstractresource.py b/fhirclient/models/fhirabstractresource.py
new file mode 100644
index 0000000..e6fc1a6
--- /dev/null
+++ b/fhirclient/models/fhirabstractresource.py
@@ -0,0 +1,197 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Base class for FHIR resources.
+#  2014, SMART Health IT.
+
+from . import fhirabstractbase
+
+
+class FHIRAbstractResource(fhirabstractbase.FHIRAbstractBase):
+    """ Extends the FHIRAbstractBase with server talking capabilities.
+    """
+    resource_type = 'FHIRAbstractResource'
+    
+    def __init__(self, jsondict=None, strict=True):
+        self._server = None
+        """ The server the instance was read from. """
+        
+        # raise if "resourceType" does not match
+        if jsondict is not None and 'resourceType' in jsondict \
+            and jsondict['resourceType'] != self.resource_type:
+            raise Exception("Attempting to instantiate {} with resource data that defines a resourceType of \"{}\""
+                .format(self.__class__, jsondict['resourceType']))
+        
+        super(FHIRAbstractResource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    @classmethod
+    def _with_json_dict(cls, jsondict):
+        """ Overridden to use a factory if called when "resourceType" is
+        defined in the JSON but does not match the receiver's resource_type.
+        """
+        if not isinstance(jsondict, dict):
+            raise Exception("Cannot use this method with anything but a JSON dictionary, got {}"
+                .format(jsondict))
+        
+        res_type = jsondict.get('resourceType')
+        if res_type and res_type != cls.resource_type:
+            return fhirelementfactory.FHIRElementFactory.instantiate(res_type, jsondict)
+        return super(FHIRAbstractResource, cls)._with_json_dict(jsondict)
+    
+    def as_json(self):
+        js = super(FHIRAbstractResource, self).as_json()
+        js['resourceType'] = self.resource_type
+        return js
+    
+    
+    # MARK: Handling Paths
+    
+    def relativeBase(self):
+        return self.__class__.resource_type
+    
+    def relativePath(self):
+        if self.id is None:
+            return self.relativeBase()
+        return "{}/{}".format(self.relativeBase(), self.id)
+    
+    
+    # MARK: - Server Connection
+    
+    @property
+    def server(self):
+        """ Walks the owner hierarchy until it finds an owner with a server.
+        """
+        if self._server is None:
+            owningRes = self.owningResource()
+            self._server = owningRes.server if owningRes is not None else None
+        return self._server
+    
+    @classmethod
+    def read(cls, rem_id, server):
+        """ Read the resource with the given id from the given server. The
+        passed-in server instance must support a `request_json()` method call,
+        taking a relative path as first (and only mandatory) argument.
+        
+        :param str rem_id: The id of the resource on the remote server
+        :param FHIRServer server: An instance of a FHIR server or compatible class
+        :returns: An instance of the receiving class
+        """
+        if not rem_id:
+            raise Exception("Cannot read resource without remote id")
+        
+        path = '{}/{}'.format(cls.resource_type, rem_id)
+        instance = cls.read_from(path, server)
+        instance._local_id = rem_id
+        
+        return instance
+    
+    @classmethod
+    def read_from(cls, path, server):
+        """ Requests data from the given REST path on the server and creates
+        an instance of the receiving class.
+        
+        :param str path: The REST path to read from
+        :param FHIRServer server: An instance of a FHIR server or compatible class
+        :returns: An instance of the receiving class
+        """
+        if not path:
+            raise Exception("Cannot read resource without REST path")
+        if server is None:
+            raise Exception("Cannot read resource without server instance")
+        
+        ret = server.request_json(path)
+        instance = cls(jsondict=ret)
+        instance._server = server
+        return instance
+    
+    def create(self, server):
+        """ Attempt to create the receiver on the given server, using a POST
+        command.
+        
+        :param FHIRServer server: The server to create the receiver on
+        :returns: None or the response JSON on success
+        """
+        srv = server or self.server
+        if srv is None:
+            raise Exception("Cannot create a resource without a server")
+        if self.id:
+            raise Exception("This resource already has an id, cannot create")
+        
+        ret = srv.post_json(self.relativeBase(), self.as_json())
+        if len(ret.text) > 0:
+            return ret.json()
+        return None
+    
+    def update(self, server=None):
+        """ Update the receiver's representation on the given server, issuing
+        a PUT command.
+        
+        :param FHIRServer server: The server to update the receiver on;
+            optional, will use the instance's `server` if needed.
+        :returns: None or the response JSON on success
+        """
+        srv = server or self.server
+        if srv is None:
+            raise Exception("Cannot update a resource that does not have a server")
+        if not self.id:
+            raise Exception("Cannot update a resource that does not have an id")
+        
+        ret = srv.put_json(self.relativePath(), self.as_json())
+        if len(ret.text) > 0:
+            return ret.json()
+        return None
+    
+    def delete(self, server=None):
+        """ Delete the receiver from the given server with a DELETE command.
+        
+        :param FHIRServer server: The server to update the receiver on;
+            optional, will use the instance's `server` if needed.
+        :returns: None or the response JSON on success
+        """
+        srv = server or self.server
+        if srv is None:
+            raise Exception("Cannot delete a resource that does not have a server")
+        if not self.id:
+            raise Exception("Cannot delete a resource that does not have an id")
+        
+        ret = srv.delete_json(self.relativePath())
+        if len(ret.text) > 0:
+            return ret.json()
+        return None
+    
+    
+    # MARK: - Search
+    
+    def search(self, struct=None):
+        """ Search can be started via a dictionary containing a search
+        construct.
+        
+        Calling this method with a search struct will return a `FHIRSearch`
+        object representing the search struct, with "$type" and "id" added.
+        
+        :param dict struct: An optional search structure
+        :returns: A FHIRSearch instance
+        """
+        if struct is None:
+            struct = {'$type': self.__class__.resource_type}
+        if self._local_id is not None or self.id is not None:
+            struct['id'] = self._local_id or self.id
+        return self.__class__.where(struct)
+    
+    @classmethod
+    def where(cls, struct):
+        """ Search can be started via a dictionary containing a search
+        construct.
+        
+        Calling this method with a search struct will return a `FHIRSearch`
+        object representing the search struct
+        
+        :param dict struct: A search structure
+        :returns: A FHIRSearch instance
+        """
+        return fhirsearch.FHIRSearch(cls, struct)
+
+
+from . import fhirdate
+from . import fhirsearch
+from . import fhirelementfactory
diff --git a/fhirclient/models/fhirdate.py b/fhirclient/models/fhirdate.py
new file mode 100644
index 0000000..1ac29e8
--- /dev/null
+++ b/fhirclient/models/fhirdate.py
@@ -0,0 +1,81 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Facilitate working with dates.
+#  2014, SMART Health IT.
+
+import sys
+import logging
+import isodate
+import datetime
+
+logger = logging.getLogger(__name__)
+
+
+class FHIRDate(object):
+    """ Facilitate working with dates.
+    
+    - `date`: datetime object representing the receiver's date-time
+    """
+    
+    def __init__(self, jsonval=None):
+        self.date = None
+        if jsonval is not None:
+            isstr = isinstance(jsonval, str)
+            if not isstr and sys.version_info[0] < 3:       # Python 2.x has 'str' and 'unicode'
+                isstr = isinstance(jsonval, basestring)
+            if not isstr:
+                raise TypeError("Expecting string when initializing {}, but got {}"
+                    .format(type(self), type(jsonval)))
+            try:
+                if 'T' in jsonval:
+                    self.date = isodate.parse_datetime(jsonval)
+                else:
+                    self.date = isodate.parse_date(jsonval)
+            except Exception as e:
+                logger.warning("Failed to initialize FHIRDate from \"{}\": {}"
+                    .format(jsonval, e))
+        
+        self.origval = jsonval
+    
+    def __setattr__(self, prop, value):
+        if 'date' == prop:
+            self.origval = None
+        object.__setattr__(self, prop, value)
+    
+    @property
+    def isostring(self):
+        if self.date is None:
+            return None
+        if isinstance(self.date, datetime.datetime):
+            return isodate.datetime_isoformat(self.date)
+        return isodate.date_isoformat(self.date)
+    
+    @classmethod
+    def with_json(cls, jsonobj):
+        """ Initialize a date from an ISO date string.
+        """
+        isstr = isinstance(jsonobj, str)
+        if not isstr and sys.version_info[0] < 3:       # Python 2.x has 'str' and 'unicode'
+            isstr = isinstance(jsonobj, basestring)
+        if isstr:
+            return cls(jsonobj)
+        
+        if isinstance(jsonobj, list):
+            return [cls(jsonval) for jsonval in jsonobj]
+        
+        raise TypeError("`cls.with_json()` only takes string or list of strings, but you provided {}"
+            .format(type(jsonobj)))
+    
+    @classmethod
+    def with_json_and_owner(cls, jsonobj, owner):
+        """ Added for compatibility reasons to FHIRElement; "owner" is
+        discarded.
+        """
+        return cls.with_json(jsonobj)
+    
+    def as_json(self):
+        if self.origval is not None:
+            return self.origval
+        return self.isostring
+    
diff --git a/fhirclient/models/fhirelementfactory.py b/fhirclient/models/fhirelementfactory.py
new file mode 100644
index 0000000..0fa2355
--- /dev/null
+++ b/fhirclient/models/fhirelementfactory.py
@@ -0,0 +1,1491 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+class FHIRElementFactory(object):
+    """ Factory class to instantiate resources by resource name.
+    """
+    
+    @classmethod
+    def instantiate(cls, resource_type, jsondict):
+        """ Instantiate a resource of the type correlating to "resource_type".
+        
+        :param str resource_type: The name/type of the resource to instantiate
+        :param dict jsondict: The JSON dictionary to use for data
+        :returns: A resource of the respective type or `Element`
+        """
+        if "Account" == resource_type:
+            from . import account
+            return account.Account(jsondict)
+        if "AccountCoverage" == resource_type:
+            from . import account
+            return account.AccountCoverage(jsondict)
+        if "AccountGuarantor" == resource_type:
+            from . import account
+            return account.AccountGuarantor(jsondict)
+        if "ActivityDefinition" == resource_type:
+            from . import activitydefinition
+            return activitydefinition.ActivityDefinition(jsondict)
+        if "ActivityDefinitionDynamicValue" == resource_type:
+            from . import activitydefinition
+            return activitydefinition.ActivityDefinitionDynamicValue(jsondict)
+        if "ActivityDefinitionParticipant" == resource_type:
+            from . import activitydefinition
+            return activitydefinition.ActivityDefinitionParticipant(jsondict)
+        if "Address" == resource_type:
+            from . import address
+            return address.Address(jsondict)
+        if "AdverseEvent" == resource_type:
+            from . import adverseevent
+            return adverseevent.AdverseEvent(jsondict)
+        if "AdverseEventSuspectEntity" == resource_type:
+            from . import adverseevent
+            return adverseevent.AdverseEventSuspectEntity(jsondict)
+        if "Age" == resource_type:
+            from . import age
+            return age.Age(jsondict)
+        if "AllergyIntolerance" == resource_type:
+            from . import allergyintolerance
+            return allergyintolerance.AllergyIntolerance(jsondict)
+        if "AllergyIntoleranceReaction" == resource_type:
+            from . import allergyintolerance
+            return allergyintolerance.AllergyIntoleranceReaction(jsondict)
+        if "Annotation" == resource_type:
+            from . import annotation
+            return annotation.Annotation(jsondict)
+        if "Appointment" == resource_type:
+            from . import appointment
+            return appointment.Appointment(jsondict)
+        if "AppointmentParticipant" == resource_type:
+            from . import appointment
+            return appointment.AppointmentParticipant(jsondict)
+        if "AppointmentResponse" == resource_type:
+            from . import appointmentresponse
+            return appointmentresponse.AppointmentResponse(jsondict)
+        if "Attachment" == resource_type:
+            from . import attachment
+            return attachment.Attachment(jsondict)
+        if "AuditEvent" == resource_type:
+            from . import auditevent
+            return auditevent.AuditEvent(jsondict)
+        if "AuditEventAgent" == resource_type:
+            from . import auditevent
+            return auditevent.AuditEventAgent(jsondict)
+        if "AuditEventAgentNetwork" == resource_type:
+            from . import auditevent
+            return auditevent.AuditEventAgentNetwork(jsondict)
+        if "AuditEventEntity" == resource_type:
+            from . import auditevent
+            return auditevent.AuditEventEntity(jsondict)
+        if "AuditEventEntityDetail" == resource_type:
+            from . import auditevent
+            return auditevent.AuditEventEntityDetail(jsondict)
+        if "AuditEventSource" == resource_type:
+            from . import auditevent
+            return auditevent.AuditEventSource(jsondict)
+        if "BackboneElement" == resource_type:
+            from . import backboneelement
+            return backboneelement.BackboneElement(jsondict)
+        if "Basic" == resource_type:
+            from . import basic
+            return basic.Basic(jsondict)
+        if "Binary" == resource_type:
+            from . import binary
+            return binary.Binary(jsondict)
+        if "BodySite" == resource_type:
+            from . import bodysite
+            return bodysite.BodySite(jsondict)
+        if "Bundle" == resource_type:
+            from . import bundle
+            return bundle.Bundle(jsondict)
+        if "BundleEntry" == resource_type:
+            from . import bundle
+            return bundle.BundleEntry(jsondict)
+        if "BundleEntryRequest" == resource_type:
+            from . import bundle
+            return bundle.BundleEntryRequest(jsondict)
+        if "BundleEntryResponse" == resource_type:
+            from . import bundle
+            return bundle.BundleEntryResponse(jsondict)
+        if "BundleEntrySearch" == resource_type:
+            from . import bundle
+            return bundle.BundleEntrySearch(jsondict)
+        if "BundleLink" == resource_type:
+            from . import bundle
+            return bundle.BundleLink(jsondict)
+        if "CapabilityStatement" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatement(jsondict)
+        if "CapabilityStatementDocument" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementDocument(jsondict)
+        if "CapabilityStatementImplementation" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementImplementation(jsondict)
+        if "CapabilityStatementMessaging" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementMessaging(jsondict)
+        if "CapabilityStatementMessagingEndpoint" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementMessagingEndpoint(jsondict)
+        if "CapabilityStatementMessagingEvent" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementMessagingEvent(jsondict)
+        if "CapabilityStatementMessagingSupportedMessage" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementMessagingSupportedMessage(jsondict)
+        if "CapabilityStatementRest" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementRest(jsondict)
+        if "CapabilityStatementRestInteraction" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementRestInteraction(jsondict)
+        if "CapabilityStatementRestOperation" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementRestOperation(jsondict)
+        if "CapabilityStatementRestResource" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementRestResource(jsondict)
+        if "CapabilityStatementRestResourceInteraction" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementRestResourceInteraction(jsondict)
+        if "CapabilityStatementRestResourceSearchParam" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementRestResourceSearchParam(jsondict)
+        if "CapabilityStatementRestSecurity" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementRestSecurity(jsondict)
+        if "CapabilityStatementRestSecurityCertificate" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementRestSecurityCertificate(jsondict)
+        if "CapabilityStatementSoftware" == resource_type:
+            from . import capabilitystatement
+            return capabilitystatement.CapabilityStatementSoftware(jsondict)
+        if "CarePlan" == resource_type:
+            from . import careplan
+            return careplan.CarePlan(jsondict)
+        if "CarePlanActivity" == resource_type:
+            from . import careplan
+            return careplan.CarePlanActivity(jsondict)
+        if "CarePlanActivityDetail" == resource_type:
+            from . import careplan
+            return careplan.CarePlanActivityDetail(jsondict)
+        if "CareTeam" == resource_type:
+            from . import careteam
+            return careteam.CareTeam(jsondict)
+        if "CareTeamParticipant" == resource_type:
+            from . import careteam
+            return careteam.CareTeamParticipant(jsondict)
+        if "ChargeItem" == resource_type:
+            from . import chargeitem
+            return chargeitem.ChargeItem(jsondict)
+        if "ChargeItemParticipant" == resource_type:
+            from . import chargeitem
+            return chargeitem.ChargeItemParticipant(jsondict)
+        if "Claim" == resource_type:
+            from . import claim
+            return claim.Claim(jsondict)
+        if "ClaimAccident" == resource_type:
+            from . import claim
+            return claim.ClaimAccident(jsondict)
+        if "ClaimCareTeam" == resource_type:
+            from . import claim
+            return claim.ClaimCareTeam(jsondict)
+        if "ClaimDiagnosis" == resource_type:
+            from . import claim
+            return claim.ClaimDiagnosis(jsondict)
+        if "ClaimInformation" == resource_type:
+            from . import claim
+            return claim.ClaimInformation(jsondict)
+        if "ClaimInsurance" == resource_type:
+            from . import claim
+            return claim.ClaimInsurance(jsondict)
+        if "ClaimItem" == resource_type:
+            from . import claim
+            return claim.ClaimItem(jsondict)
+        if "ClaimItemDetail" == resource_type:
+            from . import claim
+            return claim.ClaimItemDetail(jsondict)
+        if "ClaimItemDetailSubDetail" == resource_type:
+            from . import claim
+            return claim.ClaimItemDetailSubDetail(jsondict)
+        if "ClaimPayee" == resource_type:
+            from . import claim
+            return claim.ClaimPayee(jsondict)
+        if "ClaimProcedure" == resource_type:
+            from . import claim
+            return claim.ClaimProcedure(jsondict)
+        if "ClaimRelated" == resource_type:
+            from . import claim
+            return claim.ClaimRelated(jsondict)
+        if "ClaimResponse" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponse(jsondict)
+        if "ClaimResponseAddItem" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponseAddItem(jsondict)
+        if "ClaimResponseAddItemDetail" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponseAddItemDetail(jsondict)
+        if "ClaimResponseError" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponseError(jsondict)
+        if "ClaimResponseInsurance" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponseInsurance(jsondict)
+        if "ClaimResponseItem" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponseItem(jsondict)
+        if "ClaimResponseItemAdjudication" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponseItemAdjudication(jsondict)
+        if "ClaimResponseItemDetail" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponseItemDetail(jsondict)
+        if "ClaimResponseItemDetailSubDetail" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponseItemDetailSubDetail(jsondict)
+        if "ClaimResponsePayment" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponsePayment(jsondict)
+        if "ClaimResponseProcessNote" == resource_type:
+            from . import claimresponse
+            return claimresponse.ClaimResponseProcessNote(jsondict)
+        if "ClinicalImpression" == resource_type:
+            from . import clinicalimpression
+            return clinicalimpression.ClinicalImpression(jsondict)
+        if "ClinicalImpressionFinding" == resource_type:
+            from . import clinicalimpression
+            return clinicalimpression.ClinicalImpressionFinding(jsondict)
+        if "ClinicalImpressionInvestigation" == resource_type:
+            from . import clinicalimpression
+            return clinicalimpression.ClinicalImpressionInvestigation(jsondict)
+        if "CodeSystem" == resource_type:
+            from . import codesystem
+            return codesystem.CodeSystem(jsondict)
+        if "CodeSystemConcept" == resource_type:
+            from . import codesystem
+            return codesystem.CodeSystemConcept(jsondict)
+        if "CodeSystemConceptDesignation" == resource_type:
+            from . import codesystem
+            return codesystem.CodeSystemConceptDesignation(jsondict)
+        if "CodeSystemConceptProperty" == resource_type:
+            from . import codesystem
+            return codesystem.CodeSystemConceptProperty(jsondict)
+        if "CodeSystemFilter" == resource_type:
+            from . import codesystem
+            return codesystem.CodeSystemFilter(jsondict)
+        if "CodeSystemProperty" == resource_type:
+            from . import codesystem
+            return codesystem.CodeSystemProperty(jsondict)
+        if "CodeableConcept" == resource_type:
+            from . import codeableconcept
+            return codeableconcept.CodeableConcept(jsondict)
+        if "Coding" == resource_type:
+            from . import coding
+            return coding.Coding(jsondict)
+        if "Communication" == resource_type:
+            from . import communication
+            return communication.Communication(jsondict)
+        if "CommunicationPayload" == resource_type:
+            from . import communication
+            return communication.CommunicationPayload(jsondict)
+        if "CommunicationRequest" == resource_type:
+            from . import communicationrequest
+            return communicationrequest.CommunicationRequest(jsondict)
+        if "CommunicationRequestPayload" == resource_type:
+            from . import communicationrequest
+            return communicationrequest.CommunicationRequestPayload(jsondict)
+        if "CommunicationRequestRequester" == resource_type:
+            from . import communicationrequest
+            return communicationrequest.CommunicationRequestRequester(jsondict)
+        if "CompartmentDefinition" == resource_type:
+            from . import compartmentdefinition
+            return compartmentdefinition.CompartmentDefinition(jsondict)
+        if "CompartmentDefinitionResource" == resource_type:
+            from . import compartmentdefinition
+            return compartmentdefinition.CompartmentDefinitionResource(jsondict)
+        if "Composition" == resource_type:
+            from . import composition
+            return composition.Composition(jsondict)
+        if "CompositionAttester" == resource_type:
+            from . import composition
+            return composition.CompositionAttester(jsondict)
+        if "CompositionEvent" == resource_type:
+            from . import composition
+            return composition.CompositionEvent(jsondict)
+        if "CompositionRelatesTo" == resource_type:
+            from . import composition
+            return composition.CompositionRelatesTo(jsondict)
+        if "CompositionSection" == resource_type:
+            from . import composition
+            return composition.CompositionSection(jsondict)
+        if "ConceptMap" == resource_type:
+            from . import conceptmap
+            return conceptmap.ConceptMap(jsondict)
+        if "ConceptMapGroup" == resource_type:
+            from . import conceptmap
+            return conceptmap.ConceptMapGroup(jsondict)
+        if "ConceptMapGroupElement" == resource_type:
+            from . import conceptmap
+            return conceptmap.ConceptMapGroupElement(jsondict)
+        if "ConceptMapGroupElementTarget" == resource_type:
+            from . import conceptmap
+            return conceptmap.ConceptMapGroupElementTarget(jsondict)
+        if "ConceptMapGroupElementTargetDependsOn" == resource_type:
+            from . import conceptmap
+            return conceptmap.ConceptMapGroupElementTargetDependsOn(jsondict)
+        if "ConceptMapGroupUnmapped" == resource_type:
+            from . import conceptmap
+            return conceptmap.ConceptMapGroupUnmapped(jsondict)
+        if "Condition" == resource_type:
+            from . import condition
+            return condition.Condition(jsondict)
+        if "ConditionEvidence" == resource_type:
+            from . import condition
+            return condition.ConditionEvidence(jsondict)
+        if "ConditionStage" == resource_type:
+            from . import condition
+            return condition.ConditionStage(jsondict)
+        if "Consent" == resource_type:
+            from . import consent
+            return consent.Consent(jsondict)
+        if "ConsentActor" == resource_type:
+            from . import consent
+            return consent.ConsentActor(jsondict)
+        if "ConsentData" == resource_type:
+            from . import consent
+            return consent.ConsentData(jsondict)
+        if "ConsentExcept" == resource_type:
+            from . import consent
+            return consent.ConsentExcept(jsondict)
+        if "ConsentExceptActor" == resource_type:
+            from . import consent
+            return consent.ConsentExceptActor(jsondict)
+        if "ConsentExceptData" == resource_type:
+            from . import consent
+            return consent.ConsentExceptData(jsondict)
+        if "ConsentPolicy" == resource_type:
+            from . import consent
+            return consent.ConsentPolicy(jsondict)
+        if "ContactDetail" == resource_type:
+            from . import contactdetail
+            return contactdetail.ContactDetail(jsondict)
+        if "ContactPoint" == resource_type:
+            from . import contactpoint
+            return contactpoint.ContactPoint(jsondict)
+        if "Contract" == resource_type:
+            from . import contract
+            return contract.Contract(jsondict)
+        if "ContractAgent" == resource_type:
+            from . import contract
+            return contract.ContractAgent(jsondict)
+        if "ContractFriendly" == resource_type:
+            from . import contract
+            return contract.ContractFriendly(jsondict)
+        if "ContractLegal" == resource_type:
+            from . import contract
+            return contract.ContractLegal(jsondict)
+        if "ContractRule" == resource_type:
+            from . import contract
+            return contract.ContractRule(jsondict)
+        if "ContractSigner" == resource_type:
+            from . import contract
+            return contract.ContractSigner(jsondict)
+        if "ContractTerm" == resource_type:
+            from . import contract
+            return contract.ContractTerm(jsondict)
+        if "ContractTermAgent" == resource_type:
+            from . import contract
+            return contract.ContractTermAgent(jsondict)
+        if "ContractTermValuedItem" == resource_type:
+            from . import contract
+            return contract.ContractTermValuedItem(jsondict)
+        if "ContractValuedItem" == resource_type:
+            from . import contract
+            return contract.ContractValuedItem(jsondict)
+        if "Contributor" == resource_type:
+            from . import contributor
+            return contributor.Contributor(jsondict)
+        if "Count" == resource_type:
+            from . import count
+            return count.Count(jsondict)
+        if "Coverage" == resource_type:
+            from . import coverage
+            return coverage.Coverage(jsondict)
+        if "CoverageGrouping" == resource_type:
+            from . import coverage
+            return coverage.CoverageGrouping(jsondict)
+        if "DataElement" == resource_type:
+            from . import dataelement
+            return dataelement.DataElement(jsondict)
+        if "DataElementMapping" == resource_type:
+            from . import dataelement
+            return dataelement.DataElementMapping(jsondict)
+        if "DataRequirement" == resource_type:
+            from . import datarequirement
+            return datarequirement.DataRequirement(jsondict)
+        if "DataRequirementCodeFilter" == resource_type:
+            from . import datarequirement
+            return datarequirement.DataRequirementCodeFilter(jsondict)
+        if "DataRequirementDateFilter" == resource_type:
+            from . import datarequirement
+            return datarequirement.DataRequirementDateFilter(jsondict)
+        if "DetectedIssue" == resource_type:
+            from . import detectedissue
+            return detectedissue.DetectedIssue(jsondict)
+        if "DetectedIssueMitigation" == resource_type:
+            from . import detectedissue
+            return detectedissue.DetectedIssueMitigation(jsondict)
+        if "Device" == resource_type:
+            from . import device
+            return device.Device(jsondict)
+        if "DeviceComponent" == resource_type:
+            from . import devicecomponent
+            return devicecomponent.DeviceComponent(jsondict)
+        if "DeviceComponentProductionSpecification" == resource_type:
+            from . import devicecomponent
+            return devicecomponent.DeviceComponentProductionSpecification(jsondict)
+        if "DeviceMetric" == resource_type:
+            from . import devicemetric
+            return devicemetric.DeviceMetric(jsondict)
+        if "DeviceMetricCalibration" == resource_type:
+            from . import devicemetric
+            return devicemetric.DeviceMetricCalibration(jsondict)
+        if "DeviceRequest" == resource_type:
+            from . import devicerequest
+            return devicerequest.DeviceRequest(jsondict)
+        if "DeviceRequestRequester" == resource_type:
+            from . import devicerequest
+            return devicerequest.DeviceRequestRequester(jsondict)
+        if "DeviceUdi" == resource_type:
+            from . import device
+            return device.DeviceUdi(jsondict)
+        if "DeviceUseStatement" == resource_type:
+            from . import deviceusestatement
+            return deviceusestatement.DeviceUseStatement(jsondict)
+        if "DiagnosticReport" == resource_type:
+            from . import diagnosticreport
+            return diagnosticreport.DiagnosticReport(jsondict)
+        if "DiagnosticReportImage" == resource_type:
+            from . import diagnosticreport
+            return diagnosticreport.DiagnosticReportImage(jsondict)
+        if "DiagnosticReportPerformer" == resource_type:
+            from . import diagnosticreport
+            return diagnosticreport.DiagnosticReportPerformer(jsondict)
+        if "Distance" == resource_type:
+            from . import distance
+            return distance.Distance(jsondict)
+        if "DocumentManifest" == resource_type:
+            from . import documentmanifest
+            return documentmanifest.DocumentManifest(jsondict)
+        if "DocumentManifestContent" == resource_type:
+            from . import documentmanifest
+            return documentmanifest.DocumentManifestContent(jsondict)
+        if "DocumentManifestRelated" == resource_type:
+            from . import documentmanifest
+            return documentmanifest.DocumentManifestRelated(jsondict)
+        if "DocumentReference" == resource_type:
+            from . import documentreference
+            return documentreference.DocumentReference(jsondict)
+        if "DocumentReferenceContent" == resource_type:
+            from . import documentreference
+            return documentreference.DocumentReferenceContent(jsondict)
+        if "DocumentReferenceContext" == resource_type:
+            from . import documentreference
+            return documentreference.DocumentReferenceContext(jsondict)
+        if "DocumentReferenceContextRelated" == resource_type:
+            from . import documentreference
+            return documentreference.DocumentReferenceContextRelated(jsondict)
+        if "DocumentReferenceRelatesTo" == resource_type:
+            from . import documentreference
+            return documentreference.DocumentReferenceRelatesTo(jsondict)
+        if "DomainResource" == resource_type:
+            from . import domainresource
+            return domainresource.DomainResource(jsondict)
+        if "Dosage" == resource_type:
+            from . import dosage
+            return dosage.Dosage(jsondict)
+        if "Duration" == resource_type:
+            from . import duration
+            return duration.Duration(jsondict)
+        if "Element" == resource_type:
+            from . import element
+            return element.Element(jsondict)
+        if "ElementDefinition" == resource_type:
+            from . import elementdefinition
+            return elementdefinition.ElementDefinition(jsondict)
+        if "ElementDefinitionBase" == resource_type:
+            from . import elementdefinition
+            return elementdefinition.ElementDefinitionBase(jsondict)
+        if "ElementDefinitionBinding" == resource_type:
+            from . import elementdefinition
+            return elementdefinition.ElementDefinitionBinding(jsondict)
+        if "ElementDefinitionConstraint" == resource_type:
+            from . import elementdefinition
+            return elementdefinition.ElementDefinitionConstraint(jsondict)
+        if "ElementDefinitionExample" == resource_type:
+            from . import elementdefinition
+            return elementdefinition.ElementDefinitionExample(jsondict)
+        if "ElementDefinitionMapping" == resource_type:
+            from . import elementdefinition
+            return elementdefinition.ElementDefinitionMapping(jsondict)
+        if "ElementDefinitionSlicing" == resource_type:
+            from . import elementdefinition
+            return elementdefinition.ElementDefinitionSlicing(jsondict)
+        if "ElementDefinitionSlicingDiscriminator" == resource_type:
+            from . import elementdefinition
+            return elementdefinition.ElementDefinitionSlicingDiscriminator(jsondict)
+        if "ElementDefinitionType" == resource_type:
+            from . import elementdefinition
+            return elementdefinition.ElementDefinitionType(jsondict)
+        if "EligibilityRequest" == resource_type:
+            from . import eligibilityrequest
+            return eligibilityrequest.EligibilityRequest(jsondict)
+        if "EligibilityResponse" == resource_type:
+            from . import eligibilityresponse
+            return eligibilityresponse.EligibilityResponse(jsondict)
+        if "EligibilityResponseError" == resource_type:
+            from . import eligibilityresponse
+            return eligibilityresponse.EligibilityResponseError(jsondict)
+        if "EligibilityResponseInsurance" == resource_type:
+            from . import eligibilityresponse
+            return eligibilityresponse.EligibilityResponseInsurance(jsondict)
+        if "EligibilityResponseInsuranceBenefitBalance" == resource_type:
+            from . import eligibilityresponse
+            return eligibilityresponse.EligibilityResponseInsuranceBenefitBalance(jsondict)
+        if "EligibilityResponseInsuranceBenefitBalanceFinancial" == resource_type:
+            from . import eligibilityresponse
+            return eligibilityresponse.EligibilityResponseInsuranceBenefitBalanceFinancial(jsondict)
+        if "Encounter" == resource_type:
+            from . import encounter
+            return encounter.Encounter(jsondict)
+        if "EncounterClassHistory" == resource_type:
+            from . import encounter
+            return encounter.EncounterClassHistory(jsondict)
+        if "EncounterDiagnosis" == resource_type:
+            from . import encounter
+            return encounter.EncounterDiagnosis(jsondict)
+        if "EncounterHospitalization" == resource_type:
+            from . import encounter
+            return encounter.EncounterHospitalization(jsondict)
+        if "EncounterLocation" == resource_type:
+            from . import encounter
+            return encounter.EncounterLocation(jsondict)
+        if "EncounterParticipant" == resource_type:
+            from . import encounter
+            return encounter.EncounterParticipant(jsondict)
+        if "EncounterStatusHistory" == resource_type:
+            from . import encounter
+            return encounter.EncounterStatusHistory(jsondict)
+        if "Endpoint" == resource_type:
+            from . import endpoint
+            return endpoint.Endpoint(jsondict)
+        if "EnrollmentRequest" == resource_type:
+            from . import enrollmentrequest
+            return enrollmentrequest.EnrollmentRequest(jsondict)
+        if "EnrollmentResponse" == resource_type:
+            from . import enrollmentresponse
+            return enrollmentresponse.EnrollmentResponse(jsondict)
+        if "EpisodeOfCare" == resource_type:
+            from . import episodeofcare
+            return episodeofcare.EpisodeOfCare(jsondict)
+        if "EpisodeOfCareDiagnosis" == resource_type:
+            from . import episodeofcare
+            return episodeofcare.EpisodeOfCareDiagnosis(jsondict)
+        if "EpisodeOfCareStatusHistory" == resource_type:
+            from . import episodeofcare
+            return episodeofcare.EpisodeOfCareStatusHistory(jsondict)
+        if "ExpansionProfile" == resource_type:
+            from . import expansionprofile
+            return expansionprofile.ExpansionProfile(jsondict)
+        if "ExpansionProfileDesignation" == resource_type:
+            from . import expansionprofile
+            return expansionprofile.ExpansionProfileDesignation(jsondict)
+        if "ExpansionProfileDesignationExclude" == resource_type:
+            from . import expansionprofile
+            return expansionprofile.ExpansionProfileDesignationExclude(jsondict)
+        if "ExpansionProfileDesignationExcludeDesignation" == resource_type:
+            from . import expansionprofile
+            return expansionprofile.ExpansionProfileDesignationExcludeDesignation(jsondict)
+        if "ExpansionProfileDesignationInclude" == resource_type:
+            from . import expansionprofile
+            return expansionprofile.ExpansionProfileDesignationInclude(jsondict)
+        if "ExpansionProfileDesignationIncludeDesignation" == resource_type:
+            from . import expansionprofile
+            return expansionprofile.ExpansionProfileDesignationIncludeDesignation(jsondict)
+        if "ExpansionProfileExcludedSystem" == resource_type:
+            from . import expansionprofile
+            return expansionprofile.ExpansionProfileExcludedSystem(jsondict)
+        if "ExpansionProfileFixedVersion" == resource_type:
+            from . import expansionprofile
+            return expansionprofile.ExpansionProfileFixedVersion(jsondict)
+        if "ExplanationOfBenefit" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefit(jsondict)
+        if "ExplanationOfBenefitAccident" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitAccident(jsondict)
+        if "ExplanationOfBenefitAddItem" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitAddItem(jsondict)
+        if "ExplanationOfBenefitAddItemDetail" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitAddItemDetail(jsondict)
+        if "ExplanationOfBenefitBenefitBalance" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitBenefitBalance(jsondict)
+        if "ExplanationOfBenefitBenefitBalanceFinancial" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitBenefitBalanceFinancial(jsondict)
+        if "ExplanationOfBenefitCareTeam" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitCareTeam(jsondict)
+        if "ExplanationOfBenefitDiagnosis" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitDiagnosis(jsondict)
+        if "ExplanationOfBenefitInformation" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitInformation(jsondict)
+        if "ExplanationOfBenefitInsurance" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitInsurance(jsondict)
+        if "ExplanationOfBenefitItem" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitItem(jsondict)
+        if "ExplanationOfBenefitItemAdjudication" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitItemAdjudication(jsondict)
+        if "ExplanationOfBenefitItemDetail" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitItemDetail(jsondict)
+        if "ExplanationOfBenefitItemDetailSubDetail" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitItemDetailSubDetail(jsondict)
+        if "ExplanationOfBenefitPayee" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitPayee(jsondict)
+        if "ExplanationOfBenefitPayment" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitPayment(jsondict)
+        if "ExplanationOfBenefitProcedure" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitProcedure(jsondict)
+        if "ExplanationOfBenefitProcessNote" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitProcessNote(jsondict)
+        if "ExplanationOfBenefitRelated" == resource_type:
+            from . import explanationofbenefit
+            return explanationofbenefit.ExplanationOfBenefitRelated(jsondict)
+        if "Extension" == resource_type:
+            from . import extension
+            return extension.Extension(jsondict)
+        if "FamilyMemberHistory" == resource_type:
+            from . import familymemberhistory
+            return familymemberhistory.FamilyMemberHistory(jsondict)
+        if "FamilyMemberHistoryCondition" == resource_type:
+            from . import familymemberhistory
+            return familymemberhistory.FamilyMemberHistoryCondition(jsondict)
+        if "Flag" == resource_type:
+            from . import flag
+            return flag.Flag(jsondict)
+        if "Goal" == resource_type:
+            from . import goal
+            return goal.Goal(jsondict)
+        if "GoalTarget" == resource_type:
+            from . import goal
+            return goal.GoalTarget(jsondict)
+        if "GraphDefinition" == resource_type:
+            from . import graphdefinition
+            return graphdefinition.GraphDefinition(jsondict)
+        if "GraphDefinitionLink" == resource_type:
+            from . import graphdefinition
+            return graphdefinition.GraphDefinitionLink(jsondict)
+        if "GraphDefinitionLinkTarget" == resource_type:
+            from . import graphdefinition
+            return graphdefinition.GraphDefinitionLinkTarget(jsondict)
+        if "GraphDefinitionLinkTargetCompartment" == resource_type:
+            from . import graphdefinition
+            return graphdefinition.GraphDefinitionLinkTargetCompartment(jsondict)
+        if "Group" == resource_type:
+            from . import group
+            return group.Group(jsondict)
+        if "GroupCharacteristic" == resource_type:
+            from . import group
+            return group.GroupCharacteristic(jsondict)
+        if "GroupMember" == resource_type:
+            from . import group
+            return group.GroupMember(jsondict)
+        if "GuidanceResponse" == resource_type:
+            from . import guidanceresponse
+            return guidanceresponse.GuidanceResponse(jsondict)
+        if "HealthcareService" == resource_type:
+            from . import healthcareservice
+            return healthcareservice.HealthcareService(jsondict)
+        if "HealthcareServiceAvailableTime" == resource_type:
+            from . import healthcareservice
+            return healthcareservice.HealthcareServiceAvailableTime(jsondict)
+        if "HealthcareServiceNotAvailable" == resource_type:
+            from . import healthcareservice
+            return healthcareservice.HealthcareServiceNotAvailable(jsondict)
+        if "HumanName" == resource_type:
+            from . import humanname
+            return humanname.HumanName(jsondict)
+        if "Identifier" == resource_type:
+            from . import identifier
+            return identifier.Identifier(jsondict)
+        if "ImagingManifest" == resource_type:
+            from . import imagingmanifest
+            return imagingmanifest.ImagingManifest(jsondict)
+        if "ImagingManifestStudy" == resource_type:
+            from . import imagingmanifest
+            return imagingmanifest.ImagingManifestStudy(jsondict)
+        if "ImagingManifestStudySeries" == resource_type:
+            from . import imagingmanifest
+            return imagingmanifest.ImagingManifestStudySeries(jsondict)
+        if "ImagingManifestStudySeriesInstance" == resource_type:
+            from . import imagingmanifest
+            return imagingmanifest.ImagingManifestStudySeriesInstance(jsondict)
+        if "ImagingStudy" == resource_type:
+            from . import imagingstudy
+            return imagingstudy.ImagingStudy(jsondict)
+        if "ImagingStudySeries" == resource_type:
+            from . import imagingstudy
+            return imagingstudy.ImagingStudySeries(jsondict)
+        if "ImagingStudySeriesInstance" == resource_type:
+            from . import imagingstudy
+            return imagingstudy.ImagingStudySeriesInstance(jsondict)
+        if "Immunization" == resource_type:
+            from . import immunization
+            return immunization.Immunization(jsondict)
+        if "ImmunizationExplanation" == resource_type:
+            from . import immunization
+            return immunization.ImmunizationExplanation(jsondict)
+        if "ImmunizationPractitioner" == resource_type:
+            from . import immunization
+            return immunization.ImmunizationPractitioner(jsondict)
+        if "ImmunizationReaction" == resource_type:
+            from . import immunization
+            return immunization.ImmunizationReaction(jsondict)
+        if "ImmunizationRecommendation" == resource_type:
+            from . import immunizationrecommendation
+            return immunizationrecommendation.ImmunizationRecommendation(jsondict)
+        if "ImmunizationRecommendationRecommendation" == resource_type:
+            from . import immunizationrecommendation
+            return immunizationrecommendation.ImmunizationRecommendationRecommendation(jsondict)
+        if "ImmunizationRecommendationRecommendationDateCriterion" == resource_type:
+            from . import immunizationrecommendation
+            return immunizationrecommendation.ImmunizationRecommendationRecommendationDateCriterion(jsondict)
+        if "ImmunizationRecommendationRecommendationProtocol" == resource_type:
+            from . import immunizationrecommendation
+            return immunizationrecommendation.ImmunizationRecommendationRecommendationProtocol(jsondict)
+        if "ImmunizationVaccinationProtocol" == resource_type:
+            from . import immunization
+            return immunization.ImmunizationVaccinationProtocol(jsondict)
+        if "ImplementationGuide" == resource_type:
+            from . import implementationguide
+            return implementationguide.ImplementationGuide(jsondict)
+        if "ImplementationGuideDependency" == resource_type:
+            from . import implementationguide
+            return implementationguide.ImplementationGuideDependency(jsondict)
+        if "ImplementationGuideGlobal" == resource_type:
+            from . import implementationguide
+            return implementationguide.ImplementationGuideGlobal(jsondict)
+        if "ImplementationGuidePackage" == resource_type:
+            from . import implementationguide
+            return implementationguide.ImplementationGuidePackage(jsondict)
+        if "ImplementationGuidePackageResource" == resource_type:
+            from . import implementationguide
+            return implementationguide.ImplementationGuidePackageResource(jsondict)
+        if "ImplementationGuidePage" == resource_type:
+            from . import implementationguide
+            return implementationguide.ImplementationGuidePage(jsondict)
+        if "Library" == resource_type:
+            from . import library
+            return library.Library(jsondict)
+        if "Linkage" == resource_type:
+            from . import linkage
+            return linkage.Linkage(jsondict)
+        if "LinkageItem" == resource_type:
+            from . import linkage
+            return linkage.LinkageItem(jsondict)
+        if "List" == resource_type:
+            from . import list
+            return list.List(jsondict)
+        if "ListEntry" == resource_type:
+            from . import list
+            return list.ListEntry(jsondict)
+        if "Location" == resource_type:
+            from . import location
+            return location.Location(jsondict)
+        if "LocationPosition" == resource_type:
+            from . import location
+            return location.LocationPosition(jsondict)
+        if "Measure" == resource_type:
+            from . import measure
+            return measure.Measure(jsondict)
+        if "MeasureGroup" == resource_type:
+            from . import measure
+            return measure.MeasureGroup(jsondict)
+        if "MeasureGroupPopulation" == resource_type:
+            from . import measure
+            return measure.MeasureGroupPopulation(jsondict)
+        if "MeasureGroupStratifier" == resource_type:
+            from . import measure
+            return measure.MeasureGroupStratifier(jsondict)
+        if "MeasureReport" == resource_type:
+            from . import measurereport
+            return measurereport.MeasureReport(jsondict)
+        if "MeasureReportGroup" == resource_type:
+            from . import measurereport
+            return measurereport.MeasureReportGroup(jsondict)
+        if "MeasureReportGroupPopulation" == resource_type:
+            from . import measurereport
+            return measurereport.MeasureReportGroupPopulation(jsondict)
+        if "MeasureReportGroupStratifier" == resource_type:
+            from . import measurereport
+            return measurereport.MeasureReportGroupStratifier(jsondict)
+        if "MeasureReportGroupStratifierStratum" == resource_type:
+            from . import measurereport
+            return measurereport.MeasureReportGroupStratifierStratum(jsondict)
+        if "MeasureReportGroupStratifierStratumPopulation" == resource_type:
+            from . import measurereport
+            return measurereport.MeasureReportGroupStratifierStratumPopulation(jsondict)
+        if "MeasureSupplementalData" == resource_type:
+            from . import measure
+            return measure.MeasureSupplementalData(jsondict)
+        if "Media" == resource_type:
+            from . import media
+            return media.Media(jsondict)
+        if "Medication" == resource_type:
+            from . import medication
+            return medication.Medication(jsondict)
+        if "MedicationAdministration" == resource_type:
+            from . import medicationadministration
+            return medicationadministration.MedicationAdministration(jsondict)
+        if "MedicationAdministrationDosage" == resource_type:
+            from . import medicationadministration
+            return medicationadministration.MedicationAdministrationDosage(jsondict)
+        if "MedicationAdministrationPerformer" == resource_type:
+            from . import medicationadministration
+            return medicationadministration.MedicationAdministrationPerformer(jsondict)
+        if "MedicationDispense" == resource_type:
+            from . import medicationdispense
+            return medicationdispense.MedicationDispense(jsondict)
+        if "MedicationDispensePerformer" == resource_type:
+            from . import medicationdispense
+            return medicationdispense.MedicationDispensePerformer(jsondict)
+        if "MedicationDispenseSubstitution" == resource_type:
+            from . import medicationdispense
+            return medicationdispense.MedicationDispenseSubstitution(jsondict)
+        if "MedicationIngredient" == resource_type:
+            from . import medication
+            return medication.MedicationIngredient(jsondict)
+        if "MedicationPackage" == resource_type:
+            from . import medication
+            return medication.MedicationPackage(jsondict)
+        if "MedicationPackageBatch" == resource_type:
+            from . import medication
+            return medication.MedicationPackageBatch(jsondict)
+        if "MedicationPackageContent" == resource_type:
+            from . import medication
+            return medication.MedicationPackageContent(jsondict)
+        if "MedicationRequest" == resource_type:
+            from . import medicationrequest
+            return medicationrequest.MedicationRequest(jsondict)
+        if "MedicationRequestDispenseRequest" == resource_type:
+            from . import medicationrequest
+            return medicationrequest.MedicationRequestDispenseRequest(jsondict)
+        if "MedicationRequestRequester" == resource_type:
+            from . import medicationrequest
+            return medicationrequest.MedicationRequestRequester(jsondict)
+        if "MedicationRequestSubstitution" == resource_type:
+            from . import medicationrequest
+            return medicationrequest.MedicationRequestSubstitution(jsondict)
+        if "MedicationStatement" == resource_type:
+            from . import medicationstatement
+            return medicationstatement.MedicationStatement(jsondict)
+        if "MessageDefinition" == resource_type:
+            from . import messagedefinition
+            return messagedefinition.MessageDefinition(jsondict)
+        if "MessageDefinitionAllowedResponse" == resource_type:
+            from . import messagedefinition
+            return messagedefinition.MessageDefinitionAllowedResponse(jsondict)
+        if "MessageDefinitionFocus" == resource_type:
+            from . import messagedefinition
+            return messagedefinition.MessageDefinitionFocus(jsondict)
+        if "MessageHeader" == resource_type:
+            from . import messageheader
+            return messageheader.MessageHeader(jsondict)
+        if "MessageHeaderDestination" == resource_type:
+            from . import messageheader
+            return messageheader.MessageHeaderDestination(jsondict)
+        if "MessageHeaderResponse" == resource_type:
+            from . import messageheader
+            return messageheader.MessageHeaderResponse(jsondict)
+        if "MessageHeaderSource" == resource_type:
+            from . import messageheader
+            return messageheader.MessageHeaderSource(jsondict)
+        if "Meta" == resource_type:
+            from . import meta
+            return meta.Meta(jsondict)
+        if "MetadataResource" == resource_type:
+            from . import metadataresource
+            return metadataresource.MetadataResource(jsondict)
+        if "Money" == resource_type:
+            from . import money
+            return money.Money(jsondict)
+        if "NamingSystem" == resource_type:
+            from . import namingsystem
+            return namingsystem.NamingSystem(jsondict)
+        if "NamingSystemUniqueId" == resource_type:
+            from . import namingsystem
+            return namingsystem.NamingSystemUniqueId(jsondict)
+        if "Narrative" == resource_type:
+            from . import narrative
+            return narrative.Narrative(jsondict)
+        if "NutritionOrder" == resource_type:
+            from . import nutritionorder
+            return nutritionorder.NutritionOrder(jsondict)
+        if "NutritionOrderEnteralFormula" == resource_type:
+            from . import nutritionorder
+            return nutritionorder.NutritionOrderEnteralFormula(jsondict)
+        if "NutritionOrderEnteralFormulaAdministration" == resource_type:
+            from . import nutritionorder
+            return nutritionorder.NutritionOrderEnteralFormulaAdministration(jsondict)
+        if "NutritionOrderOralDiet" == resource_type:
+            from . import nutritionorder
+            return nutritionorder.NutritionOrderOralDiet(jsondict)
+        if "NutritionOrderOralDietNutrient" == resource_type:
+            from . import nutritionorder
+            return nutritionorder.NutritionOrderOralDietNutrient(jsondict)
+        if "NutritionOrderOralDietTexture" == resource_type:
+            from . import nutritionorder
+            return nutritionorder.NutritionOrderOralDietTexture(jsondict)
+        if "NutritionOrderSupplement" == resource_type:
+            from . import nutritionorder
+            return nutritionorder.NutritionOrderSupplement(jsondict)
+        if "Observation" == resource_type:
+            from . import observation
+            return observation.Observation(jsondict)
+        if "ObservationComponent" == resource_type:
+            from . import observation
+            return observation.ObservationComponent(jsondict)
+        if "ObservationReferenceRange" == resource_type:
+            from . import observation
+            return observation.ObservationReferenceRange(jsondict)
+        if "ObservationRelated" == resource_type:
+            from . import observation
+            return observation.ObservationRelated(jsondict)
+        if "OperationDefinition" == resource_type:
+            from . import operationdefinition
+            return operationdefinition.OperationDefinition(jsondict)
+        if "OperationDefinitionOverload" == resource_type:
+            from . import operationdefinition
+            return operationdefinition.OperationDefinitionOverload(jsondict)
+        if "OperationDefinitionParameter" == resource_type:
+            from . import operationdefinition
+            return operationdefinition.OperationDefinitionParameter(jsondict)
+        if "OperationDefinitionParameterBinding" == resource_type:
+            from . import operationdefinition
+            return operationdefinition.OperationDefinitionParameterBinding(jsondict)
+        if "OperationOutcome" == resource_type:
+            from . import operationoutcome
+            return operationoutcome.OperationOutcome(jsondict)
+        if "OperationOutcomeIssue" == resource_type:
+            from . import operationoutcome
+            return operationoutcome.OperationOutcomeIssue(jsondict)
+        if "Organization" == resource_type:
+            from . import organization
+            return organization.Organization(jsondict)
+        if "OrganizationContact" == resource_type:
+            from . import organization
+            return organization.OrganizationContact(jsondict)
+        if "ParameterDefinition" == resource_type:
+            from . import parameterdefinition
+            return parameterdefinition.ParameterDefinition(jsondict)
+        if "Parameters" == resource_type:
+            from . import parameters
+            return parameters.Parameters(jsondict)
+        if "ParametersParameter" == resource_type:
+            from . import parameters
+            return parameters.ParametersParameter(jsondict)
+        if "Patient" == resource_type:
+            from . import patient
+            return patient.Patient(jsondict)
+        if "PatientAnimal" == resource_type:
+            from . import patient
+            return patient.PatientAnimal(jsondict)
+        if "PatientCommunication" == resource_type:
+            from . import patient
+            return patient.PatientCommunication(jsondict)
+        if "PatientContact" == resource_type:
+            from . import patient
+            return patient.PatientContact(jsondict)
+        if "PatientLink" == resource_type:
+            from . import patient
+            return patient.PatientLink(jsondict)
+        if "PaymentNotice" == resource_type:
+            from . import paymentnotice
+            return paymentnotice.PaymentNotice(jsondict)
+        if "PaymentReconciliation" == resource_type:
+            from . import paymentreconciliation
+            return paymentreconciliation.PaymentReconciliation(jsondict)
+        if "PaymentReconciliationDetail" == resource_type:
+            from . import paymentreconciliation
+            return paymentreconciliation.PaymentReconciliationDetail(jsondict)
+        if "PaymentReconciliationProcessNote" == resource_type:
+            from . import paymentreconciliation
+            return paymentreconciliation.PaymentReconciliationProcessNote(jsondict)
+        if "Period" == resource_type:
+            from . import period
+            return period.Period(jsondict)
+        if "Person" == resource_type:
+            from . import person
+            return person.Person(jsondict)
+        if "PersonLink" == resource_type:
+            from . import person
+            return person.PersonLink(jsondict)
+        if "PlanDefinition" == resource_type:
+            from . import plandefinition
+            return plandefinition.PlanDefinition(jsondict)
+        if "PlanDefinitionAction" == resource_type:
+            from . import plandefinition
+            return plandefinition.PlanDefinitionAction(jsondict)
+        if "PlanDefinitionActionCondition" == resource_type:
+            from . import plandefinition
+            return plandefinition.PlanDefinitionActionCondition(jsondict)
+        if "PlanDefinitionActionDynamicValue" == resource_type:
+            from . import plandefinition
+            return plandefinition.PlanDefinitionActionDynamicValue(jsondict)
+        if "PlanDefinitionActionParticipant" == resource_type:
+            from . import plandefinition
+            return plandefinition.PlanDefinitionActionParticipant(jsondict)
+        if "PlanDefinitionActionRelatedAction" == resource_type:
+            from . import plandefinition
+            return plandefinition.PlanDefinitionActionRelatedAction(jsondict)
+        if "PlanDefinitionGoal" == resource_type:
+            from . import plandefinition
+            return plandefinition.PlanDefinitionGoal(jsondict)
+        if "PlanDefinitionGoalTarget" == resource_type:
+            from . import plandefinition
+            return plandefinition.PlanDefinitionGoalTarget(jsondict)
+        if "Practitioner" == resource_type:
+            from . import practitioner
+            return practitioner.Practitioner(jsondict)
+        if "PractitionerQualification" == resource_type:
+            from . import practitioner
+            return practitioner.PractitionerQualification(jsondict)
+        if "PractitionerRole" == resource_type:
+            from . import practitionerrole
+            return practitionerrole.PractitionerRole(jsondict)
+        if "PractitionerRoleAvailableTime" == resource_type:
+            from . import practitionerrole
+            return practitionerrole.PractitionerRoleAvailableTime(jsondict)
+        if "PractitionerRoleNotAvailable" == resource_type:
+            from . import practitionerrole
+            return practitionerrole.PractitionerRoleNotAvailable(jsondict)
+        if "Procedure" == resource_type:
+            from . import procedure
+            return procedure.Procedure(jsondict)
+        if "ProcedureFocalDevice" == resource_type:
+            from . import procedure
+            return procedure.ProcedureFocalDevice(jsondict)
+        if "ProcedurePerformer" == resource_type:
+            from . import procedure
+            return procedure.ProcedurePerformer(jsondict)
+        if "ProcedureRequest" == resource_type:
+            from . import procedurerequest
+            return procedurerequest.ProcedureRequest(jsondict)
+        if "ProcedureRequestRequester" == resource_type:
+            from . import procedurerequest
+            return procedurerequest.ProcedureRequestRequester(jsondict)
+        if "ProcessRequest" == resource_type:
+            from . import processrequest
+            return processrequest.ProcessRequest(jsondict)
+        if "ProcessRequestItem" == resource_type:
+            from . import processrequest
+            return processrequest.ProcessRequestItem(jsondict)
+        if "ProcessResponse" == resource_type:
+            from . import processresponse
+            return processresponse.ProcessResponse(jsondict)
+        if "ProcessResponseProcessNote" == resource_type:
+            from . import processresponse
+            return processresponse.ProcessResponseProcessNote(jsondict)
+        if "Provenance" == resource_type:
+            from . import provenance
+            return provenance.Provenance(jsondict)
+        if "ProvenanceAgent" == resource_type:
+            from . import provenance
+            return provenance.ProvenanceAgent(jsondict)
+        if "ProvenanceEntity" == resource_type:
+            from . import provenance
+            return provenance.ProvenanceEntity(jsondict)
+        if "Quantity" == resource_type:
+            from . import quantity
+            return quantity.Quantity(jsondict)
+        if "Questionnaire" == resource_type:
+            from . import questionnaire
+            return questionnaire.Questionnaire(jsondict)
+        if "QuestionnaireItem" == resource_type:
+            from . import questionnaire
+            return questionnaire.QuestionnaireItem(jsondict)
+        if "QuestionnaireItemEnableWhen" == resource_type:
+            from . import questionnaire
+            return questionnaire.QuestionnaireItemEnableWhen(jsondict)
+        if "QuestionnaireItemOption" == resource_type:
+            from . import questionnaire
+            return questionnaire.QuestionnaireItemOption(jsondict)
+        if "QuestionnaireResponse" == resource_type:
+            from . import questionnaireresponse
+            return questionnaireresponse.QuestionnaireResponse(jsondict)
+        if "QuestionnaireResponseItem" == resource_type:
+            from . import questionnaireresponse
+            return questionnaireresponse.QuestionnaireResponseItem(jsondict)
+        if "QuestionnaireResponseItemAnswer" == resource_type:
+            from . import questionnaireresponse
+            return questionnaireresponse.QuestionnaireResponseItemAnswer(jsondict)
+        if "Range" == resource_type:
+            from . import range
+            return range.Range(jsondict)
+        if "Ratio" == resource_type:
+            from . import ratio
+            return ratio.Ratio(jsondict)
+        if "Reference" == resource_type:
+            from . import reference
+            return reference.Reference(jsondict)
+        if "ReferralRequest" == resource_type:
+            from . import referralrequest
+            return referralrequest.ReferralRequest(jsondict)
+        if "ReferralRequestRequester" == resource_type:
+            from . import referralrequest
+            return referralrequest.ReferralRequestRequester(jsondict)
+        if "RelatedArtifact" == resource_type:
+            from . import relatedartifact
+            return relatedartifact.RelatedArtifact(jsondict)
+        if "RelatedPerson" == resource_type:
+            from . import relatedperson
+            return relatedperson.RelatedPerson(jsondict)
+        if "RequestGroup" == resource_type:
+            from . import requestgroup
+            return requestgroup.RequestGroup(jsondict)
+        if "RequestGroupAction" == resource_type:
+            from . import requestgroup
+            return requestgroup.RequestGroupAction(jsondict)
+        if "RequestGroupActionCondition" == resource_type:
+            from . import requestgroup
+            return requestgroup.RequestGroupActionCondition(jsondict)
+        if "RequestGroupActionRelatedAction" == resource_type:
+            from . import requestgroup
+            return requestgroup.RequestGroupActionRelatedAction(jsondict)
+        if "ResearchStudy" == resource_type:
+            from . import researchstudy
+            return researchstudy.ResearchStudy(jsondict)
+        if "ResearchStudyArm" == resource_type:
+            from . import researchstudy
+            return researchstudy.ResearchStudyArm(jsondict)
+        if "ResearchSubject" == resource_type:
+            from . import researchsubject
+            return researchsubject.ResearchSubject(jsondict)
+        if "Resource" == resource_type:
+            from . import resource
+            return resource.Resource(jsondict)
+        if "RiskAssessment" == resource_type:
+            from . import riskassessment
+            return riskassessment.RiskAssessment(jsondict)
+        if "RiskAssessmentPrediction" == resource_type:
+            from . import riskassessment
+            return riskassessment.RiskAssessmentPrediction(jsondict)
+        if "SampledData" == resource_type:
+            from . import sampleddata
+            return sampleddata.SampledData(jsondict)
+        if "Schedule" == resource_type:
+            from . import schedule
+            return schedule.Schedule(jsondict)
+        if "SearchParameter" == resource_type:
+            from . import searchparameter
+            return searchparameter.SearchParameter(jsondict)
+        if "SearchParameterComponent" == resource_type:
+            from . import searchparameter
+            return searchparameter.SearchParameterComponent(jsondict)
+        if "Sequence" == resource_type:
+            from . import sequence
+            return sequence.Sequence(jsondict)
+        if "SequenceQuality" == resource_type:
+            from . import sequence
+            return sequence.SequenceQuality(jsondict)
+        if "SequenceReferenceSeq" == resource_type:
+            from . import sequence
+            return sequence.SequenceReferenceSeq(jsondict)
+        if "SequenceRepository" == resource_type:
+            from . import sequence
+            return sequence.SequenceRepository(jsondict)
+        if "SequenceVariant" == resource_type:
+            from . import sequence
+            return sequence.SequenceVariant(jsondict)
+        if "ServiceDefinition" == resource_type:
+            from . import servicedefinition
+            return servicedefinition.ServiceDefinition(jsondict)
+        if "Signature" == resource_type:
+            from . import signature
+            return signature.Signature(jsondict)
+        if "Slot" == resource_type:
+            from . import slot
+            return slot.Slot(jsondict)
+        if "Specimen" == resource_type:
+            from . import specimen
+            return specimen.Specimen(jsondict)
+        if "SpecimenCollection" == resource_type:
+            from . import specimen
+            return specimen.SpecimenCollection(jsondict)
+        if "SpecimenContainer" == resource_type:
+            from . import specimen
+            return specimen.SpecimenContainer(jsondict)
+        if "SpecimenProcessing" == resource_type:
+            from . import specimen
+            return specimen.SpecimenProcessing(jsondict)
+        if "StructureDefinition" == resource_type:
+            from . import structuredefinition
+            return structuredefinition.StructureDefinition(jsondict)
+        if "StructureDefinitionDifferential" == resource_type:
+            from . import structuredefinition
+            return structuredefinition.StructureDefinitionDifferential(jsondict)
+        if "StructureDefinitionMapping" == resource_type:
+            from . import structuredefinition
+            return structuredefinition.StructureDefinitionMapping(jsondict)
+        if "StructureDefinitionSnapshot" == resource_type:
+            from . import structuredefinition
+            return structuredefinition.StructureDefinitionSnapshot(jsondict)
+        if "StructureMap" == resource_type:
+            from . import structuremap
+            return structuremap.StructureMap(jsondict)
+        if "StructureMapGroup" == resource_type:
+            from . import structuremap
+            return structuremap.StructureMapGroup(jsondict)
+        if "StructureMapGroupInput" == resource_type:
+            from . import structuremap
+            return structuremap.StructureMapGroupInput(jsondict)
+        if "StructureMapGroupRule" == resource_type:
+            from . import structuremap
+            return structuremap.StructureMapGroupRule(jsondict)
+        if "StructureMapGroupRuleDependent" == resource_type:
+            from . import structuremap
+            return structuremap.StructureMapGroupRuleDependent(jsondict)
+        if "StructureMapGroupRuleSource" == resource_type:
+            from . import structuremap
+            return structuremap.StructureMapGroupRuleSource(jsondict)
+        if "StructureMapGroupRuleTarget" == resource_type:
+            from . import structuremap
+            return structuremap.StructureMapGroupRuleTarget(jsondict)
+        if "StructureMapGroupRuleTargetParameter" == resource_type:
+            from . import structuremap
+            return structuremap.StructureMapGroupRuleTargetParameter(jsondict)
+        if "StructureMapStructure" == resource_type:
+            from . import structuremap
+            return structuremap.StructureMapStructure(jsondict)
+        if "Subscription" == resource_type:
+            from . import subscription
+            return subscription.Subscription(jsondict)
+        if "SubscriptionChannel" == resource_type:
+            from . import subscription
+            return subscription.SubscriptionChannel(jsondict)
+        if "Substance" == resource_type:
+            from . import substance
+            return substance.Substance(jsondict)
+        if "SubstanceIngredient" == resource_type:
+            from . import substance
+            return substance.SubstanceIngredient(jsondict)
+        if "SubstanceInstance" == resource_type:
+            from . import substance
+            return substance.SubstanceInstance(jsondict)
+        if "SupplyDelivery" == resource_type:
+            from . import supplydelivery
+            return supplydelivery.SupplyDelivery(jsondict)
+        if "SupplyDeliverySuppliedItem" == resource_type:
+            from . import supplydelivery
+            return supplydelivery.SupplyDeliverySuppliedItem(jsondict)
+        if "SupplyRequest" == resource_type:
+            from . import supplyrequest
+            return supplyrequest.SupplyRequest(jsondict)
+        if "SupplyRequestOrderedItem" == resource_type:
+            from . import supplyrequest
+            return supplyrequest.SupplyRequestOrderedItem(jsondict)
+        if "SupplyRequestRequester" == resource_type:
+            from . import supplyrequest
+            return supplyrequest.SupplyRequestRequester(jsondict)
+        if "Task" == resource_type:
+            from . import task
+            return task.Task(jsondict)
+        if "TaskInput" == resource_type:
+            from . import task
+            return task.TaskInput(jsondict)
+        if "TaskOutput" == resource_type:
+            from . import task
+            return task.TaskOutput(jsondict)
+        if "TaskRequester" == resource_type:
+            from . import task
+            return task.TaskRequester(jsondict)
+        if "TaskRestriction" == resource_type:
+            from . import task
+            return task.TaskRestriction(jsondict)
+        if "TestReport" == resource_type:
+            from . import testreport
+            return testreport.TestReport(jsondict)
+        if "TestReportParticipant" == resource_type:
+            from . import testreport
+            return testreport.TestReportParticipant(jsondict)
+        if "TestReportSetup" == resource_type:
+            from . import testreport
+            return testreport.TestReportSetup(jsondict)
+        if "TestReportSetupAction" == resource_type:
+            from . import testreport
+            return testreport.TestReportSetupAction(jsondict)
+        if "TestReportSetupActionAssert" == resource_type:
+            from . import testreport
+            return testreport.TestReportSetupActionAssert(jsondict)
+        if "TestReportSetupActionOperation" == resource_type:
+            from . import testreport
+            return testreport.TestReportSetupActionOperation(jsondict)
+        if "TestReportTeardown" == resource_type:
+            from . import testreport
+            return testreport.TestReportTeardown(jsondict)
+        if "TestReportTeardownAction" == resource_type:
+            from . import testreport
+            return testreport.TestReportTeardownAction(jsondict)
+        if "TestReportTest" == resource_type:
+            from . import testreport
+            return testreport.TestReportTest(jsondict)
+        if "TestReportTestAction" == resource_type:
+            from . import testreport
+            return testreport.TestReportTestAction(jsondict)
+        if "TestScript" == resource_type:
+            from . import testscript
+            return testscript.TestScript(jsondict)
+        if "TestScriptDestination" == resource_type:
+            from . import testscript
+            return testscript.TestScriptDestination(jsondict)
+        if "TestScriptFixture" == resource_type:
+            from . import testscript
+            return testscript.TestScriptFixture(jsondict)
+        if "TestScriptMetadata" == resource_type:
+            from . import testscript
+            return testscript.TestScriptMetadata(jsondict)
+        if "TestScriptMetadataCapability" == resource_type:
+            from . import testscript
+            return testscript.TestScriptMetadataCapability(jsondict)
+        if "TestScriptMetadataLink" == resource_type:
+            from . import testscript
+            return testscript.TestScriptMetadataLink(jsondict)
+        if "TestScriptOrigin" == resource_type:
+            from . import testscript
+            return testscript.TestScriptOrigin(jsondict)
+        if "TestScriptRule" == resource_type:
+            from . import testscript
+            return testscript.TestScriptRule(jsondict)
+        if "TestScriptRuleParam" == resource_type:
+            from . import testscript
+            return testscript.TestScriptRuleParam(jsondict)
+        if "TestScriptRuleset" == resource_type:
+            from . import testscript
+            return testscript.TestScriptRuleset(jsondict)
+        if "TestScriptRulesetRule" == resource_type:
+            from . import testscript
+            return testscript.TestScriptRulesetRule(jsondict)
+        if "TestScriptRulesetRuleParam" == resource_type:
+            from . import testscript
+            return testscript.TestScriptRulesetRuleParam(jsondict)
+        if "TestScriptSetup" == resource_type:
+            from . import testscript
+            return testscript.TestScriptSetup(jsondict)
+        if "TestScriptSetupAction" == resource_type:
+            from . import testscript
+            return testscript.TestScriptSetupAction(jsondict)
+        if "TestScriptSetupActionAssert" == resource_type:
+            from . import testscript
+            return testscript.TestScriptSetupActionAssert(jsondict)
+        if "TestScriptSetupActionAssertRule" == resource_type:
+            from . import testscript
+            return testscript.TestScriptSetupActionAssertRule(jsondict)
+        if "TestScriptSetupActionAssertRuleParam" == resource_type:
+            from . import testscript
+            return testscript.TestScriptSetupActionAssertRuleParam(jsondict)
+        if "TestScriptSetupActionAssertRuleset" == resource_type:
+            from . import testscript
+            return testscript.TestScriptSetupActionAssertRuleset(jsondict)
+        if "TestScriptSetupActionAssertRulesetRule" == resource_type:
+            from . import testscript
+            return testscript.TestScriptSetupActionAssertRulesetRule(jsondict)
+        if "TestScriptSetupActionAssertRulesetRuleParam" == resource_type:
+            from . import testscript
+            return testscript.TestScriptSetupActionAssertRulesetRuleParam(jsondict)
+        if "TestScriptSetupActionOperation" == resource_type:
+            from . import testscript
+            return testscript.TestScriptSetupActionOperation(jsondict)
+        if "TestScriptSetupActionOperationRequestHeader" == resource_type:
+            from . import testscript
+            return testscript.TestScriptSetupActionOperationRequestHeader(jsondict)
+        if "TestScriptTeardown" == resource_type:
+            from . import testscript
+            return testscript.TestScriptTeardown(jsondict)
+        if "TestScriptTeardownAction" == resource_type:
+            from . import testscript
+            return testscript.TestScriptTeardownAction(jsondict)
+        if "TestScriptTest" == resource_type:
+            from . import testscript
+            return testscript.TestScriptTest(jsondict)
+        if "TestScriptTestAction" == resource_type:
+            from . import testscript
+            return testscript.TestScriptTestAction(jsondict)
+        if "TestScriptVariable" == resource_type:
+            from . import testscript
+            return testscript.TestScriptVariable(jsondict)
+        if "Timing" == resource_type:
+            from . import timing
+            return timing.Timing(jsondict)
+        if "TimingRepeat" == resource_type:
+            from . import timing
+            return timing.TimingRepeat(jsondict)
+        if "TriggerDefinition" == resource_type:
+            from . import triggerdefinition
+            return triggerdefinition.TriggerDefinition(jsondict)
+        if "UsageContext" == resource_type:
+            from . import usagecontext
+            return usagecontext.UsageContext(jsondict)
+        if "ValueSet" == resource_type:
+            from . import valueset
+            return valueset.ValueSet(jsondict)
+        if "ValueSetCompose" == resource_type:
+            from . import valueset
+            return valueset.ValueSetCompose(jsondict)
+        if "ValueSetComposeInclude" == resource_type:
+            from . import valueset
+            return valueset.ValueSetComposeInclude(jsondict)
+        if "ValueSetComposeIncludeConcept" == resource_type:
+            from . import valueset
+            return valueset.ValueSetComposeIncludeConcept(jsondict)
+        if "ValueSetComposeIncludeConceptDesignation" == resource_type:
+            from . import valueset
+            return valueset.ValueSetComposeIncludeConceptDesignation(jsondict)
+        if "ValueSetComposeIncludeFilter" == resource_type:
+            from . import valueset
+            return valueset.ValueSetComposeIncludeFilter(jsondict)
+        if "ValueSetExpansion" == resource_type:
+            from . import valueset
+            return valueset.ValueSetExpansion(jsondict)
+        if "ValueSetExpansionContains" == resource_type:
+            from . import valueset
+            return valueset.ValueSetExpansionContains(jsondict)
+        if "ValueSetExpansionParameter" == resource_type:
+            from . import valueset
+            return valueset.ValueSetExpansionParameter(jsondict)
+        if "VisionPrescription" == resource_type:
+            from . import visionprescription
+            return visionprescription.VisionPrescription(jsondict)
+        if "VisionPrescriptionDispense" == resource_type:
+            from . import visionprescription
+            return visionprescription.VisionPrescriptionDispense(jsondict)
+        from . import element
+        return element.Element(jsondict)
diff --git a/fhirclient/models/fhirreference.py b/fhirclient/models/fhirreference.py
new file mode 100644
index 0000000..d389bdc
--- /dev/null
+++ b/fhirclient/models/fhirreference.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Subclassing FHIR's reference to add resolving capabilities
+
+import logging
+from . import reference
+
+logger = logging.getLogger(__name__)
+
+
+class FHIRReference(reference.Reference):
+    """ Subclassing FHIR's `Reference` resource to add resolving capabilities.
+    """
+    
+    def resolved(self, klass):
+        """ Resolves the reference and caches the result, returning instance(s)
+        of the referenced classes.
+        
+        :param klass: The expected class of the resource
+        :returns: An instance (or list thereof) of the resolved reference if
+            dereferencing was successful, `None` otherwise
+        """
+        owning_resource = self.owningResource()
+        if owning_resource is None:
+            raise Exception("Cannot resolve reference without having an owner (which must be a `DomainResource`)")
+        if klass is None:
+            raise Exception("Cannot resolve reference without knowing the class")
+        
+        refid = self.processedReferenceIdentifier()
+        if not refid:
+            logger.warning("No `reference` set, cannot resolve")
+            return None
+        
+        # already resolved and cached?
+        resolved = owning_resource.resolvedReference(refid)
+        if resolved is not None:
+            if isinstance(resolved, klass):
+                return resolved
+            logger.warning("Referenced resource {} is not a {} but a {}".format(refid, klass, resolved.__class__))
+            return None
+        
+        # not yet resolved, see if it's a contained resource
+        if owning_resource.contained is not None:
+            for contained in owning_resource.contained:
+                if contained.id == refid:
+                    owning_resource.didResolveReference(refid, contained)
+                    if isinstance(contained, klass):
+                        return contained
+                    logger.warning("Contained resource {} is not a {} but a {}".format(refid, klass, contained.__class__))
+                    return None
+        
+        # are we in a bundle?
+        ref_is_relative = '://' not in self.reference and 'urn:' != self.reference[:4]
+        bundle = self.owningBundle()
+        while bundle is not None:
+            if bundle.entry is not None:
+                fullUrl = self.reference
+                if ref_is_relative:
+                    base = bundle.server.base_uri if bundle.server else ''
+                    fullUrl = base + self.reference
+                
+                for entry in bundle.entry:
+                    if entry.fullUrl == fullUrl:
+                        found = entry.resource
+                        if isinstance(found, klass):
+                            return found
+                        logger.warning("Bundled resource {} is not a {} but a {}".format(refid, klass, found.__class__))
+                        return None
+            bundle = bundle.owningBundle()
+        
+        # relative references, use the same server
+        server = None
+        if ref_is_relative:
+            server = owning_resource.server if owning_resource else None
+        
+        # TODO: instantiate server for absolute resource
+        if server is None:
+            logger.warning("Not implemented: resolving absolute reference to resource {}"
+                .format(self.reference))
+            return None
+        
+        # fetch remote resource; unable to verify klass since we use klass.read_from()
+        relative = klass.read_from(self.reference, server)
+        owning_resource.didResolveReference(refid, relative)
+        return relative
+    
+    def processedReferenceIdentifier(self):
+        """ Normalizes the reference-id.
+        """
+        if self.reference and '#' == self.reference[0]:
+            return self.reference[1:]
+        return self.reference
+
diff --git a/fhirclient/models/fhirsearch.py b/fhirclient/models/fhirsearch.py
new file mode 100644
index 0000000..1fc5108
--- /dev/null
+++ b/fhirclient/models/fhirsearch.py
@@ -0,0 +1,270 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Create FHIR search params from NoSQL-like query structures.
+#  2014, SMART Health IT.
+
+try:
+    from urllib import quote_plus
+except Exception as e:
+    from urllib.parse import quote_plus
+
+
+class FHIRSearch(object):
+    """ Create a FHIR search from NoSQL-like query structures.
+    """
+    
+    def __init__(self, resource_type, struct=None):
+        self.resource_type = resource_type
+        """ The resource type class. """
+        
+        self.params = []
+        """ FHIRSearchParam instances. """
+        
+        self.wants_expand = False
+        """ Used internally; whether or not `params` must be expanded first. """
+        
+        if struct is not None:
+            if dict != type(struct):
+                raise Exception("Must pass a Python dictionary, but got a {}".format(type(struct)))
+            self.wants_expand = True
+            for key, val in struct.items():
+                self.params.append(FHIRSearchParam(key, val))
+    
+    
+    # MARK: Execution
+    
+    def construct(self):
+        """ Constructs the URL with query string from the receiver's params.
+        """
+        if self.resource_type is None:
+            raise Exception("Need resource_type set to construct a search query")
+        
+        parts = []
+        if self.params is not None:
+            for param in self.params:
+                if self.wants_expand:
+                    for expanded in param.handle():
+                        parts.append(expanded.as_parameter())
+                else:
+                    parts.append(param.as_parameter())
+        
+        return '{}?{}'.format(self.resource_type.resource_type, '&'.join(parts))
+    
+    def perform(self, server):
+        """ Construct the search URL and execute it against the given server.
+        
+        :param server: The server against which to perform the search
+        :returns: A Bundle resource
+        """
+        if server is None:
+            raise Exception("Need a server to perform search")
+        
+        from . import bundle
+        res = server.request_json(self.construct())
+        bundle = bundle.Bundle(res)
+        bundle._server = server
+        return bundle
+    
+    def perform_resources(self, server):
+        """ Performs the search by calling `perform`, then extracts all Bundle
+        entries and returns a list of Resource instances.
+        
+        :param server: The server against which to perform the search
+        :returns: A list of Resource instances
+        """
+        bundle = self.perform(server)
+        resources = []
+        if bundle is not None and bundle.entry is not None:
+            for entry in bundle.entry:
+                resources.append(entry.resource)
+            
+        return resources
+
+
+class FHIRSearchParam(object):
+    """ Holds one search parameter.
+    
+    The instance's `value` can either be a string value or a search construct
+    dictionary. In the latter case the class's `handle` method must be called
+    to arrive at search parameter instances that can be converted into a URL
+    query.
+    """
+    
+    def __init__(self, name, value):
+        self.name = name
+        self.value = value
+    
+    def copy(self):
+        clone = object.__new__(self.__class__)
+        clone.__dict__ = self.__dict__.copy()
+        return clone
+    
+    def handle(self):
+        """ Parses the receiver's value and returns a list of FHIRSearchParam
+        instances. Needs only be called if the param needs to be handled, i.e.
+        its value is a query structure.
+        
+        :returns: A list with one or more FHIRSearchParam instances, not
+        altering the receiver
+        """
+        handler = FHIRSearchParamHandler.handler_for(self.name)(None, self.value)
+        return handler.handle(self.copy())
+    
+    def as_parameter(self):
+        """ Return a string that represents the reciever as "key=value".
+        """
+        return '{}={}'.format(self.name, quote_plus(self.value, safe=',<=>'))
+
+
+class FHIRSearchParamHandler(object):
+    handles = None
+    handlers = []
+    
+    @classmethod
+    def announce_handler(cls, handler):
+        cls.handlers.append(handler)
+    
+    @classmethod
+    def handler_for(cls, key):
+        for handler in cls.handlers:
+            if handler.can_handle(key):
+                return handler
+        return cls
+    
+    @classmethod
+    def can_handle(cls, key):
+        if cls.handles is not None:
+            return key in cls.handles
+        return True         # base class handles everything else, so be sure to test it last!
+    
+    
+    def __init__(self, key, value):
+        self.key = key
+        self.value = value
+        self.modifier = []
+        self.multiplier = []
+    
+    def handle(self, param):
+        """ Applies all handlers to the given search parameter.
+        :returns: A list of one or more new `FHIRSearchParam` instances
+        """
+        self.prepare()
+        return self.expand(param)
+    
+    def prepare(self, parent=None):
+        """ Creates sub-handlers as needed, then prepares the receiver.
+        """
+        if dict == type(self.value):
+            for key, val in self.value.items():
+                handler = FHIRSearchParamHandler.handler_for(key)(key, val)
+                handler.prepare(self)
+        
+        if parent is not None:
+            parent.multiplier.append(self)
+    
+    def expand(self, param):
+        """ Executes the receiver's modifier and multiplier on itself, applying
+        changes to the given search param instance.
+        
+        :returns: A list of one or more FHIRSearchParam instances
+        """
+        for handler in self.modifier:
+            handler.expand(param)
+        
+        self.apply(param)
+        
+        # if we have multiplier, expand sequentially
+        if len(self.multiplier) > 0:
+            expanded = []
+            for handler in self.multiplier:
+                clone = param.copy()
+                expanded.extend(handler.expand(clone))
+            
+            return expanded
+        
+        # no multiplier, just return the passed-in paramater
+        return [param]
+    
+    def apply(self, param):
+        if self.key is not None:
+            param.name = '{}.{}'.format(param.name, self.key)
+        if 0 == len(self.multiplier):
+            param.value = self.value
+
+
+class FHIRSearchParamModifierHandler(FHIRSearchParamHandler):
+    modifiers = {
+        '$asc': ':asc',
+        '$desc': ':desc',
+        '$exact': ':exact',
+        '$missing': ':missing',
+        '$null': ':missing',
+        '$text': ':text',
+    }
+    handles = modifiers.keys()
+    
+    def apply(self, param):
+        if self.key not in self.__class__.modifiers:
+            raise Exception('Unknown modifier "{}" for "{}"'.format(self.key, param.name))
+        param.name += self.__class__.modifiers[self.key]
+        param.value = self.value
+
+
+class FHIRSearchParamOperatorHandler(FHIRSearchParamHandler):
+    operators = {
+        '$gt': '>',
+        '$lt': '<',
+        '$lte': '<=',
+        '$gte': '>=',
+    }
+    handles = operators.keys()
+    
+    def apply(self, param):
+        if self.key not in self.__class__.operators:
+            raise Exception('Unknown operator "{}" for "{}"'.format(self.key, parent.name))
+        param.value = self.__class__.operators[self.key] + self.value
+
+
+class FHIRSearchParamMultiHandler(FHIRSearchParamHandler):
+    handles = ['$and', '$or']
+    
+    def prepare(self, parent):
+        if list != type(self.value):
+            raise Exception('Expecting a list argument for "{}" but got {}'.format(parent.key, self.value))
+        
+        handlers = []
+        for val in self.value:
+            if dict == type(val):
+                for kkey, vval in val.items():
+                    handlers.append(FHIRSearchParamHandler.handler_for(kkey)(kkey, vval))
+            else:
+                handlers.append(FHIRSearchParamHandler.handler_for(parent.key)(None, val))
+        
+        if '$and' == self.key:
+            for handler in handlers:
+                handler.prepare(parent)
+        elif '$or' == self.key:
+            ors = [h.value for h in handlers]
+            handler = FHIRSearchParamHandler.handler_for(parent.key)(None, ','.join(ors))
+            handler.prepare(parent)
+        else:
+            raise Exception('I cannot handle "{}"'.format(self.key))
+
+
+class FHIRSearchParamTypeHandler(FHIRSearchParamHandler):
+    handles = ['$type']
+    
+    def prepare(self, parent):
+        parent.modifier.append(self)
+    
+    def apply(self, param):
+        param.name = '{}:{}'.format(param.name, self.value)
+    
+
+# announce all handlers
+FHIRSearchParamHandler.announce_handler(FHIRSearchParamModifierHandler)
+FHIRSearchParamHandler.announce_handler(FHIRSearchParamOperatorHandler)
+FHIRSearchParamHandler.announce_handler(FHIRSearchParamMultiHandler)
+FHIRSearchParamHandler.announce_handler(FHIRSearchParamTypeHandler)
+
diff --git a/fhirclient/models/flag.py b/fhirclient/models/flag.py
new file mode 100644
index 0000000..bf0864f
--- /dev/null
+++ b/fhirclient/models/flag.py
@@ -0,0 +1,92 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Flag) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Flag(domainresource.DomainResource):
+    """ Key information to flag to healthcare providers.
+    
+    Prospective warnings of potential issues when providing care to the
+    patient.
+    """
+    
+    resource_type = "Flag"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.author = None
+        """ Flag creator.
+        Type `FHIRReference` referencing `Device, Organization, Patient, Practitioner` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Clinical, administrative, etc..
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Coded or textual message to display to user.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.encounter = None
+        """ Alert relevant during encounter.
+        Type `FHIRReference` referencing `Encounter` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Time period when flag is active.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | inactive | entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who/What is flag about?.
+        Type `FHIRReference` referencing `Patient, Location, Group, Organization, Practitioner, PlanDefinition, Medication, Procedure` (represented as `dict` in JSON). """
+        
+        super(Flag, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Flag, self).elementProperties()
+        js.extend([
+            ("author", "author", fhirreference.FHIRReference, False, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("encounter", "encounter", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/flag_tests.py b/fhirclient/models/flag_tests.py
new file mode 100644
index 0000000..600752f
--- /dev/null
+++ b/fhirclient/models/flag_tests.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import flag
+from .fhirdate import FHIRDate
+
+
+class FlagTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Flag", js["resourceType"])
+        return flag.Flag(js)
+    
+    def testFlag1(self):
+        inst = self.instantiate_from("flag-example-encounter.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Flag instance")
+        self.implFlag1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Flag", js["resourceType"])
+        inst2 = flag.Flag(js)
+        self.implFlag1(inst2)
+    
+    def implFlag1(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "infection")
+        self.assertEqual(inst.category.coding[0].display, "Infection Control Level")
+        self.assertEqual(inst.category.coding[0].system, "http://example.org/local")
+        self.assertEqual(inst.code.coding[0].code, "l3")
+        self.assertEqual(inst.code.coding[0].display, "Follow Level 3 Protocol")
+        self.assertEqual(inst.code.coding[0].system, "http://example.org/local/if1")
+        self.assertEqual(inst.id, "example-encounter")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Follow Infection Control Level 3 Protocol</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testFlag2(self):
+        inst = self.instantiate_from("flag-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Flag instance")
+        self.implFlag2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Flag", js["resourceType"])
+        inst2 = flag.Flag(js)
+        self.implFlag2(inst2)
+    
+    def implFlag2(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "admin")
+        self.assertEqual(inst.category.coding[0].display, "Admin")
+        self.assertEqual(inst.category.coding[0].system, "http://example.org/local")
+        self.assertEqual(inst.category.text, "admin")
+        self.assertEqual(inst.code.coding[0].code, "bigdog")
+        self.assertEqual(inst.code.coding[0].display, "Big dog")
+        self.assertEqual(inst.code.coding[0].system, "http://example.org/local")
+        self.assertEqual(inst.code.text, "Patient has a big dog at his home. Always always wear a suit of armor or take other active counter-measures")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.period.end.date, FHIRDate("2016-12-01").date)
+        self.assertEqual(inst.period.end.as_json(), "2016-12-01")
+        self.assertEqual(inst.period.start.date, FHIRDate("2015-01-17").date)
+        self.assertEqual(inst.period.start.as_json(), "2015-01-17")
+        self.assertEqual(inst.status, "inactive")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Large Dog warning for Peter Patient</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/goal.py b/fhirclient/models/goal.py
new file mode 100644
index 0000000..7a8c404
--- /dev/null
+++ b/fhirclient/models/goal.py
@@ -0,0 +1,209 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Goal) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Goal(domainresource.DomainResource):
+    """ Describes the intended objective(s) for a patient, group or organization.
+    
+    Describes the intended objective(s) for a patient, group or organization
+    care, for example, weight loss, restoring an activity of daily living,
+    obtaining herd immunity via immunization, meeting a process improvement
+    objective, etc.
+    """
+    
+    resource_type = "Goal"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.addresses = None
+        """ Issues addressed by this goal.
+        List of `FHIRReference` items referencing `Condition, Observation, MedicationStatement, NutritionOrder, ProcedureRequest, RiskAssessment` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ E.g. Treatment, dietary, behavioral, etc..
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Code or text describing goal.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.expressedBy = None
+        """ Who's responsible for creating Goal?.
+        Type `FHIRReference` referencing `Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External Ids for this goal.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Comments about the goal.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.outcomeCode = None
+        """ What result was achieved regarding the goal?.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.outcomeReference = None
+        """ Observation that resulted from goal.
+        List of `FHIRReference` items referencing `Observation` (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ high-priority | medium-priority | low-priority.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.startCodeableConcept = None
+        """ When goal pursuit begins.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.startDate = None
+        """ When goal pursuit begins.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.status = None
+        """ proposed | accepted | planned | in-progress | on-target | ahead-of-
+        target | behind-target | sustaining | achieved | on-hold |
+        cancelled | entered-in-error | rejected.
+        Type `str`. """
+        
+        self.statusDate = None
+        """ When goal status took effect.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.statusReason = None
+        """ Reason for current status.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who this goal is intended for.
+        Type `FHIRReference` referencing `Patient, Group, Organization` (represented as `dict` in JSON). """
+        
+        self.target = None
+        """ Target outcome for the goal.
+        Type `GoalTarget` (represented as `dict` in JSON). """
+        
+        super(Goal, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Goal, self).elementProperties()
+        js.extend([
+            ("addresses", "addresses", fhirreference.FHIRReference, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("description", "description", codeableconcept.CodeableConcept, False, None, True),
+            ("expressedBy", "expressedBy", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("outcomeCode", "outcomeCode", codeableconcept.CodeableConcept, True, None, False),
+            ("outcomeReference", "outcomeReference", fhirreference.FHIRReference, True, None, False),
+            ("priority", "priority", codeableconcept.CodeableConcept, False, None, False),
+            ("startCodeableConcept", "startCodeableConcept", codeableconcept.CodeableConcept, False, "start", False),
+            ("startDate", "startDate", fhirdate.FHIRDate, False, "start", False),
+            ("status", "status", str, False, None, True),
+            ("statusDate", "statusDate", fhirdate.FHIRDate, False, None, False),
+            ("statusReason", "statusReason", str, False, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("target", "target", GoalTarget, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class GoalTarget(backboneelement.BackboneElement):
+    """ Target outcome for the goal.
+    
+    Indicates what should be done by when.
+    """
+    
+    resource_type = "GoalTarget"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.detailCodeableConcept = None
+        """ The target value to be achieved.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.detailQuantity = None
+        """ The target value to be achieved.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.detailRange = None
+        """ The target value to be achieved.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.dueDate = None
+        """ Reach goal on or before.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.dueDuration = None
+        """ Reach goal on or before.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.measure = None
+        """ The parameter whose value is being tracked.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(GoalTarget, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(GoalTarget, self).elementProperties()
+        js.extend([
+            ("detailCodeableConcept", "detailCodeableConcept", codeableconcept.CodeableConcept, False, "detail", False),
+            ("detailQuantity", "detailQuantity", quantity.Quantity, False, "detail", False),
+            ("detailRange", "detailRange", range.Range, False, "detail", False),
+            ("dueDate", "dueDate", fhirdate.FHIRDate, False, "due", False),
+            ("dueDuration", "dueDuration", duration.Duration, False, "due", False),
+            ("measure", "measure", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
diff --git a/fhirclient/models/goal_tests.py b/fhirclient/models/goal_tests.py
new file mode 100644
index 0000000..de47f5b
--- /dev/null
+++ b/fhirclient/models/goal_tests.py
@@ -0,0 +1,87 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import goal
+from .fhirdate import FHIRDate
+
+
+class GoalTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Goal", js["resourceType"])
+        return goal.Goal(js)
+    
+    def testGoal1(self):
+        inst = self.instantiate_from("goal-example-stop-smoking.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Goal instance")
+        self.implGoal1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Goal", js["resourceType"])
+        inst2 = goal.Goal(js)
+        self.implGoal1(inst2)
+    
+    def implGoal1(self, inst):
+        self.assertEqual(inst.description.text, "Stop smoking")
+        self.assertEqual(inst.id, "stop-smoking")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.outcomeCode[0].coding[0].code, "8517006")
+        self.assertEqual(inst.outcomeCode[0].coding[0].display, "Ex-smoker (finding)")
+        self.assertEqual(inst.outcomeCode[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.outcomeCode[0].text, "Former smoker")
+        self.assertEqual(inst.startDate.date, FHIRDate("2015-04-05").date)
+        self.assertEqual(inst.startDate.as_json(), "2015-04-05")
+        self.assertEqual(inst.status, "achieved")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testGoal2(self):
+        inst = self.instantiate_from("goal-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Goal instance")
+        self.implGoal2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Goal", js["resourceType"])
+        inst2 = goal.Goal(js)
+        self.implGoal2(inst2)
+    
+    def implGoal2(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "dietary")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/goal-category")
+        self.assertEqual(inst.description.text, "Target weight is 160 to 180 lbs.")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.priority.coding[0].code, "high-priority")
+        self.assertEqual(inst.priority.coding[0].display, "High Priority")
+        self.assertEqual(inst.priority.coding[0].system, "http://hl7.org/fhir/goal-priority")
+        self.assertEqual(inst.priority.text, "high")
+        self.assertEqual(inst.startDate.date, FHIRDate("2015-04-05").date)
+        self.assertEqual(inst.startDate.as_json(), "2015-04-05")
+        self.assertEqual(inst.status, "on-hold")
+        self.assertEqual(inst.statusDate.date, FHIRDate("2016-02-14").date)
+        self.assertEqual(inst.statusDate.as_json(), "2016-02-14")
+        self.assertEqual(inst.statusReason, "Patient wants to defer weight loss until after honeymoon.")
+        self.assertEqual(inst.target.detailRange.high.code, "[lb_av]")
+        self.assertEqual(inst.target.detailRange.high.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.target.detailRange.high.unit, "lbs")
+        self.assertEqual(inst.target.detailRange.high.value, 180)
+        self.assertEqual(inst.target.detailRange.low.code, "[lb_av]")
+        self.assertEqual(inst.target.detailRange.low.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.target.detailRange.low.unit, "lbs")
+        self.assertEqual(inst.target.detailRange.low.value, 160)
+        self.assertEqual(inst.target.dueDate.date, FHIRDate("2016-04-05").date)
+        self.assertEqual(inst.target.dueDate.as_json(), "2016-04-05")
+        self.assertEqual(inst.target.measure.coding[0].code, "3141-9")
+        self.assertEqual(inst.target.measure.coding[0].display, "Weight Measured")
+        self.assertEqual(inst.target.measure.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.text.status, "additional")
+
diff --git a/fhirclient/models/graphdefinition.py b/fhirclient/models/graphdefinition.py
new file mode 100644
index 0000000..539ea04
--- /dev/null
+++ b/fhirclient/models/graphdefinition.py
@@ -0,0 +1,269 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/GraphDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class GraphDefinition(domainresource.DomainResource):
+    """ Definition of an graph of resources.
+    
+    A formal computable definition of a graph of resources - that is, a
+    coherent set of resources that form a graph by following references. The
+    Graph Definition resource defines a set and makes rules about the set.
+    """
+    
+    resource_type = "GraphDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the graph definition.
+        Type `str`. """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for graph definition (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.link = None
+        """ Links this graph makes rules about.
+        List of `GraphDefinitionLink` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this graph definition (computer friendly).
+        Type `str`. """
+        
+        self.profile = None
+        """ Profile on base resource.
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this graph definition is defined.
+        Type `str`. """
+        
+        self.start = None
+        """ Type of resource at which the graph starts.
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this graph definition (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the graph definition.
+        Type `str`. """
+        
+        super(GraphDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(GraphDefinition, self).elementProperties()
+        js.extend([
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("link", "link", GraphDefinitionLink, True, None, False),
+            ("name", "name", str, False, None, True),
+            ("profile", "profile", str, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("start", "start", str, False, None, True),
+            ("status", "status", str, False, None, True),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class GraphDefinitionLink(backboneelement.BackboneElement):
+    """ Links this graph makes rules about.
+    """
+    
+    resource_type = "GraphDefinitionLink"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Why this link is specified.
+        Type `str`. """
+        
+        self.max = None
+        """ Maximum occurrences for this link.
+        Type `str`. """
+        
+        self.min = None
+        """ Minimum occurrences for this link.
+        Type `int`. """
+        
+        self.path = None
+        """ Path in the resource that contains the link.
+        Type `str`. """
+        
+        self.sliceName = None
+        """ Which slice (if profiled).
+        Type `str`. """
+        
+        self.target = None
+        """ Potential target for the link.
+        List of `GraphDefinitionLinkTarget` items (represented as `dict` in JSON). """
+        
+        super(GraphDefinitionLink, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(GraphDefinitionLink, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("max", "max", str, False, None, False),
+            ("min", "min", int, False, None, False),
+            ("path", "path", str, False, None, True),
+            ("sliceName", "sliceName", str, False, None, False),
+            ("target", "target", GraphDefinitionLinkTarget, True, None, True),
+        ])
+        return js
+
+
+class GraphDefinitionLinkTarget(backboneelement.BackboneElement):
+    """ Potential target for the link.
+    """
+    
+    resource_type = "GraphDefinitionLinkTarget"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.compartment = None
+        """ Compartment Consistency Rules.
+        List of `GraphDefinitionLinkTargetCompartment` items (represented as `dict` in JSON). """
+        
+        self.link = None
+        """ Additional links from target resource.
+        List of `GraphDefinitionLink` items (represented as `dict` in JSON). """
+        
+        self.profile = None
+        """ Profile for the target resource.
+        Type `str`. """
+        
+        self.type = None
+        """ Type of resource this link refers to.
+        Type `str`. """
+        
+        super(GraphDefinitionLinkTarget, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(GraphDefinitionLinkTarget, self).elementProperties()
+        js.extend([
+            ("compartment", "compartment", GraphDefinitionLinkTargetCompartment, True, None, False),
+            ("link", "link", GraphDefinitionLink, True, None, False),
+            ("profile", "profile", str, False, None, False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+class GraphDefinitionLinkTargetCompartment(backboneelement.BackboneElement):
+    """ Compartment Consistency Rules.
+    """
+    
+    resource_type = "GraphDefinitionLinkTargetCompartment"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Identifies the compartment.
+        Type `str`. """
+        
+        self.description = None
+        """ Documentation for FHIRPath expression.
+        Type `str`. """
+        
+        self.expression = None
+        """ Custom rule, as a FHIRPath expression.
+        Type `str`. """
+        
+        self.rule = None
+        """ identical | matching | different | custom.
+        Type `str`. """
+        
+        super(GraphDefinitionLinkTargetCompartment, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(GraphDefinitionLinkTargetCompartment, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("expression", "expression", str, False, None, False),
+            ("rule", "rule", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/graphdefinition_tests.py b/fhirclient/models/graphdefinition_tests.py
new file mode 100644
index 0000000..3ffd428
--- /dev/null
+++ b/fhirclient/models/graphdefinition_tests.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import graphdefinition
+from .fhirdate import FHIRDate
+
+
+class GraphDefinitionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("GraphDefinition", js["resourceType"])
+        return graphdefinition.GraphDefinition(js)
+    
+    def testGraphDefinition1(self):
+        inst = self.instantiate_from("graphdefinition-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a GraphDefinition instance")
+        self.implGraphDefinition1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("GraphDefinition", js["resourceType"])
+        inst2 = graphdefinition.GraphDefinition(js)
+        self.implGraphDefinition1(inst2)
+    
+    def implGraphDefinition1(self, inst):
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.date.date, FHIRDate("2015-08-04").date)
+        self.assertEqual(inst.date.as_json(), "2015-08-04")
+        self.assertEqual(inst.description, "Specify to include list references when generating a document using the $document operation")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.link[0].description, "Link to List")
+        self.assertEqual(inst.link[0].path, "Composition.section.entry")
+        self.assertEqual(inst.link[0].target[0].compartment[0].code, "Patient")
+        self.assertEqual(inst.link[0].target[0].compartment[0].rule, "identical")
+        self.assertEqual(inst.link[0].target[0].link[0].description, "Include any list entries")
+        self.assertEqual(inst.link[0].target[0].link[0].path, "List.entry.item")
+        self.assertEqual(inst.link[0].target[0].link[0].target[0].compartment[0].code, "Patient")
+        self.assertEqual(inst.link[0].target[0].link[0].target[0].compartment[0].rule, "identical")
+        self.assertEqual(inst.link[0].target[0].link[0].target[0].type, "Resource")
+        self.assertEqual(inst.link[0].target[0].type, "List")
+        self.assertEqual(inst.name, "Document Generation Template")
+        self.assertEqual(inst.publisher, "FHIR Project")
+        self.assertEqual(inst.start, "Composition")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://h7.org/fhir/GraphDefinition/example")
+
diff --git a/fhirclient/models/group.py b/fhirclient/models/group.py
new file mode 100644
index 0000000..174d284
--- /dev/null
+++ b/fhirclient/models/group.py
@@ -0,0 +1,209 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Group) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Group(domainresource.DomainResource):
+    """ Group of multiple entities.
+    
+    Represents a defined collection of entities that may be discussed or acted
+    upon collectively but which are not expected to act collectively and are
+    not formally or legally recognized; i.e. a collection of entities that
+    isn't an Organization.
+    """
+    
+    resource_type = "Group"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Whether this group's record is in active use.
+        Type `bool`. """
+        
+        self.actual = None
+        """ Descriptive or actual.
+        Type `bool`. """
+        
+        self.characteristic = None
+        """ Trait of group members.
+        List of `GroupCharacteristic` items (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Kind of Group members.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Unique id.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.member = None
+        """ Who or what is in group.
+        List of `GroupMember` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Label for Group.
+        Type `str`. """
+        
+        self.quantity = None
+        """ Number of members.
+        Type `int`. """
+        
+        self.type = None
+        """ person | animal | practitioner | device | medication | substance.
+        Type `str`. """
+        
+        super(Group, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Group, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("actual", "actual", bool, False, None, True),
+            ("characteristic", "characteristic", GroupCharacteristic, True, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("member", "member", GroupMember, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("quantity", "quantity", int, False, None, False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class GroupCharacteristic(backboneelement.BackboneElement):
+    """ Trait of group members.
+    
+    Identifies the traits shared by members of the group.
+    """
+    
+    resource_type = "GroupCharacteristic"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Kind of characteristic.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.exclude = None
+        """ Group includes or excludes.
+        Type `bool`. """
+        
+        self.period = None
+        """ Period over which characteristic is tested.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.valueBoolean = None
+        """ Value held by characteristic.
+        Type `bool`. """
+        
+        self.valueCodeableConcept = None
+        """ Value held by characteristic.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueQuantity = None
+        """ Value held by characteristic.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueRange = None
+        """ Value held by characteristic.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        super(GroupCharacteristic, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(GroupCharacteristic, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("exclude", "exclude", bool, False, None, True),
+            ("period", "period", period.Period, False, None, False),
+            ("valueBoolean", "valueBoolean", bool, False, "value", True),
+            ("valueCodeableConcept", "valueCodeableConcept", codeableconcept.CodeableConcept, False, "value", True),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", True),
+            ("valueRange", "valueRange", range.Range, False, "value", True),
+        ])
+        return js
+
+
+class GroupMember(backboneelement.BackboneElement):
+    """ Who or what is in group.
+    
+    Identifies the resource instances that are members of the group.
+    """
+    
+    resource_type = "GroupMember"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.entity = None
+        """ Reference to the group member.
+        Type `FHIRReference` referencing `Patient, Practitioner, Device, Medication, Substance` (represented as `dict` in JSON). """
+        
+        self.inactive = None
+        """ If member is no longer in group.
+        Type `bool`. """
+        
+        self.period = None
+        """ Period member belonged to the group.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(GroupMember, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(GroupMember, self).elementProperties()
+        js.extend([
+            ("entity", "entity", fhirreference.FHIRReference, False, None, True),
+            ("inactive", "inactive", bool, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
diff --git a/fhirclient/models/group_tests.py b/fhirclient/models/group_tests.py
new file mode 100644
index 0000000..03f08f8
--- /dev/null
+++ b/fhirclient/models/group_tests.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import group
+from .fhirdate import FHIRDate
+
+
+class GroupTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Group", js["resourceType"])
+        return group.Group(js)
+    
+    def testGroup1(self):
+        inst = self.instantiate_from("group-example-member.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Group instance")
+        self.implGroup1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Group", js["resourceType"])
+        inst2 = group.Group(js)
+        self.implGroup1(inst2)
+    
+    def implGroup1(self, inst):
+        self.assertTrue(inst.actual)
+        self.assertEqual(inst.id, "102")
+        self.assertEqual(inst.member[0].period.start.date, FHIRDate("2014-10-08").date)
+        self.assertEqual(inst.member[0].period.start.as_json(), "2014-10-08")
+        self.assertTrue(inst.member[1].inactive)
+        self.assertEqual(inst.member[1].period.start.date, FHIRDate("2015-04-02").date)
+        self.assertEqual(inst.member[1].period.start.as_json(), "2015-04-02")
+        self.assertEqual(inst.member[2].period.start.date, FHIRDate("2015-08-06").date)
+        self.assertEqual(inst.member[2].period.start.as_json(), "2015-08-06")
+        self.assertEqual(inst.member[3].period.start.date, FHIRDate("2015-08-06").date)
+        self.assertEqual(inst.member[3].period.start.as_json(), "2015-08-06")
+        self.assertEqual(inst.text.status, "additional")
+        self.assertEqual(inst.type, "person")
+    
+    def testGroup2(self):
+        inst = self.instantiate_from("group-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Group instance")
+        self.implGroup2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Group", js["resourceType"])
+        inst2 = group.Group(js)
+        self.implGroup2(inst2)
+    
+    def implGroup2(self, inst):
+        self.assertTrue(inst.actual)
+        self.assertEqual(inst.characteristic[0].code.text, "gender")
+        self.assertFalse(inst.characteristic[0].exclude)
+        self.assertEqual(inst.characteristic[0].valueCodeableConcept.text, "mixed")
+        self.assertEqual(inst.characteristic[1].code.text, "owner")
+        self.assertFalse(inst.characteristic[1].exclude)
+        self.assertEqual(inst.characteristic[1].valueCodeableConcept.text, "John Smith")
+        self.assertEqual(inst.code.text, "Horse")
+        self.assertEqual(inst.id, "101")
+        self.assertEqual(inst.identifier[0].system, "http://someveterinarianclinic.org/fhir/NamingSystem/herds")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.name, "John's herd")
+        self.assertEqual(inst.quantity, 25)
+        self.assertEqual(inst.text.status, "additional")
+        self.assertEqual(inst.type, "animal")
+
diff --git a/fhirclient/models/guidanceresponse.py b/fhirclient/models/guidanceresponse.py
new file mode 100644
index 0000000..1c8633e
--- /dev/null
+++ b/fhirclient/models/guidanceresponse.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/GuidanceResponse) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class GuidanceResponse(domainresource.DomainResource):
+    """ The formal response to a guidance request.
+    
+    A guidance response is the formal response to a guidance request, including
+    any output parameters returned by the evaluation, as well as the
+    description of any proposed actions to be taken.
+    """
+    
+    resource_type = "GuidanceResponse"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.context = None
+        """ Encounter or Episode during which the response was returned.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.dataRequirement = None
+        """ Additional required data.
+        List of `DataRequirement` items (represented as `dict` in JSON). """
+        
+        self.evaluationMessage = None
+        """ Messages resulting from the evaluation of the artifact or artifacts.
+        List of `FHIRReference` items referencing `OperationOutcome` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.module = None
+        """ A reference to a knowledge module.
+        Type `FHIRReference` referencing `ServiceDefinition` (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Additional notes about the response.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.occurrenceDateTime = None
+        """ When the guidance response was processed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.outputParameters = None
+        """ The output parameters of the evaluation, if any.
+        Type `FHIRReference` referencing `Parameters` (represented as `dict` in JSON). """
+        
+        self.performer = None
+        """ Device returning the guidance.
+        Type `FHIRReference` referencing `Device` (represented as `dict` in JSON). """
+        
+        self.reasonCodeableConcept = None
+        """ Reason for the response.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Reason for the response.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.requestId = None
+        """ The id of the request associated with this response, if any.
+        Type `str`. """
+        
+        self.result = None
+        """ Proposed actions, if any.
+        Type `FHIRReference` referencing `CarePlan, RequestGroup` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ success | data-requested | data-required | in-progress | failure |
+        entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ Patient the request was performed for.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        super(GuidanceResponse, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(GuidanceResponse, self).elementProperties()
+        js.extend([
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("dataRequirement", "dataRequirement", datarequirement.DataRequirement, True, None, False),
+            ("evaluationMessage", "evaluationMessage", fhirreference.FHIRReference, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("module", "module", fhirreference.FHIRReference, False, None, True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("occurrenceDateTime", "occurrenceDateTime", fhirdate.FHIRDate, False, None, False),
+            ("outputParameters", "outputParameters", fhirreference.FHIRReference, False, None, False),
+            ("performer", "performer", fhirreference.FHIRReference, False, None, False),
+            ("reasonCodeableConcept", "reasonCodeableConcept", codeableconcept.CodeableConcept, False, "reason", False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, False, "reason", False),
+            ("requestId", "requestId", str, False, None, False),
+            ("result", "result", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import datarequirement
+except ImportError:
+    datarequirement = sys.modules[__package__ + '.datarequirement']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/guidanceresponse_tests.py b/fhirclient/models/guidanceresponse_tests.py
new file mode 100644
index 0000000..3d19be7
--- /dev/null
+++ b/fhirclient/models/guidanceresponse_tests.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import guidanceresponse
+from .fhirdate import FHIRDate
+
+
+class GuidanceResponseTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("GuidanceResponse", js["resourceType"])
+        return guidanceresponse.GuidanceResponse(js)
+    
+    def testGuidanceResponse1(self):
+        inst = self.instantiate_from("guidanceresponse-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a GuidanceResponse instance")
+        self.implGuidanceResponse1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("GuidanceResponse", js["resourceType"])
+        inst2 = guidanceresponse.GuidanceResponse(js)
+        self.implGuidanceResponse1(inst2)
+    
+    def implGuidanceResponse1(self, inst):
+        self.assertEqual(inst.contained[0].id, "outputParameters1")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier.system, "http://example.org")
+        self.assertEqual(inst.identifier.value, "guidanceResponse1")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2017-03-10T16:02:00Z").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2017-03-10T16:02:00Z")
+        self.assertEqual(inst.reasonCodeableConcept.text, "Guideline Appropriate Ordering Assessment")
+        self.assertEqual(inst.requestId, "guidanceRequest1")
+        self.assertEqual(inst.status, "success")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/healthcareservice.py b/fhirclient/models/healthcareservice.py
new file mode 100644
index 0000000..f2078ba
--- /dev/null
+++ b/fhirclient/models/healthcareservice.py
@@ -0,0 +1,267 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/HealthcareService) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class HealthcareService(domainresource.DomainResource):
+    """ The details of a healthcare service available at a location.
+    """
+    
+    resource_type = "HealthcareService"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Whether this healthcareservice is in active use.
+        Type `bool`. """
+        
+        self.appointmentRequired = None
+        """ If an appointment is required for access to this service.
+        Type `bool`. """
+        
+        self.availabilityExceptions = None
+        """ Description of availability exceptions.
+        Type `str`. """
+        
+        self.availableTime = None
+        """ Times the Service Site is available.
+        List of `HealthcareServiceAvailableTime` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Broad category of service being performed or delivered.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.characteristic = None
+        """ Collection of characteristics (attributes).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.comment = None
+        """ Additional description and/or any specific issues not covered
+        elsewhere.
+        Type `str`. """
+        
+        self.coverageArea = None
+        """ Location(s) service is inteded for/available to.
+        List of `FHIRReference` items referencing `Location` (represented as `dict` in JSON). """
+        
+        self.eligibility = None
+        """ Specific eligibility requirements required to use the service.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.eligibilityNote = None
+        """ Describes the eligibility conditions for the service.
+        Type `str`. """
+        
+        self.endpoint = None
+        """ Technical endpoints providing access to services operated for the
+        location.
+        List of `FHIRReference` items referencing `Endpoint` (represented as `dict` in JSON). """
+        
+        self.extraDetails = None
+        """ Extra details about the service that can't be placed in the other
+        fields.
+        Type `str`. """
+        
+        self.identifier = None
+        """ External identifiers for this item.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.location = None
+        """ Location(s) where service may be provided.
+        List of `FHIRReference` items referencing `Location` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Description of service as presented to a consumer while searching.
+        Type `str`. """
+        
+        self.notAvailable = None
+        """ Not available during this time due to provided reason.
+        List of `HealthcareServiceNotAvailable` items (represented as `dict` in JSON). """
+        
+        self.photo = None
+        """ Facilitates quick identification of the service.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.programName = None
+        """ Program Names that categorize the service.
+        List of `str` items. """
+        
+        self.providedBy = None
+        """ Organization that provides this service.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.referralMethod = None
+        """ Ways that the service accepts referrals.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.serviceProvisionCode = None
+        """ Conditions under which service is available/offered.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.specialty = None
+        """ Specialties handled by the HealthcareService.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.telecom = None
+        """ Contacts related to the healthcare service.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type of service that may be delivered or performed.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(HealthcareService, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(HealthcareService, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("appointmentRequired", "appointmentRequired", bool, False, None, False),
+            ("availabilityExceptions", "availabilityExceptions", str, False, None, False),
+            ("availableTime", "availableTime", HealthcareServiceAvailableTime, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("characteristic", "characteristic", codeableconcept.CodeableConcept, True, None, False),
+            ("comment", "comment", str, False, None, False),
+            ("coverageArea", "coverageArea", fhirreference.FHIRReference, True, None, False),
+            ("eligibility", "eligibility", codeableconcept.CodeableConcept, False, None, False),
+            ("eligibilityNote", "eligibilityNote", str, False, None, False),
+            ("endpoint", "endpoint", fhirreference.FHIRReference, True, None, False),
+            ("extraDetails", "extraDetails", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("location", "location", fhirreference.FHIRReference, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("notAvailable", "notAvailable", HealthcareServiceNotAvailable, True, None, False),
+            ("photo", "photo", attachment.Attachment, False, None, False),
+            ("programName", "programName", str, True, None, False),
+            ("providedBy", "providedBy", fhirreference.FHIRReference, False, None, False),
+            ("referralMethod", "referralMethod", codeableconcept.CodeableConcept, True, None, False),
+            ("serviceProvisionCode", "serviceProvisionCode", codeableconcept.CodeableConcept, True, None, False),
+            ("specialty", "specialty", codeableconcept.CodeableConcept, True, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class HealthcareServiceAvailableTime(backboneelement.BackboneElement):
+    """ Times the Service Site is available.
+    
+    A collection of times that the Service Site is available.
+    """
+    
+    resource_type = "HealthcareServiceAvailableTime"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.allDay = None
+        """ Always available? e.g. 24 hour service.
+        Type `bool`. """
+        
+        self.availableEndTime = None
+        """ Closing time of day (ignored if allDay = true).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.availableStartTime = None
+        """ Opening time of day (ignored if allDay = true).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.daysOfWeek = None
+        """ mon | tue | wed | thu | fri | sat | sun.
+        List of `str` items. """
+        
+        super(HealthcareServiceAvailableTime, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(HealthcareServiceAvailableTime, self).elementProperties()
+        js.extend([
+            ("allDay", "allDay", bool, False, None, False),
+            ("availableEndTime", "availableEndTime", fhirdate.FHIRDate, False, None, False),
+            ("availableStartTime", "availableStartTime", fhirdate.FHIRDate, False, None, False),
+            ("daysOfWeek", "daysOfWeek", str, True, None, False),
+        ])
+        return js
+
+
+class HealthcareServiceNotAvailable(backboneelement.BackboneElement):
+    """ Not available during this time due to provided reason.
+    
+    The HealthcareService is not available during this period of time due to
+    the provided reason.
+    """
+    
+    resource_type = "HealthcareServiceNotAvailable"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Reason presented to the user explaining why time not available.
+        Type `str`. """
+        
+        self.during = None
+        """ Service not availablefrom this date.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(HealthcareServiceNotAvailable, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(HealthcareServiceNotAvailable, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, True),
+            ("during", "during", period.Period, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/healthcareservice_tests.py b/fhirclient/models/healthcareservice_tests.py
new file mode 100644
index 0000000..58b5a1b
--- /dev/null
+++ b/fhirclient/models/healthcareservice_tests.py
@@ -0,0 +1,105 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import healthcareservice
+from .fhirdate import FHIRDate
+
+
+class HealthcareServiceTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("HealthcareService", js["resourceType"])
+        return healthcareservice.HealthcareService(js)
+    
+    def testHealthcareService1(self):
+        inst = self.instantiate_from("healthcareservice-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a HealthcareService instance")
+        self.implHealthcareService1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("HealthcareService", js["resourceType"])
+        inst2 = healthcareservice.HealthcareService(js)
+        self.implHealthcareService1(inst2)
+    
+    def implHealthcareService1(self, inst):
+        self.assertTrue(inst.active)
+        self.assertFalse(inst.appointmentRequired)
+        self.assertEqual(inst.availabilityExceptions, "Reduced capacity is available during the Christmas period")
+        self.assertTrue(inst.availableTime[0].allDay)
+        self.assertEqual(inst.availableTime[0].daysOfWeek[0], "wed")
+        self.assertEqual(inst.availableTime[1].availableEndTime.date, FHIRDate("05:30:00").date)
+        self.assertEqual(inst.availableTime[1].availableEndTime.as_json(), "05:30:00")
+        self.assertEqual(inst.availableTime[1].availableStartTime.date, FHIRDate("08:30:00").date)
+        self.assertEqual(inst.availableTime[1].availableStartTime.as_json(), "08:30:00")
+        self.assertEqual(inst.availableTime[1].daysOfWeek[0], "mon")
+        self.assertEqual(inst.availableTime[1].daysOfWeek[1], "tue")
+        self.assertEqual(inst.availableTime[1].daysOfWeek[2], "thu")
+        self.assertEqual(inst.availableTime[1].daysOfWeek[3], "fri")
+        self.assertEqual(inst.availableTime[2].availableEndTime.date, FHIRDate("04:30:00").date)
+        self.assertEqual(inst.availableTime[2].availableEndTime.as_json(), "04:30:00")
+        self.assertEqual(inst.availableTime[2].availableStartTime.date, FHIRDate("09:30:00").date)
+        self.assertEqual(inst.availableTime[2].availableStartTime.as_json(), "09:30:00")
+        self.assertEqual(inst.availableTime[2].daysOfWeek[0], "sat")
+        self.assertEqual(inst.availableTime[2].daysOfWeek[1], "fri")
+        self.assertEqual(inst.category.coding[0].code, "8")
+        self.assertEqual(inst.category.coding[0].display, "Counselling")
+        self.assertEqual(inst.category.coding[0].system, "http://hl7.org/fhir/service-category")
+        self.assertEqual(inst.category.text, "Counselling")
+        self.assertEqual(inst.characteristic[0].coding[0].display, "Wheelchair access")
+        self.assertEqual(inst.comment, "Providing Specialist psychology services to the greater Den Burg area, many years of experience dealing with PTSD issues")
+        self.assertEqual(inst.contained[0].id, "DenBurg")
+        self.assertEqual(inst.eligibility.coding[0].display, "DVA Required")
+        self.assertEqual(inst.eligibilityNote, "Evidence of application for DVA status may be sufficient for commencing assessment")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/shared-ids")
+        self.assertEqual(inst.identifier[0].value, "HS-12")
+        self.assertEqual(inst.name, "Consulting psychologists and/or psychology services")
+        self.assertEqual(inst.notAvailable[0].description, "Christmas/Boxing Day")
+        self.assertEqual(inst.notAvailable[0].during.end.date, FHIRDate("2015-12-26").date)
+        self.assertEqual(inst.notAvailable[0].during.end.as_json(), "2015-12-26")
+        self.assertEqual(inst.notAvailable[0].during.start.date, FHIRDate("2015-12-25").date)
+        self.assertEqual(inst.notAvailable[0].during.start.as_json(), "2015-12-25")
+        self.assertEqual(inst.notAvailable[1].description, "New Years Day")
+        self.assertEqual(inst.notAvailable[1].during.end.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.notAvailable[1].during.end.as_json(), "2016-01-01")
+        self.assertEqual(inst.notAvailable[1].during.start.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.notAvailable[1].during.start.as_json(), "2016-01-01")
+        self.assertEqual(inst.programName[0], "PTSD outreach")
+        self.assertEqual(inst.referralMethod[0].coding[0].code, "phone")
+        self.assertEqual(inst.referralMethod[0].coding[0].display, "Phone")
+        self.assertEqual(inst.referralMethod[1].coding[0].code, "fax")
+        self.assertEqual(inst.referralMethod[1].coding[0].display, "Fax")
+        self.assertEqual(inst.referralMethod[2].coding[0].code, "elec")
+        self.assertEqual(inst.referralMethod[2].coding[0].display, "Secure Messaging")
+        self.assertEqual(inst.referralMethod[3].coding[0].code, "semail")
+        self.assertEqual(inst.referralMethod[3].coding[0].display, "Secure Email")
+        self.assertEqual(inst.serviceProvisionCode[0].coding[0].code, "cost")
+        self.assertEqual(inst.serviceProvisionCode[0].coding[0].display, "Fees apply")
+        self.assertEqual(inst.serviceProvisionCode[0].coding[0].system, "http://hl7.org/fhir/service-provision-conditions")
+        self.assertEqual(inst.specialty[0].coding[0].code, "47505003")
+        self.assertEqual(inst.specialty[0].coding[0].display, "Posttraumatic stress disorder")
+        self.assertEqual(inst.specialty[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "(555) silent")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "directaddress at example.com")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "394913002")
+        self.assertEqual(inst.type[0].coding[0].display, "Psychotherapy")
+        self.assertEqual(inst.type[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.type[1].coding[0].code, "394587001")
+        self.assertEqual(inst.type[1].coding[0].display, "Psychiatry")
+        self.assertEqual(inst.type[1].coding[0].system, "http://snomed.info/sct")
+
diff --git a/fhirclient/models/humanname.py b/fhirclient/models/humanname.py
new file mode 100644
index 0000000..04c570a
--- /dev/null
+++ b/fhirclient/models/humanname.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/HumanName) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class HumanName(element.Element):
+    """ Name of a human - parts and usage.
+    
+    A human's name with the ability to identify parts and usage.
+    """
+    
+    resource_type = "HumanName"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.family = None
+        """ Family name (often called 'Surname').
+        Type `str`. """
+        
+        self.given = None
+        """ Given names (not always 'first'). Includes middle names.
+        List of `str` items. """
+        
+        self.period = None
+        """ Time period when name was/is in use.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.prefix = None
+        """ Parts that come before the name.
+        List of `str` items. """
+        
+        self.suffix = None
+        """ Parts that come after the name.
+        List of `str` items. """
+        
+        self.text = None
+        """ Text representation of the full name.
+        Type `str`. """
+        
+        self.use = None
+        """ usual | official | temp | nickname | anonymous | old | maiden.
+        Type `str`. """
+        
+        super(HumanName, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(HumanName, self).elementProperties()
+        js.extend([
+            ("family", "family", str, False, None, False),
+            ("given", "given", str, True, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("prefix", "prefix", str, True, None, False),
+            ("suffix", "suffix", str, True, None, False),
+            ("text", "text", str, False, None, False),
+            ("use", "use", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/identifier.py b/fhirclient/models/identifier.py
new file mode 100644
index 0000000..3a55b8e
--- /dev/null
+++ b/fhirclient/models/identifier.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Identifier) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Identifier(element.Element):
+    """ An identifier intended for computation.
+    
+    A technical identifier - identifies some entity uniquely and unambiguously.
+    """
+    
+    resource_type = "Identifier"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.assigner = None
+        """ Organization that issued id (may be just text).
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Time period when id is/was valid for use.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.system = None
+        """ The namespace for the identifier value.
+        Type `str`. """
+        
+        self.type = None
+        """ Description of identifier.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.use = None
+        """ usual | official | temp | secondary (If known).
+        Type `str`. """
+        
+        self.value = None
+        """ The value that is unique.
+        Type `str`. """
+        
+        super(Identifier, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Identifier, self).elementProperties()
+        js.extend([
+            ("assigner", "assigner", fhirreference.FHIRReference, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("system", "system", str, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+            ("use", "use", str, False, None, False),
+            ("value", "value", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/imagingmanifest.py b/fhirclient/models/imagingmanifest.py
new file mode 100644
index 0000000..57304a3
--- /dev/null
+++ b/fhirclient/models/imagingmanifest.py
@@ -0,0 +1,202 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ImagingManifest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ImagingManifest(domainresource.DomainResource):
+    """ Key Object Selection.
+    
+    A text description of the DICOM SOP instances selected in the
+    ImagingManifest; or the reason for, or significance of, the selection.
+    """
+    
+    resource_type = "ImagingManifest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.author = None
+        """ Author (human or machine).
+        Type `FHIRReference` referencing `Practitioner, Device, Organization, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.authoringTime = None
+        """ Time when the selection of instances was made.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Description text.
+        Type `str`. """
+        
+        self.identifier = None
+        """ SOP Instance UID.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ Patient of the selected objects.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.study = None
+        """ Study identity of the selected instances.
+        List of `ImagingManifestStudy` items (represented as `dict` in JSON). """
+        
+        super(ImagingManifest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImagingManifest, self).elementProperties()
+        js.extend([
+            ("author", "author", fhirreference.FHIRReference, False, None, False),
+            ("authoringTime", "authoringTime", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("study", "study", ImagingManifestStudy, True, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ImagingManifestStudy(backboneelement.BackboneElement):
+    """ Study identity of the selected instances.
+    
+    Study identity and locating information of the DICOM SOP instances in the
+    selection.
+    """
+    
+    resource_type = "ImagingManifestStudy"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.endpoint = None
+        """ Study access service endpoint.
+        List of `FHIRReference` items referencing `Endpoint` (represented as `dict` in JSON). """
+        
+        self.imagingStudy = None
+        """ Reference to ImagingStudy.
+        Type `FHIRReference` referencing `ImagingStudy` (represented as `dict` in JSON). """
+        
+        self.series = None
+        """ Series identity of the selected instances.
+        List of `ImagingManifestStudySeries` items (represented as `dict` in JSON). """
+        
+        self.uid = None
+        """ Study instance UID.
+        Type `str`. """
+        
+        super(ImagingManifestStudy, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImagingManifestStudy, self).elementProperties()
+        js.extend([
+            ("endpoint", "endpoint", fhirreference.FHIRReference, True, None, False),
+            ("imagingStudy", "imagingStudy", fhirreference.FHIRReference, False, None, False),
+            ("series", "series", ImagingManifestStudySeries, True, None, True),
+            ("uid", "uid", str, False, None, True),
+        ])
+        return js
+
+
+class ImagingManifestStudySeries(backboneelement.BackboneElement):
+    """ Series identity of the selected instances.
+    
+    Series identity and locating information of the DICOM SOP instances in the
+    selection.
+    """
+    
+    resource_type = "ImagingManifestStudySeries"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.endpoint = None
+        """ Series access endpoint.
+        List of `FHIRReference` items referencing `Endpoint` (represented as `dict` in JSON). """
+        
+        self.instance = None
+        """ The selected instance.
+        List of `ImagingManifestStudySeriesInstance` items (represented as `dict` in JSON). """
+        
+        self.uid = None
+        """ Series instance UID.
+        Type `str`. """
+        
+        super(ImagingManifestStudySeries, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImagingManifestStudySeries, self).elementProperties()
+        js.extend([
+            ("endpoint", "endpoint", fhirreference.FHIRReference, True, None, False),
+            ("instance", "instance", ImagingManifestStudySeriesInstance, True, None, True),
+            ("uid", "uid", str, False, None, True),
+        ])
+        return js
+
+
+class ImagingManifestStudySeriesInstance(backboneelement.BackboneElement):
+    """ The selected instance.
+    
+    Identity and locating information of the selected DICOM SOP instances.
+    """
+    
+    resource_type = "ImagingManifestStudySeriesInstance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.sopClass = None
+        """ SOP class UID of instance.
+        Type `str`. """
+        
+        self.uid = None
+        """ Selected instance UID.
+        Type `str`. """
+        
+        super(ImagingManifestStudySeriesInstance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImagingManifestStudySeriesInstance, self).elementProperties()
+        js.extend([
+            ("sopClass", "sopClass", str, False, None, True),
+            ("uid", "uid", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/imagingmanifest_tests.py b/fhirclient/models/imagingmanifest_tests.py
new file mode 100644
index 0000000..84abe2f
--- /dev/null
+++ b/fhirclient/models/imagingmanifest_tests.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import imagingmanifest
+from .fhirdate import FHIRDate
+
+
+class ImagingManifestTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ImagingManifest", js["resourceType"])
+        return imagingmanifest.ImagingManifest(js)
+    
+    def testImagingManifest1(self):
+        inst = self.instantiate_from("imagingmanifest-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ImagingManifest instance")
+        self.implImagingManifest1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ImagingManifest", js["resourceType"])
+        inst2 = imagingmanifest.ImagingManifest(js)
+        self.implImagingManifest1(inst2)
+    
+    def implImagingManifest1(self, inst):
+        self.assertEqual(inst.authoringTime.date, FHIRDate("2014-11-20T11:01:20-08:00").date)
+        self.assertEqual(inst.authoringTime.as_json(), "2014-11-20T11:01:20-08:00")
+        self.assertEqual(inst.description, "1 SC image (screen snapshot) and 2 CT images to share a chest CT exam")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier.value, "urn:oid:2.16.124.113543.6003.189642796.63084.16748.2599092901")
+        self.assertEqual(inst.study[0].series[0].instance[0].sopClass, "urn:oid:1.2.840.10008.5.1.4.1.1.7")
+        self.assertEqual(inst.study[0].series[0].instance[0].uid, "urn:oid:2.16.124.113543.6003.189642796.63084.16748.2599092902")
+        self.assertEqual(inst.study[0].series[0].uid, "urn:oid:2.16.124.113543.6003.189642796.63084.16750.2599092901")
+        self.assertEqual(inst.study[0].series[1].instance[0].sopClass, "urn:oid:1.2.840.10008.5.1.4.1.1.2")
+        self.assertEqual(inst.study[0].series[1].instance[0].uid, "urn:oid:2.16.124.113543.6003.189642796.63084.16748.2599092903")
+        self.assertEqual(inst.study[0].series[1].instance[1].sopClass, "urn:oid:1.2.840.10008.5.1.4.1.1.2")
+        self.assertEqual(inst.study[0].series[1].instance[1].uid, "urn:oid:2.16.124.113543.6003.189642796.63084.16748.2599092904")
+        self.assertEqual(inst.study[0].series[1].uid, "urn:oid:2.16.124.113543.6003.189642796.63084.16750.2599092902")
+        self.assertEqual(inst.study[0].uid, "urn:oid:2.16.124.113543.6003.189642796.63084.16749.2599092904")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A set of images to share accompanying an report document, including one SC image and two CT image</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/imagingstudy.py b/fhirclient/models/imagingstudy.py
new file mode 100644
index 0000000..d89fa31
--- /dev/null
+++ b/fhirclient/models/imagingstudy.py
@@ -0,0 +1,288 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ImagingStudy) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ImagingStudy(domainresource.DomainResource):
+    """ A set of images produced in single study (one or more series of references
+    images).
+    
+    Representation of the content produced in a DICOM imaging study. A study
+    comprises a set of series, each of which includes a set of Service-Object
+    Pair Instances (SOP Instances - images or other data) acquired or produced
+    in a common context.  A series is of only one modality (e.g. X-ray, CT, MR,
+    ultrasound), but a study may have multiple series of different modalities.
+    """
+    
+    resource_type = "ImagingStudy"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.accession = None
+        """ Related workflow identifier ("Accession Number").
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.availability = None
+        """ ONLINE | OFFLINE | NEARLINE | UNAVAILABLE.
+        Type `str`. """
+        
+        self.basedOn = None
+        """ Request fulfilled.
+        List of `FHIRReference` items referencing `ReferralRequest, CarePlan, ProcedureRequest` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Originating context.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Institution-generated description.
+        Type `str`. """
+        
+        self.endpoint = None
+        """ Study access endpoint.
+        List of `FHIRReference` items referencing `Endpoint` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Other identifiers for the study.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.interpreter = None
+        """ Who interpreted images.
+        List of `FHIRReference` items referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.modalityList = None
+        """ All series modality if actual acquisition modalities.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.numberOfInstances = None
+        """ Number of Study Related Instances.
+        Type `int`. """
+        
+        self.numberOfSeries = None
+        """ Number of Study Related Series.
+        Type `int`. """
+        
+        self.patient = None
+        """ Who the images are of.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.procedureCode = None
+        """ The performed procedure code.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.procedureReference = None
+        """ The performed Procedure reference.
+        List of `FHIRReference` items referencing `Procedure` (represented as `dict` in JSON). """
+        
+        self.reason = None
+        """ Why the study was requested.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.referrer = None
+        """ Referring physician.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.series = None
+        """ Each study has one or more series of instances.
+        List of `ImagingStudySeries` items (represented as `dict` in JSON). """
+        
+        self.started = None
+        """ When the study was started.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.uid = None
+        """ Formal DICOM identifier for the study.
+        Type `str`. """
+        
+        super(ImagingStudy, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImagingStudy, self).elementProperties()
+        js.extend([
+            ("accession", "accession", identifier.Identifier, False, None, False),
+            ("availability", "availability", str, False, None, False),
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("endpoint", "endpoint", fhirreference.FHIRReference, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("interpreter", "interpreter", fhirreference.FHIRReference, True, None, False),
+            ("modalityList", "modalityList", coding.Coding, True, None, False),
+            ("numberOfInstances", "numberOfInstances", int, False, None, False),
+            ("numberOfSeries", "numberOfSeries", int, False, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("procedureCode", "procedureCode", codeableconcept.CodeableConcept, True, None, False),
+            ("procedureReference", "procedureReference", fhirreference.FHIRReference, True, None, False),
+            ("reason", "reason", codeableconcept.CodeableConcept, False, None, False),
+            ("referrer", "referrer", fhirreference.FHIRReference, False, None, False),
+            ("series", "series", ImagingStudySeries, True, None, False),
+            ("started", "started", fhirdate.FHIRDate, False, None, False),
+            ("uid", "uid", str, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ImagingStudySeries(backboneelement.BackboneElement):
+    """ Each study has one or more series of instances.
+    
+    Each study has one or more series of images or other content.
+    """
+    
+    resource_type = "ImagingStudySeries"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.availability = None
+        """ ONLINE | OFFLINE | NEARLINE | UNAVAILABLE.
+        Type `str`. """
+        
+        self.bodySite = None
+        """ Body part examined.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ A short human readable summary of the series.
+        Type `str`. """
+        
+        self.endpoint = None
+        """ Series access endpoint.
+        List of `FHIRReference` items referencing `Endpoint` (represented as `dict` in JSON). """
+        
+        self.instance = None
+        """ A single SOP instance from the series.
+        List of `ImagingStudySeriesInstance` items (represented as `dict` in JSON). """
+        
+        self.laterality = None
+        """ Body part laterality.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.modality = None
+        """ The modality of the instances in the series.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.number = None
+        """ Numeric identifier of this series.
+        Type `int`. """
+        
+        self.numberOfInstances = None
+        """ Number of Series Related Instances.
+        Type `int`. """
+        
+        self.performer = None
+        """ Who performed the series.
+        List of `FHIRReference` items referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.started = None
+        """ When the series started.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.uid = None
+        """ Formal DICOM identifier for this series.
+        Type `str`. """
+        
+        super(ImagingStudySeries, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImagingStudySeries, self).elementProperties()
+        js.extend([
+            ("availability", "availability", str, False, None, False),
+            ("bodySite", "bodySite", coding.Coding, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("endpoint", "endpoint", fhirreference.FHIRReference, True, None, False),
+            ("instance", "instance", ImagingStudySeriesInstance, True, None, False),
+            ("laterality", "laterality", coding.Coding, False, None, False),
+            ("modality", "modality", coding.Coding, False, None, True),
+            ("number", "number", int, False, None, False),
+            ("numberOfInstances", "numberOfInstances", int, False, None, False),
+            ("performer", "performer", fhirreference.FHIRReference, True, None, False),
+            ("started", "started", fhirdate.FHIRDate, False, None, False),
+            ("uid", "uid", str, False, None, True),
+        ])
+        return js
+
+
+class ImagingStudySeriesInstance(backboneelement.BackboneElement):
+    """ A single SOP instance from the series.
+    
+    A single SOP instance within the series, e.g. an image, or presentation
+    state.
+    """
+    
+    resource_type = "ImagingStudySeriesInstance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.number = None
+        """ The number of this instance in the series.
+        Type `int`. """
+        
+        self.sopClass = None
+        """ DICOM class type.
+        Type `str`. """
+        
+        self.title = None
+        """ Description of instance.
+        Type `str`. """
+        
+        self.uid = None
+        """ Formal DICOM identifier for this instance.
+        Type `str`. """
+        
+        super(ImagingStudySeriesInstance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImagingStudySeriesInstance, self).elementProperties()
+        js.extend([
+            ("number", "number", int, False, None, False),
+            ("sopClass", "sopClass", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("uid", "uid", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/imagingstudy_tests.py b/fhirclient/models/imagingstudy_tests.py
new file mode 100644
index 0000000..3dd6190
--- /dev/null
+++ b/fhirclient/models/imagingstudy_tests.py
@@ -0,0 +1,115 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import imagingstudy
+from .fhirdate import FHIRDate
+
+
+class ImagingStudyTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ImagingStudy", js["resourceType"])
+        return imagingstudy.ImagingStudy(js)
+    
+    def testImagingStudy1(self):
+        inst = self.instantiate_from("imagingstudy-example-xr.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ImagingStudy instance")
+        self.implImagingStudy1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ImagingStudy", js["resourceType"])
+        inst2 = imagingstudy.ImagingStudy(js)
+        self.implImagingStudy1(inst2)
+    
+    def implImagingStudy1(self, inst):
+        self.assertEqual(inst.accession.type.coding[0].code, "ACSN")
+        self.assertEqual(inst.accession.type.coding[0].system, "http://hl7.org/fhir/v2/0203")
+        self.assertEqual(inst.accession.use, "usual")
+        self.assertEqual(inst.accession.value, "W12342398")
+        self.assertEqual(inst.availability, "ONLINE")
+        self.assertEqual(inst.description, "XR Wrist 3+ Views")
+        self.assertEqual(inst.id, "example-xr")
+        self.assertEqual(inst.identifier[0].use, "secondary")
+        self.assertEqual(inst.identifier[0].value, "55551234")
+        self.assertEqual(inst.modalityList[0].code, "DX")
+        self.assertEqual(inst.modalityList[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.numberOfInstances, 2)
+        self.assertEqual(inst.numberOfSeries, 1)
+        self.assertEqual(inst.procedureCode[0].coding[0].code, "RPID2589")
+        self.assertEqual(inst.procedureCode[0].coding[0].display, "XR Wrist 3+ Views")
+        self.assertEqual(inst.procedureCode[0].coding[0].system, "http://www.radlex.org")
+        self.assertEqual(inst.procedureCode[0].text, "XR Wrist 3+ Views")
+        self.assertEqual(inst.reason.coding[0].code, "357009")
+        self.assertEqual(inst.reason.coding[0].display, "Closed fracture of trapezoidal bone of wrist")
+        self.assertEqual(inst.reason.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.series[0].availability, "ONLINE")
+        self.assertEqual(inst.series[0].bodySite.code, "T-15460")
+        self.assertEqual(inst.series[0].bodySite.display, "Wrist Joint")
+        self.assertEqual(inst.series[0].bodySite.system, "http://snomed.info/sct")
+        self.assertEqual(inst.series[0].description, "XR Wrist 3+ Views")
+        self.assertEqual(inst.series[0].instance[0].number, 1)
+        self.assertEqual(inst.series[0].instance[0].sopClass, "urn:oid:1.2.840.10008.5.1.4.1.1.2")
+        self.assertEqual(inst.series[0].instance[0].title, "PA VIEW")
+        self.assertEqual(inst.series[0].instance[0].uid, "urn:oid:2.16.124.113543.6003.1154777499.30246.19789.3503430045.1.1")
+        self.assertEqual(inst.series[0].instance[1].number, 2)
+        self.assertEqual(inst.series[0].instance[1].sopClass, "urn:oid:1.2.840.10008.5.1.4.1.1.2")
+        self.assertEqual(inst.series[0].instance[1].title, "LL VIEW")
+        self.assertEqual(inst.series[0].instance[1].uid, "urn:oid:2.16.124.113543.6003.1154777499.30246.19789.3503430045.1.2")
+        self.assertEqual(inst.series[0].laterality.code, "419161000")
+        self.assertEqual(inst.series[0].laterality.display, "Unilateral left")
+        self.assertEqual(inst.series[0].laterality.system, "http://snomed.info/sct")
+        self.assertEqual(inst.series[0].modality.code, "DX")
+        self.assertEqual(inst.series[0].modality.system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.series[0].number, 3)
+        self.assertEqual(inst.series[0].numberOfInstances, 2)
+        self.assertEqual(inst.series[0].started.date, FHIRDate("2011-01-01T11:01:20+03:00").date)
+        self.assertEqual(inst.series[0].started.as_json(), "2011-01-01T11:01:20+03:00")
+        self.assertEqual(inst.series[0].uid, "urn:oid:2.16.124.113543.6003.1154777499.30246.19789.3503430045.1")
+        self.assertEqual(inst.started.date, FHIRDate("2017-01-01T11:01:20+03:00").date)
+        self.assertEqual(inst.started.as_json(), "2017-01-01T11:01:20+03:00")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">XR Wrist 3+ Views. John Smith (MRN: 09236). Accession: W12342398. Performed: 2017-01-01. 1 series, 2 images.</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.uid, "urn:oid:2.16.124.113543.6003.1154777499.30246.19789.3503430046")
+    
+    def testImagingStudy2(self):
+        inst = self.instantiate_from("imagingstudy-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ImagingStudy instance")
+        self.implImagingStudy2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ImagingStudy", js["resourceType"])
+        inst2 = imagingstudy.ImagingStudy(js)
+        self.implImagingStudy2(inst2)
+    
+    def implImagingStudy2(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.numberOfInstances, 1)
+        self.assertEqual(inst.numberOfSeries, 1)
+        self.assertEqual(inst.series[0].bodySite.code, "67734004")
+        self.assertEqual(inst.series[0].bodySite.display, "Upper Trunk Structure")
+        self.assertEqual(inst.series[0].bodySite.system, "http://snomed.info/sct")
+        self.assertEqual(inst.series[0].description, "CT Surview 180")
+        self.assertEqual(inst.series[0].instance[0].number, 1)
+        self.assertEqual(inst.series[0].instance[0].sopClass, "urn:oid:1.2.840.10008.5.1.4.1.1.2")
+        self.assertEqual(inst.series[0].instance[0].uid, "urn:oid:2.16.124.113543.6003.189642796.63084.16748.2599092903")
+        self.assertEqual(inst.series[0].modality.code, "CT")
+        self.assertEqual(inst.series[0].modality.system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.series[0].number, 3)
+        self.assertEqual(inst.series[0].numberOfInstances, 1)
+        self.assertEqual(inst.series[0].uid, "urn:oid:2.16.124.113543.6003.2588828330.45298.17418.2723805630")
+        self.assertEqual(inst.started.date, FHIRDate("2011-01-01T11:01:20+03:00").date)
+        self.assertEqual(inst.started.as_json(), "2011-01-01T11:01:20+03:00")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">CT Chest.  John Smith (MRN: 09236). Accession: W12342398. Performed: 2011-01-01. 3 series, 12 images.</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.uid, "urn:oid:2.16.124.113543.6003.1154777499.30246.19789.3503430045")
+
diff --git a/fhirclient/models/immunization.py b/fhirclient/models/immunization.py
new file mode 100644
index 0000000..95fde95
--- /dev/null
+++ b/fhirclient/models/immunization.py
@@ -0,0 +1,346 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Immunization) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Immunization(domainresource.DomainResource):
+    """ Immunization event information.
+    
+    Describes the event of a patient being administered a vaccination or a
+    record of a vaccination as reported by a patient, a clinician or another
+    party and may include vaccine reaction information and what vaccination
+    protocol was followed.
+    """
+    
+    resource_type = "Immunization"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.date = None
+        """ Vaccination administration date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.doseQuantity = None
+        """ Amount of vaccine administered.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.encounter = None
+        """ Encounter administered as part of.
+        Type `FHIRReference` referencing `Encounter` (represented as `dict` in JSON). """
+        
+        self.expirationDate = None
+        """ Vaccine expiration date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.explanation = None
+        """ Administration/non-administration reasons.
+        Type `ImmunizationExplanation` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.location = None
+        """ Where vaccination occurred.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.lotNumber = None
+        """ Vaccine lot number.
+        Type `str`. """
+        
+        self.manufacturer = None
+        """ Vaccine manufacturer.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.notGiven = None
+        """ Flag for whether immunization was given.
+        Type `bool`. """
+        
+        self.note = None
+        """ Vaccination notes.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ Who was immunized.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.practitioner = None
+        """ Who performed event.
+        List of `ImmunizationPractitioner` items (represented as `dict` in JSON). """
+        
+        self.primarySource = None
+        """ Indicates context the data was recorded in.
+        Type `bool`. """
+        
+        self.reaction = None
+        """ Details of a reaction that follows immunization.
+        List of `ImmunizationReaction` items (represented as `dict` in JSON). """
+        
+        self.reportOrigin = None
+        """ Indicates the source of a secondarily reported record.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.route = None
+        """ How vaccine entered body.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.site = None
+        """ Body site vaccine  was administered.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ completed | entered-in-error.
+        Type `str`. """
+        
+        self.vaccinationProtocol = None
+        """ What protocol was followed.
+        List of `ImmunizationVaccinationProtocol` items (represented as `dict` in JSON). """
+        
+        self.vaccineCode = None
+        """ Vaccine product administered.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(Immunization, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Immunization, self).elementProperties()
+        js.extend([
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("doseQuantity", "doseQuantity", quantity.Quantity, False, None, False),
+            ("encounter", "encounter", fhirreference.FHIRReference, False, None, False),
+            ("expirationDate", "expirationDate", fhirdate.FHIRDate, False, None, False),
+            ("explanation", "explanation", ImmunizationExplanation, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("location", "location", fhirreference.FHIRReference, False, None, False),
+            ("lotNumber", "lotNumber", str, False, None, False),
+            ("manufacturer", "manufacturer", fhirreference.FHIRReference, False, None, False),
+            ("notGiven", "notGiven", bool, False, None, True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("practitioner", "practitioner", ImmunizationPractitioner, True, None, False),
+            ("primarySource", "primarySource", bool, False, None, True),
+            ("reaction", "reaction", ImmunizationReaction, True, None, False),
+            ("reportOrigin", "reportOrigin", codeableconcept.CodeableConcept, False, None, False),
+            ("route", "route", codeableconcept.CodeableConcept, False, None, False),
+            ("site", "site", codeableconcept.CodeableConcept, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("vaccinationProtocol", "vaccinationProtocol", ImmunizationVaccinationProtocol, True, None, False),
+            ("vaccineCode", "vaccineCode", codeableconcept.CodeableConcept, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ImmunizationExplanation(backboneelement.BackboneElement):
+    """ Administration/non-administration reasons.
+    
+    Reasons why a vaccine was or was not administered.
+    """
+    
+    resource_type = "ImmunizationExplanation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.reason = None
+        """ Why immunization occurred.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonNotGiven = None
+        """ Why immunization did not occur.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(ImmunizationExplanation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImmunizationExplanation, self).elementProperties()
+        js.extend([
+            ("reason", "reason", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonNotGiven", "reasonNotGiven", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+class ImmunizationPractitioner(backboneelement.BackboneElement):
+    """ Who performed event.
+    
+    Indicates who or what performed the event.
+    """
+    
+    resource_type = "ImmunizationPractitioner"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actor = None
+        """ Individual who was performing.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ What type of performance was done.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ImmunizationPractitioner, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImmunizationPractitioner, self).elementProperties()
+        js.extend([
+            ("actor", "actor", fhirreference.FHIRReference, False, None, True),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ImmunizationReaction(backboneelement.BackboneElement):
+    """ Details of a reaction that follows immunization.
+    
+    Categorical data indicating that an adverse event is associated in time to
+    an immunization.
+    """
+    
+    resource_type = "ImmunizationReaction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.date = None
+        """ When reaction started.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.detail = None
+        """ Additional information on reaction.
+        Type `FHIRReference` referencing `Observation` (represented as `dict` in JSON). """
+        
+        self.reported = None
+        """ Indicates self-reported reaction.
+        Type `bool`. """
+        
+        super(ImmunizationReaction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImmunizationReaction, self).elementProperties()
+        js.extend([
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("detail", "detail", fhirreference.FHIRReference, False, None, False),
+            ("reported", "reported", bool, False, None, False),
+        ])
+        return js
+
+
+class ImmunizationVaccinationProtocol(backboneelement.BackboneElement):
+    """ What protocol was followed.
+    
+    Contains information about the protocol(s) under which the vaccine was
+    administered.
+    """
+    
+    resource_type = "ImmunizationVaccinationProtocol"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authority = None
+        """ Who is responsible for protocol.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Details of vaccine protocol.
+        Type `str`. """
+        
+        self.doseSequence = None
+        """ Dose number within series.
+        Type `int`. """
+        
+        self.doseStatus = None
+        """ Indicates if dose counts towards immunity.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.doseStatusReason = None
+        """ Why dose does (not) count.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.series = None
+        """ Name of vaccine series.
+        Type `str`. """
+        
+        self.seriesDoses = None
+        """ Recommended number of doses for immunity.
+        Type `int`. """
+        
+        self.targetDisease = None
+        """ Disease immunized against.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(ImmunizationVaccinationProtocol, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImmunizationVaccinationProtocol, self).elementProperties()
+        js.extend([
+            ("authority", "authority", fhirreference.FHIRReference, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("doseSequence", "doseSequence", int, False, None, False),
+            ("doseStatus", "doseStatus", codeableconcept.CodeableConcept, False, None, True),
+            ("doseStatusReason", "doseStatusReason", codeableconcept.CodeableConcept, False, None, False),
+            ("series", "series", str, False, None, False),
+            ("seriesDoses", "seriesDoses", int, False, None, False),
+            ("targetDisease", "targetDisease", codeableconcept.CodeableConcept, True, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/immunization_tests.py b/fhirclient/models/immunization_tests.py
new file mode 100644
index 0000000..777b7d9
--- /dev/null
+++ b/fhirclient/models/immunization_tests.py
@@ -0,0 +1,134 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import immunization
+from .fhirdate import FHIRDate
+
+
+class ImmunizationTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Immunization", js["resourceType"])
+        return immunization.Immunization(js)
+    
+    def testImmunization1(self):
+        inst = self.instantiate_from("immunization-example-historical.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Immunization instance")
+        self.implImmunization1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Immunization", js["resourceType"])
+        inst2 = immunization.Immunization(js)
+        self.implImmunization1(inst2)
+    
+    def implImmunization1(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2012-01-15").date)
+        self.assertEqual(inst.date.as_json(), "2012-01-15")
+        self.assertEqual(inst.id, "historical")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.1234")
+        self.assertFalse(inst.notGiven)
+        self.assertEqual(inst.note[0].text, "Notes on adminstration of a historical vaccine")
+        self.assertFalse(inst.primarySource)
+        self.assertEqual(inst.reportOrigin.coding[0].code, "record")
+        self.assertEqual(inst.reportOrigin.coding[0].system, "http://hl7.org/fhir/immunization-origin")
+        self.assertEqual(inst.reportOrigin.text, "Written Record")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.vaccineCode.coding[0].code, "GNFLU")
+        self.assertEqual(inst.vaccineCode.coding[0].system, "urn:oid:1.2.36.1.2001.1005.17")
+        self.assertEqual(inst.vaccineCode.text, "Influenza")
+    
+    def testImmunization2(self):
+        inst = self.instantiate_from("immunization-example-refused.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Immunization instance")
+        self.implImmunization2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Immunization", js["resourceType"])
+        inst2 = immunization.Immunization(js)
+        self.implImmunization2(inst2)
+    
+    def implImmunization2(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2013-01-10").date)
+        self.assertEqual(inst.date.as_json(), "2013-01-10")
+        self.assertEqual(inst.explanation.reasonNotGiven[0].coding[0].code, "MEDPREC")
+        self.assertEqual(inst.explanation.reasonNotGiven[0].coding[0].display, "medical precaution")
+        self.assertEqual(inst.explanation.reasonNotGiven[0].coding[0].system, "http://hl7.org/fhir/v3/ActReason")
+        self.assertEqual(inst.id, "notGiven")
+        self.assertTrue(inst.notGiven)
+        self.assertTrue(inst.primarySource)
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.vaccineCode.coding[0].code, "01")
+        self.assertEqual(inst.vaccineCode.coding[0].display, "DTP")
+        self.assertEqual(inst.vaccineCode.coding[0].system, "http://hl7.org/fhir/sid/cvx")
+    
+    def testImmunization3(self):
+        inst = self.instantiate_from("immunization-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Immunization instance")
+        self.implImmunization3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Immunization", js["resourceType"])
+        inst2 = immunization.Immunization(js)
+        self.implImmunization3(inst2)
+    
+    def implImmunization3(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2013-01-10").date)
+        self.assertEqual(inst.date.as_json(), "2013-01-10")
+        self.assertEqual(inst.doseQuantity.code, "mg")
+        self.assertEqual(inst.doseQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.doseQuantity.value, 5)
+        self.assertEqual(inst.expirationDate.date, FHIRDate("2015-02-15").date)
+        self.assertEqual(inst.expirationDate.as_json(), "2015-02-15")
+        self.assertEqual(inst.explanation.reason[0].coding[0].code, "429060002")
+        self.assertEqual(inst.explanation.reason[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.1234")
+        self.assertEqual(inst.lotNumber, "AAJN11K")
+        self.assertFalse(inst.notGiven)
+        self.assertEqual(inst.note[0].text, "Notes on adminstration of vaccine")
+        self.assertEqual(inst.practitioner[0].role.coding[0].code, "OP")
+        self.assertEqual(inst.practitioner[0].role.coding[0].system, "http://hl7.org/fhir/v2/0443")
+        self.assertEqual(inst.practitioner[1].role.coding[0].code, "AP")
+        self.assertEqual(inst.practitioner[1].role.coding[0].system, "http://hl7.org/fhir/v2/0443")
+        self.assertTrue(inst.primarySource)
+        self.assertEqual(inst.reaction[0].date.date, FHIRDate("2013-01-10").date)
+        self.assertEqual(inst.reaction[0].date.as_json(), "2013-01-10")
+        self.assertTrue(inst.reaction[0].reported)
+        self.assertEqual(inst.route.coding[0].code, "IM")
+        self.assertEqual(inst.route.coding[0].display, "Injection, intramuscular")
+        self.assertEqual(inst.route.coding[0].system, "http://hl7.org/fhir/v3/RouteOfAdministration")
+        self.assertEqual(inst.site.coding[0].code, "LA")
+        self.assertEqual(inst.site.coding[0].display, "left arm")
+        self.assertEqual(inst.site.coding[0].system, "http://hl7.org/fhir/v3/ActSite")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.vaccinationProtocol[0].description, "Vaccination Protocol Sequence 1")
+        self.assertEqual(inst.vaccinationProtocol[0].doseSequence, 1)
+        self.assertEqual(inst.vaccinationProtocol[0].doseStatus.coding[0].code, "count")
+        self.assertEqual(inst.vaccinationProtocol[0].doseStatus.coding[0].display, "Counts")
+        self.assertEqual(inst.vaccinationProtocol[0].doseStatus.coding[0].system, "http://hl7.org/fhir/vaccination-protocol-dose-status")
+        self.assertEqual(inst.vaccinationProtocol[0].doseStatusReason.coding[0].code, "coldchbrk")
+        self.assertEqual(inst.vaccinationProtocol[0].doseStatusReason.coding[0].display, "Cold chain break")
+        self.assertEqual(inst.vaccinationProtocol[0].doseStatusReason.coding[0].system, "http://hl7.org/fhir/vaccination-protocol-dose-status-reason")
+        self.assertEqual(inst.vaccinationProtocol[0].series, "Vaccination Series 1")
+        self.assertEqual(inst.vaccinationProtocol[0].seriesDoses, 2)
+        self.assertEqual(inst.vaccinationProtocol[0].targetDisease[0].coding[0].code, "1857005")
+        self.assertEqual(inst.vaccinationProtocol[0].targetDisease[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.vaccineCode.coding[0].code, "FLUVAX")
+        self.assertEqual(inst.vaccineCode.coding[0].system, "urn:oid:1.2.36.1.2001.1005.17")
+        self.assertEqual(inst.vaccineCode.text, "Fluvax (Influenza)")
+
diff --git a/fhirclient/models/immunizationrecommendation.py b/fhirclient/models/immunizationrecommendation.py
new file mode 100644
index 0000000..8573413
--- /dev/null
+++ b/fhirclient/models/immunizationrecommendation.py
@@ -0,0 +1,220 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ImmunizationRecommendation(domainresource.DomainResource):
+    """ Guidance or advice relating to an immunization.
+    
+    A patient's point-in-time immunization and recommendation (i.e. forecasting
+    a patient's immunization eligibility according to a published schedule)
+    with optional supporting justification.
+    """
+    
+    resource_type = "ImmunizationRecommendation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.identifier = None
+        """ Business identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ Who this profile is for.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.recommendation = None
+        """ Vaccine administration recommendations.
+        List of `ImmunizationRecommendationRecommendation` items (represented as `dict` in JSON). """
+        
+        super(ImmunizationRecommendation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImmunizationRecommendation, self).elementProperties()
+        js.extend([
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("recommendation", "recommendation", ImmunizationRecommendationRecommendation, True, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ImmunizationRecommendationRecommendation(backboneelement.BackboneElement):
+    """ Vaccine administration recommendations.
+    """
+    
+    resource_type = "ImmunizationRecommendationRecommendation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.date = None
+        """ Date recommendation created.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.dateCriterion = None
+        """ Dates governing proposed immunization.
+        List of `ImmunizationRecommendationRecommendationDateCriterion` items (represented as `dict` in JSON). """
+        
+        self.doseNumber = None
+        """ Recommended dose number.
+        Type `int`. """
+        
+        self.forecastStatus = None
+        """ Vaccine administration status.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.protocol = None
+        """ Protocol used by recommendation.
+        Type `ImmunizationRecommendationRecommendationProtocol` (represented as `dict` in JSON). """
+        
+        self.supportingImmunization = None
+        """ Past immunizations supporting recommendation.
+        List of `FHIRReference` items referencing `Immunization` (represented as `dict` in JSON). """
+        
+        self.supportingPatientInformation = None
+        """ Patient observations supporting recommendation.
+        List of `FHIRReference` items referencing `Observation, AllergyIntolerance` (represented as `dict` in JSON). """
+        
+        self.targetDisease = None
+        """ Disease to be immunized against.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.vaccineCode = None
+        """ Vaccine recommendation applies to.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ImmunizationRecommendationRecommendation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImmunizationRecommendationRecommendation, self).elementProperties()
+        js.extend([
+            ("date", "date", fhirdate.FHIRDate, False, None, True),
+            ("dateCriterion", "dateCriterion", ImmunizationRecommendationRecommendationDateCriterion, True, None, False),
+            ("doseNumber", "doseNumber", int, False, None, False),
+            ("forecastStatus", "forecastStatus", codeableconcept.CodeableConcept, False, None, True),
+            ("protocol", "protocol", ImmunizationRecommendationRecommendationProtocol, False, None, False),
+            ("supportingImmunization", "supportingImmunization", fhirreference.FHIRReference, True, None, False),
+            ("supportingPatientInformation", "supportingPatientInformation", fhirreference.FHIRReference, True, None, False),
+            ("targetDisease", "targetDisease", codeableconcept.CodeableConcept, False, None, False),
+            ("vaccineCode", "vaccineCode", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ImmunizationRecommendationRecommendationDateCriterion(backboneelement.BackboneElement):
+    """ Dates governing proposed immunization.
+    
+    Vaccine date recommendations.  For example, earliest date to administer,
+    latest date to administer, etc.
+    """
+    
+    resource_type = "ImmunizationRecommendationRecommendationDateCriterion"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Type of date.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.value = None
+        """ Recommended date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(ImmunizationRecommendationRecommendationDateCriterion, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImmunizationRecommendationRecommendationDateCriterion, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("value", "value", fhirdate.FHIRDate, False, None, True),
+        ])
+        return js
+
+
+class ImmunizationRecommendationRecommendationProtocol(backboneelement.BackboneElement):
+    """ Protocol used by recommendation.
+    
+    Contains information about the protocol under which the vaccine was
+    administered.
+    """
+    
+    resource_type = "ImmunizationRecommendationRecommendationProtocol"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authority = None
+        """ Who is responsible for protocol.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Protocol details.
+        Type `str`. """
+        
+        self.doseSequence = None
+        """ Dose number within sequence.
+        Type `int`. """
+        
+        self.series = None
+        """ Name of vaccination series.
+        Type `str`. """
+        
+        super(ImmunizationRecommendationRecommendationProtocol, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImmunizationRecommendationRecommendationProtocol, self).elementProperties()
+        js.extend([
+            ("authority", "authority", fhirreference.FHIRReference, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("doseSequence", "doseSequence", int, False, None, False),
+            ("series", "series", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/immunizationrecommendation_tests.py b/fhirclient/models/immunizationrecommendation_tests.py
new file mode 100644
index 0000000..3d35828
--- /dev/null
+++ b/fhirclient/models/immunizationrecommendation_tests.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import immunizationrecommendation
+from .fhirdate import FHIRDate
+
+
+class ImmunizationRecommendationTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ImmunizationRecommendation", js["resourceType"])
+        return immunizationrecommendation.ImmunizationRecommendation(js)
+    
+    def testImmunizationRecommendation1(self):
+        inst = self.instantiate_from("immunizationrecommendation-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ImmunizationRecommendation instance")
+        self.implImmunizationRecommendation1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ImmunizationRecommendation", js["resourceType"])
+        inst2 = immunizationrecommendation.ImmunizationRecommendation(js)
+        self.implImmunizationRecommendation1(inst2)
+    
+    def implImmunizationRecommendation1(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.1235")
+        self.assertEqual(inst.recommendation[0].date.date, FHIRDate("2015-02-09T11:04:15.817-05:00").date)
+        self.assertEqual(inst.recommendation[0].date.as_json(), "2015-02-09T11:04:15.817-05:00")
+        self.assertEqual(inst.recommendation[0].dateCriterion[0].code.coding[0].code, "earliest")
+        self.assertEqual(inst.recommendation[0].dateCriterion[0].code.coding[0].display, "Earliest Date")
+        self.assertEqual(inst.recommendation[0].dateCriterion[0].code.coding[0].system, "http://hl7.org/fhir/immunization-recommendation-date-criterion")
+        self.assertEqual(inst.recommendation[0].dateCriterion[0].value.date, FHIRDate("2015-12-01T00:00:00-05:00").date)
+        self.assertEqual(inst.recommendation[0].dateCriterion[0].value.as_json(), "2015-12-01T00:00:00-05:00")
+        self.assertEqual(inst.recommendation[0].dateCriterion[1].code.coding[0].code, "recommended")
+        self.assertEqual(inst.recommendation[0].dateCriterion[1].code.coding[0].display, "Recommended")
+        self.assertEqual(inst.recommendation[0].dateCriterion[1].code.coding[0].system, "http://hl7.org/fhir/immunization-recommendation-date-criterion")
+        self.assertEqual(inst.recommendation[0].dateCriterion[1].value.date, FHIRDate("2015-12-01T00:00:00-05:00").date)
+        self.assertEqual(inst.recommendation[0].dateCriterion[1].value.as_json(), "2015-12-01T00:00:00-05:00")
+        self.assertEqual(inst.recommendation[0].dateCriterion[2].code.coding[0].code, "overdue")
+        self.assertEqual(inst.recommendation[0].dateCriterion[2].code.coding[0].display, "Past Due Date")
+        self.assertEqual(inst.recommendation[0].dateCriterion[2].code.coding[0].system, "http://hl7.org/fhir/immunization-recommendation-date-criterion")
+        self.assertEqual(inst.recommendation[0].dateCriterion[2].value.date, FHIRDate("2016-12-28T00:00:00-05:00").date)
+        self.assertEqual(inst.recommendation[0].dateCriterion[2].value.as_json(), "2016-12-28T00:00:00-05:00")
+        self.assertEqual(inst.recommendation[0].doseNumber, 1)
+        self.assertEqual(inst.recommendation[0].forecastStatus.text, "Not Complete")
+        self.assertEqual(inst.recommendation[0].protocol.description, "First sequence in protocol")
+        self.assertEqual(inst.recommendation[0].protocol.doseSequence, 1)
+        self.assertEqual(inst.recommendation[0].protocol.series, "Vaccination Series 1")
+        self.assertEqual(inst.recommendation[0].vaccineCode.coding[0].code, "14745005")
+        self.assertEqual(inst.recommendation[0].vaccineCode.coding[0].display, "Hepatitis A vaccine")
+        self.assertEqual(inst.recommendation[0].vaccineCode.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Authored by Joginder Madra</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testImmunizationRecommendation2(self):
+        inst = self.instantiate_from("immunizationrecommendation-target-disease-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ImmunizationRecommendation instance")
+        self.implImmunizationRecommendation2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ImmunizationRecommendation", js["resourceType"])
+        inst2 = immunizationrecommendation.ImmunizationRecommendation(js)
+        self.implImmunizationRecommendation2(inst2)
+    
+    def implImmunizationRecommendation2(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.1235")
+        self.assertEqual(inst.recommendation[0].date.date, FHIRDate("2015-02-09T11:04:15.817-05:00").date)
+        self.assertEqual(inst.recommendation[0].date.as_json(), "2015-02-09T11:04:15.817-05:00")
+        self.assertEqual(inst.recommendation[0].dateCriterion[0].code.coding[0].code, "earliest")
+        self.assertEqual(inst.recommendation[0].dateCriterion[0].code.coding[0].display, "Earliest Date")
+        self.assertEqual(inst.recommendation[0].dateCriterion[0].code.coding[0].system, "http://hl7.org/fhir/immunization-recommendation-date-criterion")
+        self.assertEqual(inst.recommendation[0].dateCriterion[0].value.date, FHIRDate("2015-12-01T00:00:00-05:00").date)
+        self.assertEqual(inst.recommendation[0].dateCriterion[0].value.as_json(), "2015-12-01T00:00:00-05:00")
+        self.assertEqual(inst.recommendation[0].dateCriterion[1].code.coding[0].code, "recommended")
+        self.assertEqual(inst.recommendation[0].dateCriterion[1].code.coding[0].display, "Recommended")
+        self.assertEqual(inst.recommendation[0].dateCriterion[1].code.coding[0].system, "http://hl7.org/fhir/immunization-recommendation-date-criterion")
+        self.assertEqual(inst.recommendation[0].dateCriterion[1].value.date, FHIRDate("2015-12-01T00:00:00-05:00").date)
+        self.assertEqual(inst.recommendation[0].dateCriterion[1].value.as_json(), "2015-12-01T00:00:00-05:00")
+        self.assertEqual(inst.recommendation[0].dateCriterion[2].code.coding[0].code, "overdue")
+        self.assertEqual(inst.recommendation[0].dateCriterion[2].code.coding[0].display, "Past Due Date")
+        self.assertEqual(inst.recommendation[0].dateCriterion[2].code.coding[0].system, "http://hl7.org/fhir/immunization-recommendation-date-criterion")
+        self.assertEqual(inst.recommendation[0].dateCriterion[2].value.date, FHIRDate("2016-12-28T00:00:00-05:00").date)
+        self.assertEqual(inst.recommendation[0].dateCriterion[2].value.as_json(), "2016-12-28T00:00:00-05:00")
+        self.assertEqual(inst.recommendation[0].doseNumber, 1)
+        self.assertEqual(inst.recommendation[0].forecastStatus.text, "Not Complete")
+        self.assertEqual(inst.recommendation[0].protocol.description, "First sequence in protocol")
+        self.assertEqual(inst.recommendation[0].protocol.doseSequence, 1)
+        self.assertEqual(inst.recommendation[0].protocol.series, "Vaccination Series 1")
+        self.assertEqual(inst.recommendation[0].targetDisease.coding[0].code, "40468003")
+        self.assertEqual(inst.recommendation[0].targetDisease.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Authored by Joginder Madra</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/implementationguide.py b/fhirclient/models/implementationguide.py
new file mode 100644
index 0000000..0bc061b
--- /dev/null
+++ b/fhirclient/models/implementationguide.py
@@ -0,0 +1,389 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ImplementationGuide) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ImplementationGuide(domainresource.DomainResource):
+    """ A set of rules about how FHIR is used.
+    
+    A set of rules of how FHIR is used to solve a particular problem. This
+    resource is used to gather all the parts of an implementation guide into a
+    logical whole and to publish a computable definition of all the parts.
+    """
+    
+    resource_type = "ImplementationGuide"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.binary = None
+        """ Image, css, script, etc..
+        List of `str` items. """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.dependency = None
+        """ Another Implementation guide this depends on.
+        List of `ImplementationGuideDependency` items (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the implementation guide.
+        Type `str`. """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.fhirVersion = None
+        """ FHIR Version this Implementation Guide targets.
+        Type `str`. """
+        
+        self.global_fhir = None
+        """ Profiles that apply globally.
+        List of `ImplementationGuideGlobal` items (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for implementation guide (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this implementation guide (computer friendly).
+        Type `str`. """
+        
+        self.package = None
+        """ Group of resources as used in .page.package.
+        List of `ImplementationGuidePackage` items (represented as `dict` in JSON). """
+        
+        self.page = None
+        """ Page/Section in the Guide.
+        Type `ImplementationGuidePage` (represented as `dict` in JSON). """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this implementation guide (globally
+        unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the implementation guide.
+        Type `str`. """
+        
+        super(ImplementationGuide, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImplementationGuide, self).elementProperties()
+        js.extend([
+            ("binary", "binary", str, True, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("dependency", "dependency", ImplementationGuideDependency, True, None, False),
+            ("description", "description", str, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("fhirVersion", "fhirVersion", str, False, None, False),
+            ("global_fhir", "global", ImplementationGuideGlobal, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("name", "name", str, False, None, True),
+            ("package", "package", ImplementationGuidePackage, True, None, False),
+            ("page", "page", ImplementationGuidePage, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("url", "url", str, False, None, True),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ImplementationGuideDependency(backboneelement.BackboneElement):
+    """ Another Implementation guide this depends on.
+    
+    Another implementation guide that this implementation depends on.
+    Typically, an implementation guide uses value sets, profiles etc.defined in
+    other implementation guides.
+    """
+    
+    resource_type = "ImplementationGuideDependency"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.type = None
+        """ reference | inclusion.
+        Type `str`. """
+        
+        self.uri = None
+        """ Where to find dependency.
+        Type `str`. """
+        
+        super(ImplementationGuideDependency, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImplementationGuideDependency, self).elementProperties()
+        js.extend([
+            ("type", "type", str, False, None, True),
+            ("uri", "uri", str, False, None, True),
+        ])
+        return js
+
+
+class ImplementationGuideGlobal(backboneelement.BackboneElement):
+    """ Profiles that apply globally.
+    
+    A set of profiles that all resources covered by this implementation guide
+    must conform to.
+    """
+    
+    resource_type = "ImplementationGuideGlobal"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.profile = None
+        """ Profile that all resources must conform to.
+        Type `FHIRReference` referencing `StructureDefinition` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type this profiles applies to.
+        Type `str`. """
+        
+        super(ImplementationGuideGlobal, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImplementationGuideGlobal, self).elementProperties()
+        js.extend([
+            ("profile", "profile", fhirreference.FHIRReference, False, None, True),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+class ImplementationGuidePackage(backboneelement.BackboneElement):
+    """ Group of resources as used in .page.package.
+    
+    A logical group of resources. Logical groups can be used when building
+    pages.
+    """
+    
+    resource_type = "ImplementationGuidePackage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Human readable text describing the package.
+        Type `str`. """
+        
+        self.name = None
+        """ Name used .page.package.
+        Type `str`. """
+        
+        self.resource = None
+        """ Resource in the implementation guide.
+        List of `ImplementationGuidePackageResource` items (represented as `dict` in JSON). """
+        
+        super(ImplementationGuidePackage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImplementationGuidePackage, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("name", "name", str, False, None, True),
+            ("resource", "resource", ImplementationGuidePackageResource, True, None, True),
+        ])
+        return js
+
+
+class ImplementationGuidePackageResource(backboneelement.BackboneElement):
+    """ Resource in the implementation guide.
+    
+    A resource that is part of the implementation guide. Conformance resources
+    (value set, structure definition, capability statements etc.) are obvious
+    candidates for inclusion, but any kind of resource can be included as an
+    example resource.
+    """
+    
+    resource_type = "ImplementationGuidePackageResource"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.acronym = None
+        """ Short code to identify the resource.
+        Type `str`. """
+        
+        self.description = None
+        """ Reason why included in guide.
+        Type `str`. """
+        
+        self.example = None
+        """ If not an example, has its normal meaning.
+        Type `bool`. """
+        
+        self.exampleFor = None
+        """ Resource this is an example of (if applicable).
+        Type `FHIRReference` referencing `StructureDefinition` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Human Name for the resource.
+        Type `str`. """
+        
+        self.sourceReference = None
+        """ Location of the resource.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.sourceUri = None
+        """ Location of the resource.
+        Type `str`. """
+        
+        super(ImplementationGuidePackageResource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImplementationGuidePackageResource, self).elementProperties()
+        js.extend([
+            ("acronym", "acronym", str, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("example", "example", bool, False, None, True),
+            ("exampleFor", "exampleFor", fhirreference.FHIRReference, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("sourceReference", "sourceReference", fhirreference.FHIRReference, False, "source", True),
+            ("sourceUri", "sourceUri", str, False, "source", True),
+        ])
+        return js
+
+
+class ImplementationGuidePage(backboneelement.BackboneElement):
+    """ Page/Section in the Guide.
+    
+    A page / section in the implementation guide. The root page is the
+    implementation guide home page.
+    """
+    
+    resource_type = "ImplementationGuidePage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.format = None
+        """ Format of the page (e.g. html, markdown, etc.).
+        Type `str`. """
+        
+        self.kind = None
+        """ page | example | list | include | directory | dictionary | toc |
+        resource.
+        Type `str`. """
+        
+        self.package = None
+        """ Name of package to include.
+        List of `str` items. """
+        
+        self.page = None
+        """ Nested Pages / Sections.
+        List of `ImplementationGuidePage` items (represented as `dict` in JSON). """
+        
+        self.source = None
+        """ Where to find that page.
+        Type `str`. """
+        
+        self.title = None
+        """ Short title shown for navigational assistance.
+        Type `str`. """
+        
+        self.type = None
+        """ Kind of resource to include in the list.
+        List of `str` items. """
+        
+        super(ImplementationGuidePage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ImplementationGuidePage, self).elementProperties()
+        js.extend([
+            ("format", "format", str, False, None, False),
+            ("kind", "kind", str, False, None, True),
+            ("package", "package", str, True, None, False),
+            ("page", "page", ImplementationGuidePage, True, None, False),
+            ("source", "source", str, False, None, True),
+            ("title", "title", str, False, None, True),
+            ("type", "type", str, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/implementationguide_tests.py b/fhirclient/models/implementationguide_tests.py
new file mode 100644
index 0000000..f0055d5
--- /dev/null
+++ b/fhirclient/models/implementationguide_tests.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import implementationguide
+from .fhirdate import FHIRDate
+
+
+class ImplementationGuideTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ImplementationGuide", js["resourceType"])
+        return implementationguide.ImplementationGuide(js)
+    
+    def testImplementationGuide1(self):
+        inst = self.instantiate_from("implementationguide-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ImplementationGuide instance")
+        self.implImplementationGuide1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ImplementationGuide", js["resourceType"])
+        inst2 = implementationguide.ImplementationGuide(js)
+        self.implImplementationGuide1(inst2)
+    
+    def implImplementationGuide1(self, inst):
+        self.assertEqual(inst.binary[0], "http://h7.org/fhir/fhir.css")
+        self.assertEqual(inst.contact[0].name, "ONC")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://www.healthit.gov")
+        self.assertEqual(inst.contact[1].name, "HL7")
+        self.assertEqual(inst.contact[1].telecom[0].system, "url")
+        self.assertEqual(inst.contact[1].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.copyright, "Published by ONC under the standard FHIR license (CC0)")
+        self.assertEqual(inst.date.date, FHIRDate("2015-01-01").date)
+        self.assertEqual(inst.date.as_json(), "2015-01-01")
+        self.assertEqual(inst.dependency[0].type, "reference")
+        self.assertEqual(inst.dependency[0].uri, "http://hl7.org/fhir/ImplementationGuide/uscore")
+        self.assertFalse(inst.experimental)
+        self.assertEqual(inst.fhirVersion, "1.0.0")
+        self.assertEqual(inst.global_fhir[0].type, "Patient")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.name, "Data Access Framework (DAF)")
+        self.assertEqual(inst.package[0].description, "Base package (not broken up into multiple packages)")
+        self.assertEqual(inst.package[0].name, "test")
+        self.assertEqual(inst.package[0].resource[0].acronym, "daf-tst")
+        self.assertEqual(inst.package[0].resource[0].description, "A test example to show how a package works")
+        self.assertTrue(inst.package[0].resource[0].example)
+        self.assertEqual(inst.package[0].resource[0].name, "Test Example")
+        self.assertEqual(inst.package[0].resource[0].sourceUri, "test.html")
+        self.assertEqual(inst.page.kind, "page")
+        self.assertEqual(inst.page.page[0].format, "text/html")
+        self.assertEqual(inst.page.page[0].kind, "list")
+        self.assertEqual(inst.page.page[0].package[0], "test")
+        self.assertEqual(inst.page.page[0].source, "list.html")
+        self.assertEqual(inst.page.page[0].title, "Value Set Page")
+        self.assertEqual(inst.page.page[0].type[0], "ValueSet")
+        self.assertEqual(inst.page.source, "patient-example.html")
+        self.assertEqual(inst.page.title, "Example Patient Page")
+        self.assertEqual(inst.publisher, "ONC / HL7 Joint project")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/us/daf")
+        self.assertEqual(inst.version, "0")
+
diff --git a/fhirclient/models/library.py b/fhirclient/models/library.py
new file mode 100644
index 0000000..73b020b
--- /dev/null
+++ b/fhirclient/models/library.py
@@ -0,0 +1,213 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Library) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Library(domainresource.DomainResource):
+    """ Represents a library of quality improvement components.
+    
+    The Library resource is a general-purpose container for knowledge asset
+    definitions. It can be used to describe and expose existing knowledge
+    assets such as logic libraries and information model descriptions, as well
+    as to describe a collection of knowledge assets.
+    """
+    
+    resource_type = "Library"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.approvalDate = None
+        """ When the library was approved by publisher.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.content = None
+        """ Contents of the library, either embedded or referenced.
+        List of `Attachment` items (represented as `dict` in JSON). """
+        
+        self.contributor = None
+        """ A content contributor.
+        List of `Contributor` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.dataRequirement = None
+        """ What data is referenced by this library.
+        List of `DataRequirement` items (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the library.
+        Type `str`. """
+        
+        self.effectivePeriod = None
+        """ When the library is expected to be used.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.identifier = None
+        """ Additional identifier for the library.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for library (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.lastReviewDate = None
+        """ When the library was last reviewed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.name = None
+        """ Name for this library (computer friendly).
+        Type `str`. """
+        
+        self.parameter = None
+        """ Parameters defined by the library.
+        List of `ParameterDefinition` items (represented as `dict` in JSON). """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this library is defined.
+        Type `str`. """
+        
+        self.relatedArtifact = None
+        """ Additional documentation, citations, etc..
+        List of `RelatedArtifact` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this library (human friendly).
+        Type `str`. """
+        
+        self.topic = None
+        """ E.g. Education, Treatment, Assessment, etc.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ logic-library | model-definition | asset-collection | module-
+        definition.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.url = None
+        """ Logical URI to reference this library (globally unique).
+        Type `str`. """
+        
+        self.usage = None
+        """ Describes the clinical usage of the library.
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the library.
+        Type `str`. """
+        
+        super(Library, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Library, self).elementProperties()
+        js.extend([
+            ("approvalDate", "approvalDate", fhirdate.FHIRDate, False, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("content", "content", attachment.Attachment, True, None, False),
+            ("contributor", "contributor", contributor.Contributor, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("dataRequirement", "dataRequirement", datarequirement.DataRequirement, True, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("lastReviewDate", "lastReviewDate", fhirdate.FHIRDate, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("parameter", "parameter", parameterdefinition.ParameterDefinition, True, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("relatedArtifact", "relatedArtifact", relatedartifact.RelatedArtifact, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("topic", "topic", codeableconcept.CodeableConcept, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+            ("url", "url", str, False, None, False),
+            ("usage", "usage", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import contributor
+except ImportError:
+    contributor = sys.modules[__package__ + '.contributor']
+try:
+    from . import datarequirement
+except ImportError:
+    datarequirement = sys.modules[__package__ + '.datarequirement']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import parameterdefinition
+except ImportError:
+    parameterdefinition = sys.modules[__package__ + '.parameterdefinition']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import relatedartifact
+except ImportError:
+    relatedartifact = sys.modules[__package__ + '.relatedartifact']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/library_tests.py b/fhirclient/models/library_tests.py
new file mode 100644
index 0000000..665ac33
--- /dev/null
+++ b/fhirclient/models/library_tests.py
@@ -0,0 +1,180 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import library
+from .fhirdate import FHIRDate
+
+
+class LibraryTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Library", js["resourceType"])
+        return library.Library(js)
+    
+    def testLibrary1(self):
+        inst = self.instantiate_from("library-cms146-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Library instance")
+        self.implLibrary1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Library", js["resourceType"])
+        inst2 = library.Library(js)
+        self.implLibrary1(inst2)
+    
+    def implLibrary1(self, inst):
+        self.assertEqual(inst.content[0].contentType, "text/cql")
+        self.assertEqual(inst.content[0].url, "library-cms146-example-content.cql")
+        self.assertEqual(inst.dataRequirement[0].type, "Patient")
+        self.assertEqual(inst.dataRequirement[1].codeFilter[0].path, "category")
+        self.assertEqual(inst.dataRequirement[1].codeFilter[0].valueCode[0], "diagnosis")
+        self.assertEqual(inst.dataRequirement[1].codeFilter[1].path, "clinicalStatus")
+        self.assertEqual(inst.dataRequirement[1].codeFilter[1].valueCode[0], "confirmed")
+        self.assertEqual(inst.dataRequirement[1].codeFilter[2].path, "code")
+        self.assertEqual(inst.dataRequirement[1].codeFilter[2].valueSetString, "2.16.840.1.113883.3.464.1003.102.12.1011")
+        self.assertEqual(inst.dataRequirement[1].type, "Condition")
+        self.assertEqual(inst.dataRequirement[2].codeFilter[0].path, "category")
+        self.assertEqual(inst.dataRequirement[2].codeFilter[0].valueCode[0], "diagnosis")
+        self.assertEqual(inst.dataRequirement[2].codeFilter[1].path, "clinicalStatus")
+        self.assertEqual(inst.dataRequirement[2].codeFilter[1].valueCode[0], "confirmed")
+        self.assertEqual(inst.dataRequirement[2].codeFilter[2].path, "code")
+        self.assertEqual(inst.dataRequirement[2].codeFilter[2].valueSetString, "2.16.840.1.113883.3.464.1003.102.12.1012")
+        self.assertEqual(inst.dataRequirement[2].type, "Condition")
+        self.assertEqual(inst.dataRequirement[3].codeFilter[0].path, "status")
+        self.assertEqual(inst.dataRequirement[3].codeFilter[0].valueCode[0], "finished")
+        self.assertEqual(inst.dataRequirement[3].codeFilter[1].path, "class")
+        self.assertEqual(inst.dataRequirement[3].codeFilter[1].valueCode[0], "ambulatory")
+        self.assertEqual(inst.dataRequirement[3].codeFilter[2].path, "type")
+        self.assertEqual(inst.dataRequirement[3].codeFilter[2].valueSetString, "2.16.840.1.113883.3.464.1003.101.12.1061")
+        self.assertEqual(inst.dataRequirement[3].type, "Encounter")
+        self.assertEqual(inst.dataRequirement[4].codeFilter[0].path, "diagnosis")
+        self.assertEqual(inst.dataRequirement[4].codeFilter[0].valueSetString, "2.16.840.1.113883.3.464.1003.198.12.1012")
+        self.assertEqual(inst.dataRequirement[4].type, "DiagnosticReport")
+        self.assertEqual(inst.dataRequirement[5].codeFilter[0].path, "code")
+        self.assertEqual(inst.dataRequirement[5].codeFilter[0].valueSetString, "2.16.840.1.113883.3.464.1003.196.12.1001")
+        self.assertEqual(inst.dataRequirement[5].type, "Medication")
+        self.assertEqual(inst.dataRequirement[6].codeFilter[0].path, "status")
+        self.assertEqual(inst.dataRequirement[6].codeFilter[0].valueCode[0], "active")
+        self.assertEqual(inst.dataRequirement[6].codeFilter[1].path, "medication.code")
+        self.assertEqual(inst.dataRequirement[6].codeFilter[1].valueSetString, "2.16.840.1.113883.3.464.1003.196.12.1001")
+        self.assertEqual(inst.dataRequirement[6].type, "MedicationRequest")
+        self.assertEqual(inst.dataRequirement[7].codeFilter[0].path, "status")
+        self.assertEqual(inst.dataRequirement[7].codeFilter[0].valueCode[0], "completed")
+        self.assertEqual(inst.dataRequirement[7].codeFilter[1].path, "medication.code")
+        self.assertEqual(inst.dataRequirement[7].codeFilter[1].valueSetString, "2.16.840.1.113883.3.464.1003.196.12.1001")
+        self.assertEqual(inst.dataRequirement[7].type, "MedicationStatement")
+        self.assertEqual(inst.date.date, FHIRDate("2015-07-22").date)
+        self.assertEqual(inst.date.as_json(), "2015-07-22")
+        self.assertEqual(inst.description, "Logic for CMS 146: Appropriate Testing for Children with Pharyngitis")
+        self.assertEqual(inst.id, "library-cms146-example")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "CMS146")
+        self.assertEqual(inst.relatedArtifact[0].type, "depends-on")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Appropriate Testing for Children with Pharyngitis")
+        self.assertEqual(inst.type.coding[0].code, "logic-library")
+        self.assertEqual(inst.version, "2.0.0")
+    
+    def testLibrary2(self):
+        inst = self.instantiate_from("library-composition-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Library instance")
+        self.implLibrary2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Library", js["resourceType"])
+        inst2 = library.Library(js)
+        self.implLibrary2(inst2)
+    
+    def implLibrary2(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2017-03-10").date)
+        self.assertEqual(inst.date.as_json(), "2017-03-10")
+        self.assertEqual(inst.description, "Artifacts required for implementation of Zika Virus Management")
+        self.assertEqual(inst.id, "composition-example")
+        self.assertEqual(inst.identifier[0].system, "http://example.org")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "Zika Artifacts")
+        self.assertEqual(inst.relatedArtifact[0].type, "composed-of")
+        self.assertEqual(inst.relatedArtifact[1].type, "composed-of")
+        self.assertEqual(inst.relatedArtifact[2].type, "composed-of")
+        self.assertEqual(inst.relatedArtifact[3].type, "composed-of")
+        self.assertEqual(inst.relatedArtifact[4].type, "composed-of")
+        self.assertEqual(inst.relatedArtifact[5].type, "composed-of")
+        self.assertEqual(inst.relatedArtifact[6].type, "derived-from")
+        self.assertEqual(inst.relatedArtifact[6].url, "https://www.cdc.gov/mmwr/volumes/65/wr/mm6539e1.htm?s_cid=mm6539e1_w")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Zika Artifacts")
+        self.assertEqual(inst.topic[0].text, "Zika Virus Management")
+        self.assertEqual(inst.type.coding[0].code, "asset-collection")
+        self.assertEqual(inst.version, "1.0.0")
+    
+    def testLibrary3(self):
+        inst = self.instantiate_from("library-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Library instance")
+        self.implLibrary3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Library", js["resourceType"])
+        inst2 = library.Library(js)
+        self.implLibrary3(inst2)
+    
+    def implLibrary3(self, inst):
+        self.assertEqual(inst.content[0].contentType, "text/cql")
+        self.assertEqual(inst.content[0].url, "library-example-content.cql")
+        self.assertEqual(inst.dataRequirement[0].codeFilter[0].path, "code")
+        self.assertEqual(inst.dataRequirement[0].codeFilter[0].valueSetString, "Other Female Reproductive Conditions")
+        self.assertEqual(inst.dataRequirement[0].type, "Condition")
+        self.assertEqual(inst.date.date, FHIRDate("2015-07-22").date)
+        self.assertEqual(inst.date.as_json(), "2015-07-22")
+        self.assertEqual(inst.description, "Common Logic for adherence to Chlamydia Screening guidelines")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "ChalmydiaScreening_Common")
+        self.assertEqual(inst.relatedArtifact[0].type, "depends-on")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Chlamydia Screening Common Library")
+        self.assertEqual(inst.topic[0].text, "Chlamydia Screening")
+        self.assertEqual(inst.type.coding[0].code, "logic-library")
+        self.assertEqual(inst.version, "2.0.0")
+    
+    def testLibrary4(self):
+        inst = self.instantiate_from("library-predecessor-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Library instance")
+        self.implLibrary4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Library", js["resourceType"])
+        inst2 = library.Library(js)
+        self.implLibrary4(inst2)
+    
+    def implLibrary4(self, inst):
+        self.assertEqual(inst.content[0].contentType, "text/cql")
+        self.assertEqual(inst.content[0].title, "FHIR Helpers")
+        self.assertEqual(inst.content[0].url, "library-fhir-helpers-content.cql")
+        self.assertEqual(inst.date.date, FHIRDate("2016-11-14").date)
+        self.assertEqual(inst.date.as_json(), "2016-11-14")
+        self.assertEqual(inst.description, "FHIR Helpers")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "library-fhir-helpers-predecessor")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "FHIRHelpers")
+        self.assertEqual(inst.relatedArtifact[0].type, "depends-on")
+        self.assertEqual(inst.relatedArtifact[1].type, "successor")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "FHIR Helpers")
+        self.assertEqual(inst.topic[0].text, "FHIR Helpers")
+        self.assertEqual(inst.type.coding[0].code, "logic-library")
+        self.assertEqual(inst.version, "1.6")
+
diff --git a/fhirclient/models/linkage.py b/fhirclient/models/linkage.py
new file mode 100644
index 0000000..68a21d3
--- /dev/null
+++ b/fhirclient/models/linkage.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Linkage) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Linkage(domainresource.DomainResource):
+    """ Links records for 'same' item.
+    
+    Identifies two or more records (resource instances) that are referring to
+    the same real-world "occurrence".
+    """
+    
+    resource_type = "Linkage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Whether this linkage assertion is active or not.
+        Type `bool`. """
+        
+        self.author = None
+        """ Who is responsible for linkages.
+        Type `FHIRReference` referencing `Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.item = None
+        """ Item to be linked.
+        List of `LinkageItem` items (represented as `dict` in JSON). """
+        
+        super(Linkage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Linkage, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("author", "author", fhirreference.FHIRReference, False, None, False),
+            ("item", "item", LinkageItem, True, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class LinkageItem(backboneelement.BackboneElement):
+    """ Item to be linked.
+    
+    Identifies one of the records that is considered to refer to the same real-
+    world occurrence as well as how the items hould be evaluated within the
+    collection of linked items.
+    """
+    
+    resource_type = "LinkageItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.resource = None
+        """ Resource being linked.
+        Type `FHIRReference` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ source | alternate | historical.
+        Type `str`. """
+        
+        super(LinkageItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(LinkageItem, self).elementProperties()
+        js.extend([
+            ("resource", "resource", fhirreference.FHIRReference, False, None, True),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
diff --git a/fhirclient/models/linkage_tests.py b/fhirclient/models/linkage_tests.py
new file mode 100644
index 0000000..1dcf96e
--- /dev/null
+++ b/fhirclient/models/linkage_tests.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import linkage
+from .fhirdate import FHIRDate
+
+
+class LinkageTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Linkage", js["resourceType"])
+        return linkage.Linkage(js)
+    
+    def testLinkage1(self):
+        inst = self.instantiate_from("linkage-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Linkage instance")
+        self.implLinkage1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Linkage", js["resourceType"])
+        inst2 = linkage.Linkage(js)
+        self.implLinkage1(inst2)
+    
+    def implLinkage1(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.item[0].type, "source")
+        self.assertEqual(inst.item[1].type, "alternate")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/list.py b/fhirclient/models/list.py
new file mode 100644
index 0000000..b06911c
--- /dev/null
+++ b/fhirclient/models/list.py
@@ -0,0 +1,167 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/List) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class List(domainresource.DomainResource):
+    """ Information summarized from a list of other resources.
+    
+    A set of information summarized from a list of other resources.
+    """
+    
+    resource_type = "List"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ What the purpose of this list is.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ When the list was prepared.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.emptyReason = None
+        """ Why list is empty.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.encounter = None
+        """ Context in which list created.
+        Type `FHIRReference` referencing `Encounter` (represented as `dict` in JSON). """
+        
+        self.entry = None
+        """ Entries in the list.
+        List of `ListEntry` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.mode = None
+        """ working | snapshot | changes.
+        Type `str`. """
+        
+        self.note = None
+        """ Comments about the list.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.orderedBy = None
+        """ What order the list has.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.source = None
+        """ Who and/or what defined the list contents (aka Author).
+        Type `FHIRReference` referencing `Practitioner, Patient, Device` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ current | retired | entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ If all resources have the same subject.
+        Type `FHIRReference` referencing `Patient, Group, Device, Location` (represented as `dict` in JSON). """
+        
+        self.title = None
+        """ Descriptive name for the list.
+        Type `str`. """
+        
+        super(List, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(List, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("emptyReason", "emptyReason", codeableconcept.CodeableConcept, False, None, False),
+            ("encounter", "encounter", fhirreference.FHIRReference, False, None, False),
+            ("entry", "entry", ListEntry, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("mode", "mode", str, False, None, True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("orderedBy", "orderedBy", codeableconcept.CodeableConcept, False, None, False),
+            ("source", "source", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("title", "title", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ListEntry(backboneelement.BackboneElement):
+    """ Entries in the list.
+    
+    Entries in this list.
+    """
+    
+    resource_type = "ListEntry"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.date = None
+        """ When item added to list.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.deleted = None
+        """ If this item is actually marked as deleted.
+        Type `bool`. """
+        
+        self.flag = None
+        """ Status/Workflow information about this item.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.item = None
+        """ Actual entry.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(ListEntry, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ListEntry, self).elementProperties()
+        js.extend([
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("deleted", "deleted", bool, False, None, False),
+            ("flag", "flag", codeableconcept.CodeableConcept, False, None, False),
+            ("item", "item", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/list_tests.py b/fhirclient/models/list_tests.py
new file mode 100644
index 0000000..8ecde7d
--- /dev/null
+++ b/fhirclient/models/list_tests.py
@@ -0,0 +1,253 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import list
+from .fhirdate import FHIRDate
+
+
+class ListTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("List", js["resourceType"])
+        return list.List(js)
+    
+    def testList1(self):
+        inst = self.instantiate_from("list-example-allergies.json")
+        self.assertIsNotNone(inst, "Must have instantiated a List instance")
+        self.implList1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("List", js["resourceType"])
+        inst2 = list.List(js)
+        self.implList1(inst2)
+    
+    def implList1(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "52472-8")
+        self.assertEqual(inst.code.coding[0].display, "Allergies and Adverse Drug Reactions")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "Current Allergy List")
+        self.assertEqual(inst.date.date, FHIRDate("2015-07-14T23:10:23+11:00").date)
+        self.assertEqual(inst.date.as_json(), "2015-07-14T23:10:23+11:00")
+        self.assertEqual(inst.id, "current-allergies")
+        self.assertEqual(inst.mode, "working")
+        self.assertEqual(inst.orderedBy.coding[0].code, "entry-date")
+        self.assertEqual(inst.orderedBy.coding[0].system, "http://hl7.org/fhir/list-order")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Current Allergy List")
+    
+    def testList2(self):
+        inst = self.instantiate_from("list-example-double-cousin-relationship-pedigree.json")
+        self.assertIsNotNone(inst, "Must have instantiated a List instance")
+        self.implList2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("List", js["resourceType"])
+        inst2 = list.List(js)
+        self.implList2(inst2)
+    
+    def implList2(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "80738-8")
+        self.assertEqual(inst.code.coding[0].display, "TPMT gene mutations found [Identifier] in Blood or Tissue by Sequencing Nominal")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "TPMT gene mutations found [Identifier] in Blood or Tissue by Sequencing Nominal")
+        self.assertEqual(inst.contained[0].id, "1")
+        self.assertEqual(inst.contained[1].id, "2")
+        self.assertEqual(inst.contained[2].id, "3")
+        self.assertEqual(inst.contained[3].id, "4")
+        self.assertEqual(inst.contained[4].id, "5")
+        self.assertEqual(inst.contained[5].id, "6")
+        self.assertEqual(inst.id, "example-double-cousin-relationship")
+        self.assertEqual(inst.mode, "snapshot")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testList3(self):
+        inst = self.instantiate_from("list-example-empty.json")
+        self.assertIsNotNone(inst, "Must have instantiated a List instance")
+        self.implList3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("List", js["resourceType"])
+        inst2 = list.List(js)
+        self.implList3(inst2)
+    
+    def implList3(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "182836005")
+        self.assertEqual(inst.code.coding[0].display, "Review of medication")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Medication Review")
+        self.assertEqual(inst.date.date, FHIRDate("2012-11-26T07:30:23+11:00").date)
+        self.assertEqual(inst.date.as_json(), "2012-11-26T07:30:23+11:00")
+        self.assertEqual(inst.emptyReason.coding[0].code, "nilknown")
+        self.assertEqual(inst.emptyReason.coding[0].display, "Nil Known")
+        self.assertEqual(inst.emptyReason.coding[0].system, "http://hl7.org/fhir/list-empty-reason")
+        self.assertEqual(inst.emptyReason.text, "The patient is not on any medications")
+        self.assertEqual(inst.id, "example-empty")
+        self.assertEqual(inst.mode, "snapshot")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testList4(self):
+        inst = self.instantiate_from("list-example-familyhistory-f201-roel.json")
+        self.assertIsNotNone(inst, "Must have instantiated a List instance")
+        self.implList4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("List", js["resourceType"])
+        inst2 = list.List(js)
+        self.implList4(inst2)
+    
+    def implList4(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "8670-2")
+        self.assertEqual(inst.code.coding[0].display, "History of family member diseases")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.contained[0].id, "fmh-1")
+        self.assertEqual(inst.contained[1].id, "fmh-2")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.mode, "snapshot")
+        self.assertEqual(inst.note[0].text, "Both parents, both brothers and both children (twin) are still alive.")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testList5(self):
+        inst = self.instantiate_from("list-example-familyhistory-genetics-profile-annie.json")
+        self.assertIsNotNone(inst, "Must have instantiated a List instance")
+        self.implList5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("List", js["resourceType"])
+        inst2 = list.List(js)
+        self.implList5(inst2)
+    
+    def implList5(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "8670-2")
+        self.assertEqual(inst.code.coding[0].display, "History of family member diseases")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.contained[0].id, "image")
+        self.assertEqual(inst.contained[1].id, "1")
+        self.assertEqual(inst.contained[2].id, "2")
+        self.assertEqual(inst.contained[3].id, "3")
+        self.assertEqual(inst.contained[4].id, "4")
+        self.assertEqual(inst.contained[5].id, "5")
+        self.assertEqual(inst.contained[6].id, "6")
+        self.assertEqual(inst.contained[7].id, "7")
+        self.assertEqual(inst.contained[8].id, "8")
+        self.assertEqual(inst.contained[9].id, "9")
+        self.assertEqual(inst.id, "prognosis")
+        self.assertEqual(inst.mode, "snapshot")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testList6(self):
+        inst = self.instantiate_from("list-example-familyhistory-genetics-profile.json")
+        self.assertIsNotNone(inst, "Must have instantiated a List instance")
+        self.implList6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("List", js["resourceType"])
+        inst2 = list.List(js)
+        self.implList6(inst2)
+    
+    def implList6(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "8670-2")
+        self.assertEqual(inst.code.coding[0].display, "History of family member diseases")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.contained[0].id, "1")
+        self.assertEqual(inst.contained[1].id, "2")
+        self.assertEqual(inst.contained[2].id, "3")
+        self.assertEqual(inst.contained[3].id, "4")
+        self.assertEqual(inst.contained[4].id, "5")
+        self.assertEqual(inst.contained[5].id, "6")
+        self.assertEqual(inst.contained[6].id, "7")
+        self.assertEqual(inst.contained[7].id, "8")
+        self.assertEqual(inst.id, "genetic")
+        self.assertEqual(inst.mode, "snapshot")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testList7(self):
+        inst = self.instantiate_from("list-example-medlist.json")
+        self.assertIsNotNone(inst, "Must have instantiated a List instance")
+        self.implList7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("List", js["resourceType"])
+        inst2 = list.List(js)
+        self.implList7(inst2)
+    
+    def implList7(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "182836005")
+        self.assertEqual(inst.code.coding[0].display, "Review of medication")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Medication Review")
+        self.assertEqual(inst.date.date, FHIRDate("2013-11-20T23:10:23+11:00").date)
+        self.assertEqual(inst.date.as_json(), "2013-11-20T23:10:23+11:00")
+        self.assertEqual(inst.entry[0].flag.coding[0].code, "01")
+        self.assertEqual(inst.entry[0].flag.coding[0].display, "Prescribed")
+        self.assertEqual(inst.entry[0].flag.coding[0].system, "http://nehta.gov.au/codes/medications/changetype")
+        self.assertTrue(inst.entry[1].deleted)
+        self.assertEqual(inst.entry[1].flag.coding[0].code, "02")
+        self.assertEqual(inst.entry[1].flag.coding[0].display, "Cancelled")
+        self.assertEqual(inst.entry[1].flag.coding[0].system, "http://nehta.gov.au/codes/medications/changetype")
+        self.assertEqual(inst.id, "med-list")
+        self.assertEqual(inst.mode, "changes")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testList8(self):
+        inst = self.instantiate_from("list-example-simple-empty.json")
+        self.assertIsNotNone(inst, "Must have instantiated a List instance")
+        self.implList8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("List", js["resourceType"])
+        inst2 = list.List(js)
+        self.implList8(inst2)
+    
+    def implList8(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "346638")
+        self.assertEqual(inst.code.coding[0].display, "Patient Admission List")
+        self.assertEqual(inst.code.coding[0].system, "http://acme.com/list-codes")
+        self.assertEqual(inst.date.date, FHIRDate("2016-07-14T11:54:05+10:00").date)
+        self.assertEqual(inst.date.as_json(), "2016-07-14T11:54:05+10:00")
+        self.assertEqual(inst.id, "example-simple-empty")
+        self.assertEqual(inst.mode, "snapshot")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testList9(self):
+        inst = self.instantiate_from("list-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a List instance")
+        self.implList9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("List", js["resourceType"])
+        inst2 = list.List(js)
+        self.implList9(inst2)
+    
+    def implList9(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2012-11-25T22:17:00+11:00").date)
+        self.assertEqual(inst.date.as_json(), "2012-11-25T22:17:00+11:00")
+        self.assertTrue(inst.entry[0].deleted)
+        self.assertEqual(inst.entry[0].flag.text, "Deleted due to error")
+        self.assertEqual(inst.entry[1].date.date, FHIRDate("2012-11-21").date)
+        self.assertEqual(inst.entry[1].date.as_json(), "2012-11-21")
+        self.assertEqual(inst.entry[1].flag.text, "Added")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "urn:uuid:a9fcea7c-fcdf-4d17-a5e0-f26dda030b59")
+        self.assertEqual(inst.identifier[0].value, "23974652")
+        self.assertEqual(inst.mode, "changes")
+        self.assertEqual(inst.status, "current")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/location.py b/fhirclient/models/location.py
new file mode 100644
index 0000000..a52a5eb
--- /dev/null
+++ b/fhirclient/models/location.py
@@ -0,0 +1,183 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Location) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Location(domainresource.DomainResource):
+    """ Details and position information for a physical place.
+    
+    Details and position information for a physical place where services are
+    provided  and resources and participants may be stored, found, contained or
+    accommodated.
+    """
+    
+    resource_type = "Location"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.address = None
+        """ Physical location.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.alias = None
+        """ A list of alternate names that the location is known as, or was
+        known as in the past.
+        List of `str` items. """
+        
+        self.description = None
+        """ Additional details about the location that could be displayed as
+        further information to identify the location beyond its name.
+        Type `str`. """
+        
+        self.endpoint = None
+        """ Technical endpoints providing access to services operated for the
+        location.
+        List of `FHIRReference` items referencing `Endpoint` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Unique code or number identifying the location to its users.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.managingOrganization = None
+        """ Organization responsible for provisioning and upkeep.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.mode = None
+        """ instance | kind.
+        Type `str`. """
+        
+        self.name = None
+        """ Name of the location as used by humans.
+        Type `str`. """
+        
+        self.operationalStatus = None
+        """ The Operational status of the location (typically only for a
+        bed/room).
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Another Location this one is physically part of.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.physicalType = None
+        """ Physical form of the location.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.position = None
+        """ The absolute geographic location.
+        Type `LocationPosition` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | suspended | inactive.
+        Type `str`. """
+        
+        self.telecom = None
+        """ Contact details of the location.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type of function performed.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(Location, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Location, self).elementProperties()
+        js.extend([
+            ("address", "address", address.Address, False, None, False),
+            ("alias", "alias", str, True, None, False),
+            ("description", "description", str, False, None, False),
+            ("endpoint", "endpoint", fhirreference.FHIRReference, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("managingOrganization", "managingOrganization", fhirreference.FHIRReference, False, None, False),
+            ("mode", "mode", str, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("operationalStatus", "operationalStatus", coding.Coding, False, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, False, None, False),
+            ("physicalType", "physicalType", codeableconcept.CodeableConcept, False, None, False),
+            ("position", "position", LocationPosition, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class LocationPosition(backboneelement.BackboneElement):
+    """ The absolute geographic location.
+    
+    The absolute geographic location of the Location, expressed using the WGS84
+    datum (This is the same co-ordinate system used in KML).
+    """
+    
+    resource_type = "LocationPosition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.altitude = None
+        """ Altitude with WGS84 datum.
+        Type `float`. """
+        
+        self.latitude = None
+        """ Latitude with WGS84 datum.
+        Type `float`. """
+        
+        self.longitude = None
+        """ Longitude with WGS84 datum.
+        Type `float`. """
+        
+        super(LocationPosition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(LocationPosition, self).elementProperties()
+        js.extend([
+            ("altitude", "altitude", float, False, None, False),
+            ("latitude", "latitude", float, False, None, True),
+            ("longitude", "longitude", float, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/location_tests.py b/fhirclient/models/location_tests.py
new file mode 100644
index 0000000..4f7d749
--- /dev/null
+++ b/fhirclient/models/location_tests.py
@@ -0,0 +1,217 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import location
+from .fhirdate import FHIRDate
+
+
+class LocationTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Location", js["resourceType"])
+        return location.Location(js)
+    
+    def testLocation1(self):
+        inst = self.instantiate_from("location-example-ambulance.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Location instance")
+        self.implLocation1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Location", js["resourceType"])
+        inst2 = location.Location(js)
+        self.implLocation1(inst2)
+    
+    def implLocation1(self, inst):
+        self.assertEqual(inst.description, "Ambulance provided by Burgers University Medical Center")
+        self.assertEqual(inst.id, "amb")
+        self.assertEqual(inst.mode, "kind")
+        self.assertEqual(inst.name, "BUMC Ambulance")
+        self.assertEqual(inst.physicalType.coding[0].code, "ve")
+        self.assertEqual(inst.physicalType.coding[0].display, "Vehicle")
+        self.assertEqual(inst.physicalType.coding[0].system, "http://hl7.org/fhir/location-physical-type")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "mobile")
+        self.assertEqual(inst.telecom[0].value, "2329")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Mobile Clinic</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "AMB")
+        self.assertEqual(inst.type.coding[0].display, "Ambulance")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v3/RoleCode")
+    
+    def testLocation2(self):
+        inst = self.instantiate_from("location-example-hl7hq.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Location instance")
+        self.implLocation2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Location", js["resourceType"])
+        inst2 = location.Location(js)
+        self.implLocation2(inst2)
+    
+    def implLocation2(self, inst):
+        self.assertEqual(inst.address.city, "Ann Arbor")
+        self.assertEqual(inst.address.country, "USA")
+        self.assertEqual(inst.address.line[0], "3300 Washtenaw Avenue, Suite 227")
+        self.assertEqual(inst.address.postalCode, "48104")
+        self.assertEqual(inst.address.state, "MI")
+        self.assertEqual(inst.description, "HL7 Headquarters")
+        self.assertEqual(inst.id, "hl7")
+        self.assertEqual(inst.mode, "instance")
+        self.assertEqual(inst.name, "Health Level Seven International")
+        self.assertEqual(inst.physicalType.coding[0].code, "bu")
+        self.assertEqual(inst.physicalType.coding[0].display, "Building")
+        self.assertEqual(inst.physicalType.coding[0].system, "http://hl7.org/fhir/location-physical-type")
+        self.assertEqual(inst.position.latitude, -83.69471)
+        self.assertEqual(inst.position.longitude, 42.2565)
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].value, "(+1) 734-677-7777")
+        self.assertEqual(inst.telecom[1].system, "fax")
+        self.assertEqual(inst.telecom[1].value, "(+1) 734-677-6622")
+        self.assertEqual(inst.telecom[2].system, "email")
+        self.assertEqual(inst.telecom[2].value, "hq at HL7.org")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "SLEEP")
+        self.assertEqual(inst.type.coding[0].display, "Sleep disorders unit")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v3/RoleCode")
+    
+    def testLocation3(self):
+        inst = self.instantiate_from("location-example-patients-home.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Location instance")
+        self.implLocation3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Location", js["resourceType"])
+        inst2 = location.Location(js)
+        self.implLocation3(inst2)
+    
+    def implLocation3(self, inst):
+        self.assertEqual(inst.description, "Patient's Home")
+        self.assertEqual(inst.id, "ph")
+        self.assertEqual(inst.mode, "kind")
+        self.assertEqual(inst.name, "Patient's Home")
+        self.assertEqual(inst.physicalType.coding[0].code, "ho")
+        self.assertEqual(inst.physicalType.coding[0].display, "House")
+        self.assertEqual(inst.physicalType.coding[0].system, "http://hl7.org/fhir/location-physical-type")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Patient's Home</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "PTRES")
+        self.assertEqual(inst.type.coding[0].display, "Patient's Residence")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v3/RoleCode")
+    
+    def testLocation4(self):
+        inst = self.instantiate_from("location-example-room.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Location instance")
+        self.implLocation4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Location", js["resourceType"])
+        inst2 = location.Location(js)
+        self.implLocation4(inst2)
+    
+    def implLocation4(self, inst):
+        self.assertEqual(inst.alias[0], "South Wing OR 5")
+        self.assertEqual(inst.alias[1], "Main Wing OR 2")
+        self.assertEqual(inst.description, "Old South Wing, Neuro Radiology Operation Room 1 on second floor")
+        self.assertEqual(inst.id, "2")
+        self.assertEqual(inst.identifier[0].value, "B1-S.F2.1.00")
+        self.assertEqual(inst.mode, "instance")
+        self.assertEqual(inst.name, "South Wing Neuro OR 1")
+        self.assertEqual(inst.operationalStatus.code, "H")
+        self.assertEqual(inst.operationalStatus.display, "Housekeeping")
+        self.assertEqual(inst.operationalStatus.system, "http://hl7.org/fhir/v2/0116")
+        self.assertEqual(inst.physicalType.coding[0].code, "ro")
+        self.assertEqual(inst.physicalType.coding[0].display, "Room")
+        self.assertEqual(inst.physicalType.coding[0].system, "http://hl7.org/fhir/location-physical-type")
+        self.assertEqual(inst.status, "suspended")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].value, "2329")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Burgers UMC, South Wing, second floor, Neuro Radiology Operation Room 1</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "RNEU")
+        self.assertEqual(inst.type.coding[0].display, "Neuroradiology unit")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v3/RoleCode")
+    
+    def testLocation5(self):
+        inst = self.instantiate_from("location-example-ukpharmacy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Location instance")
+        self.implLocation5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Location", js["resourceType"])
+        inst2 = location.Location(js)
+        self.implLocation5(inst2)
+    
+    def implLocation5(self, inst):
+        self.assertEqual(inst.description, "All Pharmacies in the United Kingdom covered by the National Pharmacy Association")
+        self.assertEqual(inst.id, "ukp")
+        self.assertEqual(inst.mode, "kind")
+        self.assertEqual(inst.name, "UK Pharmacies")
+        self.assertEqual(inst.physicalType.coding[0].code, "jdn")
+        self.assertEqual(inst.physicalType.coding[0].display, "Jurisdiction")
+        self.assertEqual(inst.physicalType.coding[0].system, "http://hl7.org/fhir/location-physical-type")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">UK Pharmacies</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "PHARM")
+        self.assertEqual(inst.type.coding[0].display, "Pharmacy")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v3/RoleCode")
+    
+    def testLocation6(self):
+        inst = self.instantiate_from("location-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Location instance")
+        self.implLocation6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Location", js["resourceType"])
+        inst2 = location.Location(js)
+        self.implLocation6(inst2)
+    
+    def implLocation6(self, inst):
+        self.assertEqual(inst.address.city, "Den Burg")
+        self.assertEqual(inst.address.country, "NLD")
+        self.assertEqual(inst.address.line[0], "Galapagosweg 91, Building A")
+        self.assertEqual(inst.address.postalCode, "9105 PZ")
+        self.assertEqual(inst.address.use, "work")
+        self.assertEqual(inst.description, "Second floor of the Old South Wing, formerly in use by Psychiatry")
+        self.assertEqual(inst.extension[0].url, "http://hl7.org/fhir/StructureDefinition/location-alias")
+        self.assertEqual(inst.extension[0].valueString, "Burgers University Medical Center, South Wing, second floor")
+        self.assertEqual(inst.extension[1].url, "http://hl7.org/fhir/StructureDefinition/location-alias")
+        self.assertEqual(inst.extension[1].valueString, "BU MC, SW, F2")
+        self.assertEqual(inst.id, "1")
+        self.assertEqual(inst.identifier[0].value, "B1-S.F2")
+        self.assertEqual(inst.mode, "instance")
+        self.assertEqual(inst.name, "South Wing, second floor")
+        self.assertEqual(inst.physicalType.coding[0].code, "wi")
+        self.assertEqual(inst.physicalType.coding[0].display, "Wing")
+        self.assertEqual(inst.physicalType.coding[0].system, "http://hl7.org/fhir/location-physical-type")
+        self.assertEqual(inst.position.altitude, 0)
+        self.assertEqual(inst.position.latitude, 42.25475478)
+        self.assertEqual(inst.position.longitude, -83.6945691)
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "2328")
+        self.assertEqual(inst.telecom[1].system, "fax")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "2329")
+        self.assertEqual(inst.telecom[2].system, "email")
+        self.assertEqual(inst.telecom[2].value, "second wing admissions")
+        self.assertEqual(inst.telecom[3].system, "url")
+        self.assertEqual(inst.telecom[3].use, "work")
+        self.assertEqual(inst.telecom[3].value, "http://sampleorg.com/southwing")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Burgers UMC, South Wing, second floor</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/measure.py b/fhirclient/models/measure.py
new file mode 100644
index 0000000..589c50a
--- /dev/null
+++ b/fhirclient/models/measure.py
@@ -0,0 +1,453 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Measure) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Measure(domainresource.DomainResource):
+    """ A quality measure definition.
+    
+    The Measure resource provides the definition of a quality measure.
+    """
+    
+    resource_type = "Measure"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.approvalDate = None
+        """ When the measure was approved by publisher.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.clinicalRecommendationStatement = None
+        """ Summary of clinical guidelines.
+        Type `str`. """
+        
+        self.compositeScoring = None
+        """ opportunity | all-or-nothing | linear | weighted.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.contributor = None
+        """ A content contributor.
+        List of `Contributor` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.definition = None
+        """ Defined terms used in the measure documentation.
+        List of `str` items. """
+        
+        self.description = None
+        """ Natural language description of the measure.
+        Type `str`. """
+        
+        self.disclaimer = None
+        """ Disclaimer for use of the measure or its referenced content.
+        Type `str`. """
+        
+        self.effectivePeriod = None
+        """ When the measure is expected to be used.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.group = None
+        """ Population criteria group.
+        List of `MeasureGroup` items (represented as `dict` in JSON). """
+        
+        self.guidance = None
+        """ Additional guidance for implementers.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Additional identifier for the measure.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.improvementNotation = None
+        """ Improvement notation for the measure, e.g. higher score indicates
+        better quality.
+        Type `str`. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for measure (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.lastReviewDate = None
+        """ When the measure was last reviewed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.library = None
+        """ Logic used by the measure.
+        List of `FHIRReference` items referencing `Library` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this measure (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this measure is defined.
+        Type `str`. """
+        
+        self.rateAggregation = None
+        """ How is rate aggregation performed for this measure.
+        Type `str`. """
+        
+        self.rationale = None
+        """ Why does this measure exist.
+        Type `str`. """
+        
+        self.relatedArtifact = None
+        """ Additional documentation, citations, etc.
+        List of `RelatedArtifact` items (represented as `dict` in JSON). """
+        
+        self.riskAdjustment = None
+        """ How is risk adjustment applied for this measure.
+        Type `str`. """
+        
+        self.scoring = None
+        """ proportion | ratio | continuous-variable | cohort.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.set = None
+        """ The measure set, e.g. Preventive Care and Screening.
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.supplementalData = None
+        """ What other data should be reported with the measure.
+        List of `MeasureSupplementalData` items (represented as `dict` in JSON). """
+        
+        self.title = None
+        """ Name for this measure (human friendly).
+        Type `str`. """
+        
+        self.topic = None
+        """ E.g. Education, Treatment, Assessment, etc.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ process | outcome | structure | patient-reported-outcome |
+        composite.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.url = None
+        """ Logical URI to reference this measure (globally unique).
+        Type `str`. """
+        
+        self.usage = None
+        """ Describes the clinical usage of the measure.
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the measure.
+        Type `str`. """
+        
+        super(Measure, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Measure, self).elementProperties()
+        js.extend([
+            ("approvalDate", "approvalDate", fhirdate.FHIRDate, False, None, False),
+            ("clinicalRecommendationStatement", "clinicalRecommendationStatement", str, False, None, False),
+            ("compositeScoring", "compositeScoring", codeableconcept.CodeableConcept, False, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("contributor", "contributor", contributor.Contributor, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("definition", "definition", str, True, None, False),
+            ("description", "description", str, False, None, False),
+            ("disclaimer", "disclaimer", str, False, None, False),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("group", "group", MeasureGroup, True, None, False),
+            ("guidance", "guidance", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("improvementNotation", "improvementNotation", str, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("lastReviewDate", "lastReviewDate", fhirdate.FHIRDate, False, None, False),
+            ("library", "library", fhirreference.FHIRReference, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("rateAggregation", "rateAggregation", str, False, None, False),
+            ("rationale", "rationale", str, False, None, False),
+            ("relatedArtifact", "relatedArtifact", relatedartifact.RelatedArtifact, True, None, False),
+            ("riskAdjustment", "riskAdjustment", str, False, None, False),
+            ("scoring", "scoring", codeableconcept.CodeableConcept, False, None, False),
+            ("set", "set", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("supplementalData", "supplementalData", MeasureSupplementalData, True, None, False),
+            ("title", "title", str, False, None, False),
+            ("topic", "topic", codeableconcept.CodeableConcept, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, True, None, False),
+            ("url", "url", str, False, None, False),
+            ("usage", "usage", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class MeasureGroup(backboneelement.BackboneElement):
+    """ Population criteria group.
+    
+    A group of population criteria for the measure.
+    """
+    
+    resource_type = "MeasureGroup"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Summary description.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Unique identifier.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Short name.
+        Type `str`. """
+        
+        self.population = None
+        """ Population criteria.
+        List of `MeasureGroupPopulation` items (represented as `dict` in JSON). """
+        
+        self.stratifier = None
+        """ Stratifier criteria for the measure.
+        List of `MeasureGroupStratifier` items (represented as `dict` in JSON). """
+        
+        super(MeasureGroup, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MeasureGroup, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, True),
+            ("name", "name", str, False, None, False),
+            ("population", "population", MeasureGroupPopulation, True, None, False),
+            ("stratifier", "stratifier", MeasureGroupStratifier, True, None, False),
+        ])
+        return js
+
+
+class MeasureGroupPopulation(backboneelement.BackboneElement):
+    """ Population criteria.
+    
+    A population criteria for the measure.
+    """
+    
+    resource_type = "MeasureGroupPopulation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ initial-population | numerator | numerator-exclusion | denominator
+        | denominator-exclusion | denominator-exception | measure-
+        population | measure-population-exclusion | measure-observation.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.criteria = None
+        """ The name of a valid referenced CQL expression (may be namespaced)
+        that defines this population criteria.
+        Type `str`. """
+        
+        self.description = None
+        """ The human readable description of this population criteria.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Unique identifier.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Short name.
+        Type `str`. """
+        
+        super(MeasureGroupPopulation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MeasureGroupPopulation, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("criteria", "criteria", str, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("name", "name", str, False, None, False),
+        ])
+        return js
+
+
+class MeasureGroupStratifier(backboneelement.BackboneElement):
+    """ Stratifier criteria for the measure.
+    
+    The stratifier criteria for the measure report, specified as either the
+    name of a valid CQL expression defined within a referenced library, or a
+    valid FHIR Resource Path.
+    """
+    
+    resource_type = "MeasureGroupStratifier"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.criteria = None
+        """ How the measure should be stratified.
+        Type `str`. """
+        
+        self.identifier = None
+        """ The identifier for the stratifier used to coordinate the reported
+        data back to this stratifier.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.path = None
+        """ Path to the stratifier.
+        Type `str`. """
+        
+        super(MeasureGroupStratifier, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MeasureGroupStratifier, self).elementProperties()
+        js.extend([
+            ("criteria", "criteria", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("path", "path", str, False, None, False),
+        ])
+        return js
+
+
+class MeasureSupplementalData(backboneelement.BackboneElement):
+    """ What other data should be reported with the measure.
+    
+    The supplemental data criteria for the measure report, specified as either
+    the name of a valid CQL expression within a referenced library, or a valid
+    FHIR Resource Path.
+    """
+    
+    resource_type = "MeasureSupplementalData"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.criteria = None
+        """ Expression describing additional data to be reported.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Identifier, unique within the measure.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.path = None
+        """ Path to the supplemental data element.
+        Type `str`. """
+        
+        self.usage = None
+        """ supplemental-data | risk-adjustment-factor.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(MeasureSupplementalData, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MeasureSupplementalData, self).elementProperties()
+        js.extend([
+            ("criteria", "criteria", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("path", "path", str, False, None, False),
+            ("usage", "usage", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import contributor
+except ImportError:
+    contributor = sys.modules[__package__ + '.contributor']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import relatedartifact
+except ImportError:
+    relatedartifact = sys.modules[__package__ + '.relatedartifact']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/measure_tests.py b/fhirclient/models/measure_tests.py
new file mode 100644
index 0000000..95de6ce
--- /dev/null
+++ b/fhirclient/models/measure_tests.py
@@ -0,0 +1,238 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import measure
+from .fhirdate import FHIRDate
+
+
+class MeasureTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Measure", js["resourceType"])
+        return measure.Measure(js)
+    
+    def testMeasure1(self):
+        inst = self.instantiate_from("measure-cms146-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Measure instance")
+        self.implMeasure1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Measure", js["resourceType"])
+        inst2 = measure.Measure(js)
+        self.implMeasure1(inst2)
+    
+    def implMeasure1(self, inst):
+        self.assertEqual(inst.approvalDate.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.approvalDate.as_json(), "2016-01-01")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://www.ncqa.org/")
+        self.assertEqual(inst.contributor[0].name, "National Committee for Quality Assurance")
+        self.assertEqual(inst.contributor[0].type, "author")
+        self.assertEqual(inst.date.date, FHIRDate("2017-03-10").date)
+        self.assertEqual(inst.date.as_json(), "2017-03-10")
+        self.assertEqual(inst.description, "Percentage of children 3-18 years of age who were diagnosed with pharyngitis, ordered an antibiotic and received a group A streptococcus (strep) test for the episode.")
+        self.assertEqual(inst.effectivePeriod.end.date, FHIRDate("2017-12-31").date)
+        self.assertEqual(inst.effectivePeriod.end.as_json(), "2017-12-31")
+        self.assertEqual(inst.effectivePeriod.start.date, FHIRDate("2017-01-01").date)
+        self.assertEqual(inst.effectivePeriod.start.as_json(), "2017-01-01")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.group[0].identifier.value, "CMS146-group-1")
+        self.assertEqual(inst.group[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].population[0].criteria, "CMS146.InInitialPopulation")
+        self.assertEqual(inst.group[0].population[0].identifier.value, "initial-population-identifier")
+        self.assertEqual(inst.group[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].population[1].criteria, "CMS146.InNumerator")
+        self.assertEqual(inst.group[0].population[1].identifier.value, "numerator-identifier")
+        self.assertEqual(inst.group[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].population[2].criteria, "CMS146.InDenominator")
+        self.assertEqual(inst.group[0].population[2].identifier.value, "denominator-identifier")
+        self.assertEqual(inst.group[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].population[3].criteria, "CMS146.InDenominatorExclusions")
+        self.assertEqual(inst.group[0].population[3].identifier.value, "denominator-exclusions-identifier")
+        self.assertEqual(inst.group[0].stratifier[0].criteria, "CMS146.AgesUpToNine")
+        self.assertEqual(inst.group[0].stratifier[0].identifier.value, "stratifier-ages-up-to-9")
+        self.assertEqual(inst.group[0].stratifier[1].criteria, "CMS146.AgesTenPlus")
+        self.assertEqual(inst.group[0].stratifier[1].identifier.value, "stratifier-ages-10-plus")
+        self.assertEqual(inst.group[0].stratifier[2].identifier.value, "stratifier-ages-up-to-9")
+        self.assertEqual(inst.group[0].stratifier[2].path, "Patient.gender")
+        self.assertEqual(inst.guidance, "This is an episode of care measure that examines all eligible episodes for the patient during the measurement period. If the patient has more than one episode, include all episodes in the measure")
+        self.assertEqual(inst.id, "measure-cms146-example")
+        self.assertEqual(inst.identifier[0].system, "http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/cms")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "146")
+        self.assertEqual(inst.identifier[1].system, "http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/nqf")
+        self.assertEqual(inst.identifier[1].use, "official")
+        self.assertEqual(inst.identifier[1].value, "0002")
+        self.assertEqual(inst.improvementNotation, "Higher score indicates better quality")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.lastReviewDate.date, FHIRDate("2016-09-01").date)
+        self.assertEqual(inst.lastReviewDate.as_json(), "2016-09-01")
+        self.assertEqual(inst.name, "CMS146")
+        self.assertEqual(inst.publisher, "National Committee for Quality Assurance")
+        self.assertEqual(inst.purpose, "Measure of children with a group A streptococcus test in the 7-day period from 3 days prior through 3 days after the diagnosis of pharyngitis")
+        self.assertEqual(inst.relatedArtifact[0].citation, "Linder, J.A., D.W. Bates, G.M. Lee, J.A. Finkelstein. 2005. \"Antibiotic treatment of children with sore throat.\" JAMA 294(18):2315-2322. ")
+        self.assertEqual(inst.relatedArtifact[0].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[1].citation, "Infectious Diseases Society of America. 2012. \"Clinical Practice Guideline for the Diagnosis and Management of Group A Streptococcal Pharyngitis: 2012 Update.\" ")
+        self.assertEqual(inst.relatedArtifact[1].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[2].type, "documentation")
+        self.assertEqual(inst.scoring.coding[0].code, "proportion")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.supplementalData[0].identifier.value, "supplemental-data-gender")
+        self.assertEqual(inst.supplementalData[0].path, "Patient.gender")
+        self.assertEqual(inst.supplementalData[1].identifier.value, "supplemental-data-deceased")
+        self.assertEqual(inst.supplementalData[1].path, "deceasedBoolean")
+        self.assertEqual(inst.text.status, "additional")
+        self.assertEqual(inst.title, "Appropriate Testing for Children with Pharyngitis")
+        self.assertEqual(inst.topic[0].coding[0].code, "57024-2")
+        self.assertEqual(inst.topic[0].coding[0].system, "http://hl7.org/fhir/c80-doc-typecodes")
+        self.assertEqual(inst.type[0].coding[0].code, "process")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/Measure/measure-cms146-example")
+        self.assertEqual(inst.useContext[0].code.code, "program")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.text, "eligibile-provider")
+        self.assertEqual(inst.version, "1.0.0")
+    
+    def testMeasure2(self):
+        inst = self.instantiate_from("measure-component-a-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Measure instance")
+        self.implMeasure2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Measure", js["resourceType"])
+        inst2 = measure.Measure(js)
+        self.implMeasure2(inst2)
+    
+    def implMeasure2(self, inst):
+        self.assertEqual(inst.group[0].identifier.value, "Main")
+        self.assertEqual(inst.group[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].population[0].criteria, "Initial Population")
+        self.assertEqual(inst.group[0].population[1].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].population[1].criteria, "Denominator")
+        self.assertEqual(inst.group[0].population[2].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].population[2].criteria, "Numerator")
+        self.assertEqual(inst.id, "component-a-example")
+        self.assertEqual(inst.scoring.coding[0].code, "proportion")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Screening for Alcohol Misuse")
+    
+    def testMeasure3(self):
+        inst = self.instantiate_from("measure-component-b-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Measure instance")
+        self.implMeasure3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Measure", js["resourceType"])
+        inst2 = measure.Measure(js)
+        self.implMeasure3(inst2)
+    
+    def implMeasure3(self, inst):
+        self.assertEqual(inst.group[0].identifier.value, "Main")
+        self.assertEqual(inst.group[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].population[0].criteria, "Initial Population")
+        self.assertEqual(inst.group[0].population[1].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].population[1].criteria, "Denominator")
+        self.assertEqual(inst.group[0].population[2].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].population[2].criteria, "Numerator")
+        self.assertEqual(inst.id, "component-b-example")
+        self.assertEqual(inst.scoring.coding[0].code, "proportion")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Screening for Depression")
+    
+    def testMeasure4(self):
+        inst = self.instantiate_from("measure-composite-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Measure instance")
+        self.implMeasure4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Measure", js["resourceType"])
+        inst2 = measure.Measure(js)
+        self.implMeasure4(inst2)
+    
+    def implMeasure4(self, inst):
+        self.assertEqual(inst.compositeScoring.coding[0].code, "opportunity")
+        self.assertEqual(inst.id, "composite-example")
+        self.assertEqual(inst.relatedArtifact[0].type, "composed-of")
+        self.assertEqual(inst.relatedArtifact[1].type, "composed-of")
+        self.assertEqual(inst.scoring.coding[0].code, "proportion")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Behavioral Assessment Composite Measure")
+    
+    def testMeasure5(self):
+        inst = self.instantiate_from("measure-predecessor-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Measure instance")
+        self.implMeasure5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Measure", js["resourceType"])
+        inst2 = measure.Measure(js)
+        self.implMeasure5(inst2)
+    
+    def implMeasure5(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2014-03-08").date)
+        self.assertEqual(inst.date.as_json(), "2014-03-08")
+        self.assertEqual(inst.description, "Exclusive breastfeeding measure of outcomes for exclusive breastmilk feeding of newborns.")
+        self.assertEqual(inst.group[0].identifier.value, "Population Group 1")
+        self.assertEqual(inst.group[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].population[0].criteria, "InitialPopulation1")
+        self.assertEqual(inst.group[0].population[0].identifier.value, "initial-population-1-identifier")
+        self.assertEqual(inst.group[0].population[1].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].population[1].criteria, "Denominator1")
+        self.assertEqual(inst.group[0].population[1].identifier.value, "denominator-1-identifier")
+        self.assertEqual(inst.group[0].population[2].code.coding[0].code, "denominator-exclusions")
+        self.assertEqual(inst.group[0].population[2].criteria, "DenominatorExclusions1")
+        self.assertEqual(inst.group[0].population[2].identifier.value, "denominator-exclusions-1-identifier")
+        self.assertEqual(inst.group[0].population[3].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].population[3].criteria, "Numerator1")
+        self.assertEqual(inst.group[0].population[3].identifier.value, "numerator-1-identifier")
+        self.assertEqual(inst.group[1].identifier.value, "Population Group 2")
+        self.assertEqual(inst.group[1].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[1].population[0].criteria, "InitialPopulation2")
+        self.assertEqual(inst.group[1].population[0].identifier.value, "initial-population-2-identifier")
+        self.assertEqual(inst.group[1].population[1].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[1].population[1].criteria, "Denominator2")
+        self.assertEqual(inst.group[1].population[1].identifier.value, "denominator-2-identifier")
+        self.assertEqual(inst.group[1].population[2].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[1].population[2].criteria, "DenominatorExclusions2")
+        self.assertEqual(inst.group[1].population[2].identifier.value, "denominator-exclusions-2-identifier")
+        self.assertEqual(inst.group[1].population[3].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[1].population[3].criteria, "Numerator2")
+        self.assertEqual(inst.group[1].population[3].identifier.value, "numerator-2-identifier")
+        self.assertEqual(inst.id, "measure-predecessor-example")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "exclusive-breastfeeding-measure")
+        self.assertEqual(inst.improvementNotation, "Improvement noted as an increase in the rate")
+        self.assertEqual(inst.purpose, "Measure of newborns who were fed breast milk only since birth")
+        self.assertEqual(inst.relatedArtifact[0].citation, "American Academy of Pediatrics. (2005). Section on Breastfeeding. Policy Statement:Breastfeeding and the Use of Human Milk. Pediatrics.115:496-506.")
+        self.assertEqual(inst.relatedArtifact[0].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[1].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[2].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[3].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[4].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[5].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[6].citation, "Kramer, M.S. & Kakuma, R. (2002).Optimal duration of exclusive breastfeeding. [107 refs] Cochrane Database of Systematic Reviews. (1):CD003517.")
+        self.assertEqual(inst.relatedArtifact[6].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[7].citation, "Petrova, A., Hegyi, T., & Mehta, R. (2007). Maternal race/ethnicity and one-month exclusive breastfeeding in association with the in-hospital feeding modality. Breastfeeding Medicine. 2(2):92-8.")
+        self.assertEqual(inst.relatedArtifact[7].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[8].type, "documentation")
+        self.assertEqual(inst.relatedArtifact[9].type, "documentation")
+        self.assertEqual(inst.scoring.coding[0].code, "proportion")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Exclusive Breastfeeding Measure")
+        self.assertEqual(inst.topic[0].text, "Exclusive Breastfeeding")
+        self.assertEqual(inst.type[0].coding[0].code, "process")
+        self.assertEqual(inst.version, "3.0.0")
+
diff --git a/fhirclient/models/measurereport.py b/fhirclient/models/measurereport.py
new file mode 100644
index 0000000..d5da091
--- /dev/null
+++ b/fhirclient/models/measurereport.py
@@ -0,0 +1,327 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MeasureReport) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class MeasureReport(domainresource.DomainResource):
+    """ Results of a measure evaluation.
+    
+    The MeasureReport resource contains the results of evaluating a measure.
+    """
+    
+    resource_type = "MeasureReport"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.date = None
+        """ When the report was generated.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.evaluatedResources = None
+        """ What data was evaluated to produce the measure score.
+        Type `FHIRReference` referencing `Bundle` (represented as `dict` in JSON). """
+        
+        self.group = None
+        """ Measure results for each group.
+        List of `MeasureReportGroup` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Additional identifier for the Report.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.measure = None
+        """ What measure was evaluated.
+        Type `FHIRReference` referencing `Measure` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ What patient the report is for.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ What period the report covers.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.reportingOrganization = None
+        """ Who is reporting the data.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ complete | pending | error.
+        Type `str`. """
+        
+        self.type = None
+        """ individual | patient-list | summary.
+        Type `str`. """
+        
+        super(MeasureReport, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MeasureReport, self).elementProperties()
+        js.extend([
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("evaluatedResources", "evaluatedResources", fhirreference.FHIRReference, False, None, False),
+            ("group", "group", MeasureReportGroup, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("measure", "measure", fhirreference.FHIRReference, False, None, True),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, False),
+            ("period", "period", period.Period, False, None, True),
+            ("reportingOrganization", "reportingOrganization", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class MeasureReportGroup(backboneelement.BackboneElement):
+    """ Measure results for each group.
+    
+    The results of the calculation, one for each population group in the
+    measure.
+    """
+    
+    resource_type = "MeasureReportGroup"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.identifier = None
+        """ What group of the measure.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.measureScore = None
+        """ What score this group achieved.
+        Type `float`. """
+        
+        self.population = None
+        """ The populations in the group.
+        List of `MeasureReportGroupPopulation` items (represented as `dict` in JSON). """
+        
+        self.stratifier = None
+        """ Stratification results.
+        List of `MeasureReportGroupStratifier` items (represented as `dict` in JSON). """
+        
+        super(MeasureReportGroup, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MeasureReportGroup, self).elementProperties()
+        js.extend([
+            ("identifier", "identifier", identifier.Identifier, False, None, True),
+            ("measureScore", "measureScore", float, False, None, False),
+            ("population", "population", MeasureReportGroupPopulation, True, None, False),
+            ("stratifier", "stratifier", MeasureReportGroupStratifier, True, None, False),
+        ])
+        return js
+
+
+class MeasureReportGroupPopulation(backboneelement.BackboneElement):
+    """ The populations in the group.
+    
+    The populations that make up the population group, one for each type of
+    population appropriate for the measure.
+    """
+    
+    resource_type = "MeasureReportGroupPopulation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ initial-population | numerator | numerator-exclusion | denominator
+        | denominator-exclusion | denominator-exception | measure-
+        population | measure-population-exclusion | measure-score.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.count = None
+        """ Size of the population.
+        Type `int`. """
+        
+        self.identifier = None
+        """ Population identifier as defined in the measure.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.patients = None
+        """ For patient-list reports, the patients in this population.
+        Type `FHIRReference` referencing `List` (represented as `dict` in JSON). """
+        
+        super(MeasureReportGroupPopulation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MeasureReportGroupPopulation, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("count", "count", int, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("patients", "patients", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+class MeasureReportGroupStratifier(backboneelement.BackboneElement):
+    """ Stratification results.
+    
+    When a measure includes multiple stratifiers, there will be a stratifier
+    group for each stratifier defined by the measure.
+    """
+    
+    resource_type = "MeasureReportGroupStratifier"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.identifier = None
+        """ What stratifier of the group.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.stratum = None
+        """ Stratum results, one for each unique value in the stratifier.
+        List of `MeasureReportGroupStratifierStratum` items (represented as `dict` in JSON). """
+        
+        super(MeasureReportGroupStratifier, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MeasureReportGroupStratifier, self).elementProperties()
+        js.extend([
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("stratum", "stratum", MeasureReportGroupStratifierStratum, True, None, False),
+        ])
+        return js
+
+
+class MeasureReportGroupStratifierStratum(backboneelement.BackboneElement):
+    """ Stratum results, one for each unique value in the stratifier.
+    
+    This element contains the results for a single stratum within the
+    stratifier. For example, when stratifying on administrative gender, there
+    will be four strata, one for each possible gender value.
+    """
+    
+    resource_type = "MeasureReportGroupStratifierStratum"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.measureScore = None
+        """ What score this stratum achieved.
+        Type `float`. """
+        
+        self.population = None
+        """ Population results in this stratum.
+        List of `MeasureReportGroupStratifierStratumPopulation` items (represented as `dict` in JSON). """
+        
+        self.value = None
+        """ The stratum value, e.g. male.
+        Type `str`. """
+        
+        super(MeasureReportGroupStratifierStratum, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MeasureReportGroupStratifierStratum, self).elementProperties()
+        js.extend([
+            ("measureScore", "measureScore", float, False, None, False),
+            ("population", "population", MeasureReportGroupStratifierStratumPopulation, True, None, False),
+            ("value", "value", str, False, None, True),
+        ])
+        return js
+
+
+class MeasureReportGroupStratifierStratumPopulation(backboneelement.BackboneElement):
+    """ Population results in this stratum.
+    
+    The populations that make up the stratum, one for each type of population
+    appropriate to the measure.
+    """
+    
+    resource_type = "MeasureReportGroupStratifierStratumPopulation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ initial-population | numerator | numerator-exclusion | denominator
+        | denominator-exclusion | denominator-exception | measure-
+        population | measure-population-exclusion | measure-score.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.count = None
+        """ Size of the population.
+        Type `int`. """
+        
+        self.identifier = None
+        """ Population identifier as defined in the measure.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.patients = None
+        """ For patient-list reports, the patients in this population.
+        Type `FHIRReference` referencing `List` (represented as `dict` in JSON). """
+        
+        super(MeasureReportGroupStratifierStratumPopulation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MeasureReportGroupStratifierStratumPopulation, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("count", "count", int, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("patients", "patients", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/measurereport_tests.py b/fhirclient/models/measurereport_tests.py
new file mode 100644
index 0000000..47ecf7c
--- /dev/null
+++ b/fhirclient/models/measurereport_tests.py
@@ -0,0 +1,341 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import measurereport
+from .fhirdate import FHIRDate
+
+
+class MeasureReportTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("MeasureReport", js["resourceType"])
+        return measurereport.MeasureReport(js)
+    
+    def testMeasureReport1(self):
+        inst = self.instantiate_from("measurereport-cms146-cat1-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a MeasureReport instance")
+        self.implMeasureReport1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("MeasureReport", js["resourceType"])
+        inst2 = measurereport.MeasureReport(js)
+        self.implMeasureReport1(inst2)
+    
+    def implMeasureReport1(self, inst):
+        self.assertEqual(inst.contained[0].id, "reporter")
+        self.assertEqual(inst.group[0].identifier.value, "CMS146-group-1")
+        self.assertEqual(inst.group[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].population[0].count, 1)
+        self.assertEqual(inst.group[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].population[1].count, 1)
+        self.assertEqual(inst.group[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].population[2].count, 1)
+        self.assertEqual(inst.group[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[0].identifier.value, "stratifier-ages-up-to-9")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[0].count, 1)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[1].count, 1)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[2].count, 1)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].value, "true")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[0].count, 0)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[1].count, 0)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[2].count, 0)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].value, "false")
+        self.assertEqual(inst.group[0].stratifier[1].identifier.value, "stratifier-ages-10-plus")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[0].count, 0)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[1].count, 0)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[2].count, 0)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].value, "true")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[0].count, 1)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[1].count, 1)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[2].count, 1)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].value, "false")
+        self.assertEqual(inst.group[0].stratifier[2].identifier.value, "stratifier-gender")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[0].count, 1)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[1].count, 1)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[2].count, 1)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].value, "male")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[0].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[1].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[2].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].value, "female")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[0].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[1].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[2].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].value, "other")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[0].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[1].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[2].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].value, "unknown")
+        self.assertEqual(inst.id, "measurereport-cms146-cat1-example")
+        self.assertEqual(inst.identifier.value, "measurereport-cms146-cat1-example-2017-03-13")
+        self.assertEqual(inst.period.end.date, FHIRDate("2014-03-31").date)
+        self.assertEqual(inst.period.end.as_json(), "2014-03-31")
+        self.assertEqual(inst.period.start.date, FHIRDate("2014-01-01").date)
+        self.assertEqual(inst.period.start.as_json(), "2014-01-01")
+        self.assertEqual(inst.status, "complete")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "individual")
+    
+    def testMeasureReport2(self):
+        inst = self.instantiate_from("measurereport-cms146-cat2-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a MeasureReport instance")
+        self.implMeasureReport2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("MeasureReport", js["resourceType"])
+        inst2 = measurereport.MeasureReport(js)
+        self.implMeasureReport2(inst2)
+    
+    def implMeasureReport2(self, inst):
+        self.assertEqual(inst.contained[0].id, "reporter")
+        self.assertEqual(inst.group[0].identifier.value, "CMS146-group-1")
+        self.assertEqual(inst.group[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].population[0].count, 500)
+        self.assertEqual(inst.group[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].population[1].count, 200)
+        self.assertEqual(inst.group[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].population[2].count, 500)
+        self.assertEqual(inst.group[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].population[3].count, 100)
+        self.assertEqual(inst.group[0].stratifier[0].identifier.value, "stratifier-ages-up-to-9")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].value, "true")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].value, "false")
+        self.assertEqual(inst.group[0].stratifier[1].identifier.value, "stratifier-ages-10-plus")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].value, "true")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].value, "false")
+        self.assertEqual(inst.group[0].stratifier[2].identifier.value, "stratifier-gender")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].value, "male")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].value, "female")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[0].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[1].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[2].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].value, "other")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[0].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[1].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[2].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[3].code.coding[0].code, "denominator-exclusions")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].value, "unknown")
+        self.assertEqual(inst.id, "measurereport-cms146-cat2-example")
+        self.assertEqual(inst.identifier.value, "measurereport-cms146-cat2-example-2017-03-13")
+        self.assertEqual(inst.period.end.date, FHIRDate("2014-03-31").date)
+        self.assertEqual(inst.period.end.as_json(), "2014-03-31")
+        self.assertEqual(inst.period.start.date, FHIRDate("2014-01-01").date)
+        self.assertEqual(inst.period.start.as_json(), "2014-01-01")
+        self.assertEqual(inst.status, "complete")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "patient-list")
+    
+    def testMeasureReport3(self):
+        inst = self.instantiate_from("measurereport-cms146-cat3-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a MeasureReport instance")
+        self.implMeasureReport3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("MeasureReport", js["resourceType"])
+        inst2 = measurereport.MeasureReport(js)
+        self.implMeasureReport3(inst2)
+    
+    def implMeasureReport3(self, inst):
+        self.assertEqual(inst.contained[0].id, "reporter")
+        self.assertEqual(inst.group[0].identifier.value, "CMS146-group-1")
+        self.assertEqual(inst.group[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].population[0].count, 500)
+        self.assertEqual(inst.group[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].population[1].count, 200)
+        self.assertEqual(inst.group[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].population[2].count, 500)
+        self.assertEqual(inst.group[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].population[3].count, 100)
+        self.assertEqual(inst.group[0].stratifier[0].identifier.value, "stratifier-ages-up-to-9")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[0].value, "true")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[0].stratum[1].value, "false")
+        self.assertEqual(inst.group[0].stratifier[1].identifier.value, "stratifier-ages-10-plus")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[0].value, "true")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[1].stratum[1].value, "false")
+        self.assertEqual(inst.group[0].stratifier[2].identifier.value, "stratifier-gender")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[0].value, "male")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[0].count, 250)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[1].count, 100)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[2].count, 250)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].population[3].count, 50)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[1].value, "female")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[0].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[1].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[2].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[2].value, "other")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[0].code.coding[0].code, "initial-population")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[0].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[1].code.coding[0].code, "numerator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[1].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[2].code.coding[0].code, "denominator")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[2].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[3].code.coding[0].code, "denominator-exclusion")
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].population[3].count, 0)
+        self.assertEqual(inst.group[0].stratifier[2].stratum[3].value, "unknown")
+        self.assertEqual(inst.id, "measurereport-cms146-cat3-example")
+        self.assertEqual(inst.identifier.value, "measurereport-cms146-cat3-example-2017-03-13")
+        self.assertEqual(inst.period.end.date, FHIRDate("2014-03-31").date)
+        self.assertEqual(inst.period.end.as_json(), "2014-03-31")
+        self.assertEqual(inst.period.start.date, FHIRDate("2014-01-01").date)
+        self.assertEqual(inst.period.start.as_json(), "2014-01-01")
+        self.assertEqual(inst.status, "complete")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "summary")
+
diff --git a/fhirclient/models/media.py b/fhirclient/models/media.py
new file mode 100644
index 0000000..8421913
--- /dev/null
+++ b/fhirclient/models/media.py
@@ -0,0 +1,157 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Media) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Media(domainresource.DomainResource):
+    """ A photo, video, or audio recording acquired or used in healthcare. The
+    actual content may be inline or provided by direct reference.
+    """
+    
+    resource_type = "Media"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.basedOn = None
+        """ Procedure that caused this media to be created.
+        List of `FHIRReference` items referencing `ProcedureRequest` (represented as `dict` in JSON). """
+        
+        self.bodySite = None
+        """ Body part in media.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.content = None
+        """ Actual Media - reference or data.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter / Episode associated with media.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.device = None
+        """ Observing Device.
+        Type `FHIRReference` referencing `Device, DeviceMetric` (represented as `dict` in JSON). """
+        
+        self.duration = None
+        """ Length in seconds (audio / video).
+        Type `int`. """
+        
+        self.frames = None
+        """ Number of frames if > 1 (photo).
+        Type `int`. """
+        
+        self.height = None
+        """ Height of the image in pixels (photo/video).
+        Type `int`. """
+        
+        self.identifier = None
+        """ Identifier(s) for the image.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Comments made about the media.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.occurrenceDateTime = None
+        """ When Media was collected.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.occurrencePeriod = None
+        """ When Media was collected.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.operator = None
+        """ The person who generated the image.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.reasonCode = None
+        """ Why was event performed?.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.subject = None
+        """ Who/What this Media is a record of.
+        Type `FHIRReference` referencing `Patient, Practitioner, Group, Device, Specimen` (represented as `dict` in JSON). """
+        
+        self.subtype = None
+        """ The type of acquisition equipment/process.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ photo | video | audio.
+        Type `str`. """
+        
+        self.view = None
+        """ Imaging view, e.g. Lateral or Antero-posterior.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.width = None
+        """ Width of the image in pixels (photo/video).
+        Type `int`. """
+        
+        super(Media, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Media, self).elementProperties()
+        js.extend([
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("bodySite", "bodySite", codeableconcept.CodeableConcept, False, None, False),
+            ("content", "content", attachment.Attachment, False, None, True),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("device", "device", fhirreference.FHIRReference, False, None, False),
+            ("duration", "duration", int, False, None, False),
+            ("frames", "frames", int, False, None, False),
+            ("height", "height", int, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("occurrenceDateTime", "occurrenceDateTime", fhirdate.FHIRDate, False, "occurrence", False),
+            ("occurrencePeriod", "occurrencePeriod", period.Period, False, "occurrence", False),
+            ("operator", "operator", fhirreference.FHIRReference, False, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("subtype", "subtype", codeableconcept.CodeableConcept, False, None, False),
+            ("type", "type", str, False, None, True),
+            ("view", "view", codeableconcept.CodeableConcept, False, None, False),
+            ("width", "width", int, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/media_tests.py b/fhirclient/models/media_tests.py
new file mode 100644
index 0000000..e513d83
--- /dev/null
+++ b/fhirclient/models/media_tests.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import media
+from .fhirdate import FHIRDate
+
+
+class MediaTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Media", js["resourceType"])
+        return media.Media(js)
+    
+    def testMedia1(self):
+        inst = self.instantiate_from("media-example-dicom.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Media instance")
+        self.implMedia1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Media", js["resourceType"])
+        inst2 = media.Media(js)
+        self.implMedia1(inst2)
+    
+    def implMedia1(self, inst):
+        self.assertEqual(inst.content.contentType, "application/dicom")
+        self.assertEqual(inst.extension[0].url, "http://nema.org/fhir/extensions#0002-0010")
+        self.assertEqual(inst.extension[0].valueUri, "urn:oid:1.2.840.10008.1.2.1")
+        self.assertEqual(inst.height, 480)
+        self.assertEqual(inst.id, "1.2.840.11361907579238403408700.3.0.14.19970327150033")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].type.text, "InstanceUID")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "urn:oid:1.2.840.11361907579238403408700.3.0.14.19970327150033")
+        self.assertEqual(inst.identifier[1].system, "http://acme-imaging.com/accession/2012")
+        self.assertEqual(inst.identifier[1].type.text, "accessionNo")
+        self.assertEqual(inst.identifier[1].value, "1234567")
+        self.assertEqual(inst.identifier[2].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[2].type.text, "studyId")
+        self.assertEqual(inst.identifier[2].value, "urn:oid:1.2.840.113619.2.21.848.34082.0.538976288.3")
+        self.assertEqual(inst.identifier[3].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[3].type.text, "seriesId")
+        self.assertEqual(inst.identifier[3].value, "urn:oid:1.2.840.113619.2.21.3408.700.0.757923840.3.0")
+        self.assertEqual(inst.subtype.coding[0].code, "US")
+        self.assertEqual(inst.subtype.coding[0].system, "http://dicom.nema.org/resources/ontology/DCM")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "photo")
+        self.assertEqual(inst.view.coding[0].code, "399067008")
+        self.assertEqual(inst.view.coding[0].display, "Lateral projection")
+        self.assertEqual(inst.view.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.width, 640)
+    
+    def testMedia2(self):
+        inst = self.instantiate_from("media-example-sound.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Media instance")
+        self.implMedia2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Media", js["resourceType"])
+        inst2 = media.Media(js)
+        self.implMedia2(inst2)
+    
+    def implMedia2(self, inst):
+        self.assertEqual(inst.content.contentType, "audio/mpeg")
+        self.assertEqual(inst.content.data, "dG9vIGJpZyB0b28gaW5jbHVkZSB0aGUgd2hvbGU=")
+        self.assertEqual(inst.content.id, "a1")
+        self.assertEqual(inst.duration, 65)
+        self.assertEqual(inst.id, "sound")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Sound recording of speech example for Patient Henry Levin (MRN 12345):<br/><img src=\"#11\" alt=\"diagram\"/></div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "video")
+    
+    def testMedia3(self):
+        inst = self.instantiate_from("media-example-xray.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Media instance")
+        self.implMedia3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Media", js["resourceType"])
+        inst2 = media.Media(js)
+        self.implMedia3(inst2)
+    
+    def implMedia3(self, inst):
+        self.assertEqual(inst.bodySite.coding[0].code, "85151006")
+        self.assertEqual(inst.bodySite.coding[0].display, "Structure of left hand (body structure)")
+        self.assertEqual(inst.bodySite.coding[0].system, "http://snomed.info.sct")
+        self.assertEqual(inst.content.contentType, "image/jpeg")
+        self.assertEqual(inst.content.creation.date, FHIRDate("2016-03-15").date)
+        self.assertEqual(inst.content.creation.as_json(), "2016-03-15")
+        self.assertEqual(inst.content.id, "a1")
+        self.assertEqual(inst.content.url, "http://someimagingcenter.org/fhir/Binary/A12345")
+        self.assertEqual(inst.height, 432)
+        self.assertEqual(inst.id, "xray")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2016-03-15").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2016-03-15")
+        self.assertEqual(inst.subtype.coding[0].code, "39714003")
+        self.assertEqual(inst.subtype.coding[0].display, "Skeletal X-ray of wrist and hand")
+        self.assertEqual(inst.subtype.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Xray of left hand for Patient Henry Levin (MRN 12345) 2016-03-15</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "photo")
+        self.assertEqual(inst.width, 640)
+    
+    def testMedia4(self):
+        inst = self.instantiate_from("media-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Media instance")
+        self.implMedia4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Media", js["resourceType"])
+        inst2 = media.Media(js)
+        self.implMedia4(inst2)
+    
+    def implMedia4(self, inst):
+        self.assertEqual(inst.content.contentType, "image/gif")
+        self.assertEqual(inst.content.creation.date, FHIRDate("2009-09-03").date)
+        self.assertEqual(inst.content.creation.as_json(), "2009-09-03")
+        self.assertEqual(inst.content.id, "a1")
+        self.assertEqual(inst.frames, 1)
+        self.assertEqual(inst.height, 145)
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.subtype.coding[0].code, "diagram")
+        self.assertEqual(inst.subtype.coding[0].system, "http://hl7.org/fhir/media-subtype")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Diagram for Patient Henry Levin (MRN 12345):<br/><img src=\"#11\" alt=\"diagram\"/></div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "photo")
+        self.assertEqual(inst.width, 126)
+
diff --git a/fhirclient/models/medication.py b/fhirclient/models/medication.py
new file mode 100644
index 0000000..b8a2d58
--- /dev/null
+++ b/fhirclient/models/medication.py
@@ -0,0 +1,268 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Medication) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Medication(domainresource.DomainResource):
+    """ Definition of a Medication.
+    
+    This resource is primarily used for the identification and definition of a
+    medication. It covers the ingredients and the packaging for a medication.
+    """
+    
+    resource_type = "Medication"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Codes that identify this medication.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.form = None
+        """ powder | tablets | capsule +.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.image = None
+        """ Picture of the medication.
+        List of `Attachment` items (represented as `dict` in JSON). """
+        
+        self.ingredient = None
+        """ Active or inactive ingredient.
+        List of `MedicationIngredient` items (represented as `dict` in JSON). """
+        
+        self.isBrand = None
+        """ True if a brand.
+        Type `bool`. """
+        
+        self.isOverTheCounter = None
+        """ True if medication does not require a prescription.
+        Type `bool`. """
+        
+        self.manufacturer = None
+        """ Manufacturer of the item.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.package = None
+        """ Details about packaged medications.
+        Type `MedicationPackage` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | inactive | entered-in-error.
+        Type `str`. """
+        
+        super(Medication, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Medication, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("form", "form", codeableconcept.CodeableConcept, False, None, False),
+            ("image", "image", attachment.Attachment, True, None, False),
+            ("ingredient", "ingredient", MedicationIngredient, True, None, False),
+            ("isBrand", "isBrand", bool, False, None, False),
+            ("isOverTheCounter", "isOverTheCounter", bool, False, None, False),
+            ("manufacturer", "manufacturer", fhirreference.FHIRReference, False, None, False),
+            ("package", "package", MedicationPackage, False, None, False),
+            ("status", "status", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class MedicationIngredient(backboneelement.BackboneElement):
+    """ Active or inactive ingredient.
+    
+    Identifies a particular constituent of interest in the product.
+    """
+    
+    resource_type = "MedicationIngredient"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.amount = None
+        """ Quantity of ingredient present.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.isActive = None
+        """ Active ingredient indicator.
+        Type `bool`. """
+        
+        self.itemCodeableConcept = None
+        """ The product contained.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.itemReference = None
+        """ The product contained.
+        Type `FHIRReference` referencing `Substance, Medication` (represented as `dict` in JSON). """
+        
+        super(MedicationIngredient, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationIngredient, self).elementProperties()
+        js.extend([
+            ("amount", "amount", ratio.Ratio, False, None, False),
+            ("isActive", "isActive", bool, False, None, False),
+            ("itemCodeableConcept", "itemCodeableConcept", codeableconcept.CodeableConcept, False, "item", True),
+            ("itemReference", "itemReference", fhirreference.FHIRReference, False, "item", True),
+        ])
+        return js
+
+
+class MedicationPackage(backboneelement.BackboneElement):
+    """ Details about packaged medications.
+    
+    Information that only applies to packages (not products).
+    """
+    
+    resource_type = "MedicationPackage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.batch = None
+        """ Identifies a single production run.
+        List of `MedicationPackageBatch` items (represented as `dict` in JSON). """
+        
+        self.container = None
+        """ E.g. box, vial, blister-pack.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.content = None
+        """ What is  in the package.
+        List of `MedicationPackageContent` items (represented as `dict` in JSON). """
+        
+        super(MedicationPackage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationPackage, self).elementProperties()
+        js.extend([
+            ("batch", "batch", MedicationPackageBatch, True, None, False),
+            ("container", "container", codeableconcept.CodeableConcept, False, None, False),
+            ("content", "content", MedicationPackageContent, True, None, False),
+        ])
+        return js
+
+
+class MedicationPackageBatch(backboneelement.BackboneElement):
+    """ Identifies a single production run.
+    
+    Information about a group of medication produced or packaged from one
+    production run.
+    """
+    
+    resource_type = "MedicationPackageBatch"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.expirationDate = None
+        """ When batch will expire.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.lotNumber = None
+        """ Identifier assigned to batch.
+        Type `str`. """
+        
+        super(MedicationPackageBatch, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationPackageBatch, self).elementProperties()
+        js.extend([
+            ("expirationDate", "expirationDate", fhirdate.FHIRDate, False, None, False),
+            ("lotNumber", "lotNumber", str, False, None, False),
+        ])
+        return js
+
+
+class MedicationPackageContent(backboneelement.BackboneElement):
+    """ What is  in the package.
+    
+    A set of components that go to make up the described item.
+    """
+    
+    resource_type = "MedicationPackageContent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.amount = None
+        """ Quantity present in the package.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.itemCodeableConcept = None
+        """ The item in the package.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.itemReference = None
+        """ The item in the package.
+        Type `FHIRReference` referencing `Medication` (represented as `dict` in JSON). """
+        
+        super(MedicationPackageContent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationPackageContent, self).elementProperties()
+        js.extend([
+            ("amount", "amount", quantity.Quantity, False, None, False),
+            ("itemCodeableConcept", "itemCodeableConcept", codeableconcept.CodeableConcept, False, "item", True),
+            ("itemReference", "itemReference", fhirreference.FHIRReference, False, "item", True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
diff --git a/fhirclient/models/medicationadministration.py b/fhirclient/models/medicationadministration.py
new file mode 100644
index 0000000..fbae438
--- /dev/null
+++ b/fhirclient/models/medicationadministration.py
@@ -0,0 +1,282 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MedicationAdministration) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class MedicationAdministration(domainresource.DomainResource):
+    """ Administration of medication to a patient.
+    
+    Describes the event of a patient consuming or otherwise being administered
+    a medication.  This may be as simple as swallowing a tablet or it may be a
+    long running infusion.  Related resources tie this event to the authorizing
+    prescription, and the specific encounter between patient and health care
+    practitioner.
+    """
+    
+    resource_type = "MedicationAdministration"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ Type of medication usage.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or Episode of Care administered as part of.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Instantiates protocol or definition.
+        List of `FHIRReference` items referencing `PlanDefinition, ActivityDefinition` (represented as `dict` in JSON). """
+        
+        self.device = None
+        """ Device used to administer.
+        List of `FHIRReference` items referencing `Device` (represented as `dict` in JSON). """
+        
+        self.dosage = None
+        """ Details of how medication was taken.
+        Type `MedicationAdministrationDosage` (represented as `dict` in JSON). """
+        
+        self.effectiveDateTime = None
+        """ Start and end time of administration.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.effectivePeriod = None
+        """ Start and end time of administration.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.eventHistory = None
+        """ A list of events of interest in the lifecycle.
+        List of `FHIRReference` items referencing `Provenance` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.medicationCodeableConcept = None
+        """ What was administered.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.medicationReference = None
+        """ What was administered.
+        Type `FHIRReference` referencing `Medication` (represented as `dict` in JSON). """
+        
+        self.notGiven = None
+        """ True if medication not administered.
+        Type `bool`. """
+        
+        self.note = None
+        """ Information about the administration.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Part of referenced event.
+        List of `FHIRReference` items referencing `MedicationAdministration, Procedure` (represented as `dict` in JSON). """
+        
+        self.performer = None
+        """ Who administered substance.
+        List of `MedicationAdministrationPerformer` items (represented as `dict` in JSON). """
+        
+        self.prescription = None
+        """ Request administration performed against.
+        Type `FHIRReference` referencing `MedicationRequest` (represented as `dict` in JSON). """
+        
+        self.reasonCode = None
+        """ Reason administration performed.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonNotGiven = None
+        """ Reason administration not performed.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Condition or Observation that supports why the medication was
+        administered.
+        List of `FHIRReference` items referencing `Condition, Observation` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ in-progress | on-hold | completed | entered-in-error | stopped |
+        unknown.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who received medication.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.supportingInformation = None
+        """ Additional information to support administration.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(MedicationAdministration, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationAdministration, self).elementProperties()
+        js.extend([
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, True, None, False),
+            ("device", "device", fhirreference.FHIRReference, True, None, False),
+            ("dosage", "dosage", MedicationAdministrationDosage, False, None, False),
+            ("effectiveDateTime", "effectiveDateTime", fhirdate.FHIRDate, False, "effective", True),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, "effective", True),
+            ("eventHistory", "eventHistory", fhirreference.FHIRReference, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("medicationCodeableConcept", "medicationCodeableConcept", codeableconcept.CodeableConcept, False, "medication", True),
+            ("medicationReference", "medicationReference", fhirreference.FHIRReference, False, "medication", True),
+            ("notGiven", "notGiven", bool, False, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, True, None, False),
+            ("performer", "performer", MedicationAdministrationPerformer, True, None, False),
+            ("prescription", "prescription", fhirreference.FHIRReference, False, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonNotGiven", "reasonNotGiven", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("supportingInformation", "supportingInformation", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class MedicationAdministrationDosage(backboneelement.BackboneElement):
+    """ Details of how medication was taken.
+    
+    Describes the medication dosage information details e.g. dose, rate, site,
+    route, etc.
+    """
+    
+    resource_type = "MedicationAdministrationDosage"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.dose = None
+        """ Amount of medication per dose.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.method = None
+        """ How drug was administered.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.rateQuantity = None
+        """ Dose quantity per unit of time.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.rateRatio = None
+        """ Dose quantity per unit of time.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.route = None
+        """ Path of substance into body.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.site = None
+        """ Body site administered to.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.text = None
+        """ Free text dosage instructions e.g. SIG.
+        Type `str`. """
+        
+        super(MedicationAdministrationDosage, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationAdministrationDosage, self).elementProperties()
+        js.extend([
+            ("dose", "dose", quantity.Quantity, False, None, False),
+            ("method", "method", codeableconcept.CodeableConcept, False, None, False),
+            ("rateQuantity", "rateQuantity", quantity.Quantity, False, "rate", False),
+            ("rateRatio", "rateRatio", ratio.Ratio, False, "rate", False),
+            ("route", "route", codeableconcept.CodeableConcept, False, None, False),
+            ("site", "site", codeableconcept.CodeableConcept, False, None, False),
+            ("text", "text", str, False, None, False),
+        ])
+        return js
+
+
+class MedicationAdministrationPerformer(backboneelement.BackboneElement):
+    """ Who administered substance.
+    
+    The individual who was responsible for giving the medication to the
+    patient.
+    """
+    
+    resource_type = "MedicationAdministrationPerformer"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actor = None
+        """ Individual who was performing.
+        Type `FHIRReference` referencing `Practitioner, Patient, RelatedPerson, Device` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization organization was acting for.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(MedicationAdministrationPerformer, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationAdministrationPerformer, self).elementProperties()
+        js.extend([
+            ("actor", "actor", fhirreference.FHIRReference, False, None, True),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
diff --git a/fhirclient/models/medicationdispense.py b/fhirclient/models/medicationdispense.py
new file mode 100644
index 0000000..15e39d3
--- /dev/null
+++ b/fhirclient/models/medicationdispense.py
@@ -0,0 +1,287 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MedicationDispense) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class MedicationDispense(domainresource.DomainResource):
+    """ Dispensing a medication to a named patient.
+    
+    Indicates that a medication product is to be or has been dispensed for a
+    named person/patient.  This includes a description of the medication
+    product (supply) provided and the instructions for administering the
+    medication.  The medication dispense is the result of a pharmacy system
+    responding to a medication order.
+    """
+    
+    resource_type = "MedicationDispense"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authorizingPrescription = None
+        """ Medication order that authorizes the dispense.
+        List of `FHIRReference` items referencing `MedicationRequest` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Type of medication dispense.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter / Episode associated with event.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.daysSupply = None
+        """ Amount of medication expressed as a timing amount.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.destination = None
+        """ Where the medication was sent.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.detectedIssue = None
+        """ Clinical issue with action.
+        List of `FHIRReference` items referencing `DetectedIssue` (represented as `dict` in JSON). """
+        
+        self.dosageInstruction = None
+        """ How the medication is to be used by the patient or administered by
+        the caregiver.
+        List of `Dosage` items (represented as `dict` in JSON). """
+        
+        self.eventHistory = None
+        """ A list of releveant lifecycle events.
+        List of `FHIRReference` items referencing `Provenance` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.medicationCodeableConcept = None
+        """ What medication was supplied.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.medicationReference = None
+        """ What medication was supplied.
+        Type `FHIRReference` referencing `Medication` (represented as `dict` in JSON). """
+        
+        self.notDone = None
+        """ Whether the dispense was or was not performed.
+        Type `bool`. """
+        
+        self.notDoneReasonCodeableConcept = None
+        """ Why a dispense was not performed.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.notDoneReasonReference = None
+        """ Why a dispense was not performed.
+        Type `FHIRReference` referencing `DetectedIssue` (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Information about the dispense.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Event that dispense is part of.
+        List of `FHIRReference` items referencing `Procedure` (represented as `dict` in JSON). """
+        
+        self.performer = None
+        """ Who performed event.
+        List of `MedicationDispensePerformer` items (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Amount dispensed.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.receiver = None
+        """ Who collected the medication.
+        List of `FHIRReference` items referencing `Patient, Practitioner` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ preparation | in-progress | on-hold | completed | entered-in-error
+        | stopped.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who the dispense is for.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.substitution = None
+        """ Whether a substitution was performed on the dispense.
+        Type `MedicationDispenseSubstitution` (represented as `dict` in JSON). """
+        
+        self.supportingInformation = None
+        """ Information that supports the dispensing of the medication.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Trial fill, partial fill, emergency fill, etc..
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.whenHandedOver = None
+        """ When product was given out.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.whenPrepared = None
+        """ When product was packaged and reviewed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(MedicationDispense, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationDispense, self).elementProperties()
+        js.extend([
+            ("authorizingPrescription", "authorizingPrescription", fhirreference.FHIRReference, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("daysSupply", "daysSupply", quantity.Quantity, False, None, False),
+            ("destination", "destination", fhirreference.FHIRReference, False, None, False),
+            ("detectedIssue", "detectedIssue", fhirreference.FHIRReference, True, None, False),
+            ("dosageInstruction", "dosageInstruction", dosage.Dosage, True, None, False),
+            ("eventHistory", "eventHistory", fhirreference.FHIRReference, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("medicationCodeableConcept", "medicationCodeableConcept", codeableconcept.CodeableConcept, False, "medication", True),
+            ("medicationReference", "medicationReference", fhirreference.FHIRReference, False, "medication", True),
+            ("notDone", "notDone", bool, False, None, False),
+            ("notDoneReasonCodeableConcept", "notDoneReasonCodeableConcept", codeableconcept.CodeableConcept, False, "notDoneReason", False),
+            ("notDoneReasonReference", "notDoneReasonReference", fhirreference.FHIRReference, False, "notDoneReason", False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, True, None, False),
+            ("performer", "performer", MedicationDispensePerformer, True, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("receiver", "receiver", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("substitution", "substitution", MedicationDispenseSubstitution, False, None, False),
+            ("supportingInformation", "supportingInformation", fhirreference.FHIRReference, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+            ("whenHandedOver", "whenHandedOver", fhirdate.FHIRDate, False, None, False),
+            ("whenPrepared", "whenPrepared", fhirdate.FHIRDate, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class MedicationDispensePerformer(backboneelement.BackboneElement):
+    """ Who performed event.
+    
+    Indicates who or what performed the event.  It should be assumed that the
+    performer is the dispenser of the medication.
+    """
+    
+    resource_type = "MedicationDispensePerformer"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actor = None
+        """ Individual who was performing.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, Device, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization organization was acting for.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(MedicationDispensePerformer, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationDispensePerformer, self).elementProperties()
+        js.extend([
+            ("actor", "actor", fhirreference.FHIRReference, False, None, True),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+class MedicationDispenseSubstitution(backboneelement.BackboneElement):
+    """ Whether a substitution was performed on the dispense.
+    
+    Indicates whether or not substitution was made as part of the dispense.  In
+    some cases substitution will be expected but does not happen, in other
+    cases substitution is not expected but does happen.  This block explains
+    what substitution did or did not happen and why.  If nothing is specified,
+    substitution was not done.
+    """
+    
+    resource_type = "MedicationDispenseSubstitution"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.reason = None
+        """ Why was substitution made.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.responsibleParty = None
+        """ Who is responsible for the substitution.
+        List of `FHIRReference` items referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Code signifying whether a different drug was dispensed from what
+        was prescribed.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.wasSubstituted = None
+        """ Whether a substitution was or was not performed on the dispense.
+        Type `bool`. """
+        
+        super(MedicationDispenseSubstitution, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationDispenseSubstitution, self).elementProperties()
+        js.extend([
+            ("reason", "reason", codeableconcept.CodeableConcept, True, None, False),
+            ("responsibleParty", "responsibleParty", fhirreference.FHIRReference, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+            ("wasSubstituted", "wasSubstituted", bool, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import dosage
+except ImportError:
+    dosage = sys.modules[__package__ + '.dosage']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/medicationrequest.py b/fhirclient/models/medicationrequest.py
new file mode 100644
index 0000000..094a99b
--- /dev/null
+++ b/fhirclient/models/medicationrequest.py
@@ -0,0 +1,334 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MedicationRequest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class MedicationRequest(domainresource.DomainResource):
+    """ Ordering of medication for patient or group.
+    
+    An order or request for both supply of the medication and the instructions
+    for administration of the medication to a patient. The resource is called
+    "MedicationRequest" rather than "MedicationPrescription" or
+    "MedicationOrder" to generalize the use across inpatient and outpatient
+    settings, including care plans, etc., and to harmonize with workflow
+    patterns.
+    """
+    
+    resource_type = "MedicationRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authoredOn = None
+        """ When request was initially authored.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.basedOn = None
+        """ What request fulfills.
+        List of `FHIRReference` items referencing `CarePlan, MedicationRequest, ProcedureRequest, ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Type of medication usage.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Created during encounter/admission/stay.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Protocol or definition.
+        List of `FHIRReference` items referencing `ActivityDefinition, PlanDefinition` (represented as `dict` in JSON). """
+        
+        self.detectedIssue = None
+        """ Clinical Issue with action.
+        List of `FHIRReference` items referencing `DetectedIssue` (represented as `dict` in JSON). """
+        
+        self.dispenseRequest = None
+        """ Medication supply authorization.
+        Type `MedicationRequestDispenseRequest` (represented as `dict` in JSON). """
+        
+        self.dosageInstruction = None
+        """ How the medication should be taken.
+        List of `Dosage` items (represented as `dict` in JSON). """
+        
+        self.eventHistory = None
+        """ A list of events of interest in the lifecycle.
+        List of `FHIRReference` items referencing `Provenance` (represented as `dict` in JSON). """
+        
+        self.groupIdentifier = None
+        """ Composite request this is part of.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External ids for this request.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.intent = None
+        """ proposal | plan | order | instance-order.
+        Type `str`. """
+        
+        self.medicationCodeableConcept = None
+        """ Medication to be taken.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.medicationReference = None
+        """ Medication to be taken.
+        Type `FHIRReference` referencing `Medication` (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Information about the prescription.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.priorPrescription = None
+        """ An order/prescription that is being replaced.
+        Type `FHIRReference` referencing `MedicationRequest` (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ routine | urgent | stat | asap.
+        Type `str`. """
+        
+        self.reasonCode = None
+        """ Reason or indication for writing the prescription.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Condition or Observation that supports why the prescription is
+        being written.
+        List of `FHIRReference` items referencing `Condition, Observation` (represented as `dict` in JSON). """
+        
+        self.recorder = None
+        """ Person who entered the request.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.requester = None
+        """ Who/What requested the Request.
+        Type `MedicationRequestRequester` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | on-hold | cancelled | completed | entered-in-error |
+        stopped | draft | unknown.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who or group medication request is for.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.substitution = None
+        """ Any restrictions on medication substitution.
+        Type `MedicationRequestSubstitution` (represented as `dict` in JSON). """
+        
+        self.supportingInformation = None
+        """ Information to support ordering of the medication.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(MedicationRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationRequest, self).elementProperties()
+        js.extend([
+            ("authoredOn", "authoredOn", fhirdate.FHIRDate, False, None, False),
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, True, None, False),
+            ("detectedIssue", "detectedIssue", fhirreference.FHIRReference, True, None, False),
+            ("dispenseRequest", "dispenseRequest", MedicationRequestDispenseRequest, False, None, False),
+            ("dosageInstruction", "dosageInstruction", dosage.Dosage, True, None, False),
+            ("eventHistory", "eventHistory", fhirreference.FHIRReference, True, None, False),
+            ("groupIdentifier", "groupIdentifier", identifier.Identifier, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("intent", "intent", str, False, None, True),
+            ("medicationCodeableConcept", "medicationCodeableConcept", codeableconcept.CodeableConcept, False, "medication", True),
+            ("medicationReference", "medicationReference", fhirreference.FHIRReference, False, "medication", True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("priorPrescription", "priorPrescription", fhirreference.FHIRReference, False, None, False),
+            ("priority", "priority", str, False, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("recorder", "recorder", fhirreference.FHIRReference, False, None, False),
+            ("requester", "requester", MedicationRequestRequester, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("substitution", "substitution", MedicationRequestSubstitution, False, None, False),
+            ("supportingInformation", "supportingInformation", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class MedicationRequestDispenseRequest(backboneelement.BackboneElement):
+    """ Medication supply authorization.
+    
+    Indicates the specific details for the dispense or medication supply part
+    of a medication request (also known as a Medication Prescription or
+    Medication Order).  Note that this information is not always sent with the
+    order.  There may be in some settings (e.g. hospitals) institutional or
+    system support for completing the dispense details in the pharmacy
+    department.
+    """
+    
+    resource_type = "MedicationRequestDispenseRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.expectedSupplyDuration = None
+        """ Number of days supply per dispense.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.numberOfRepeatsAllowed = None
+        """ Number of refills authorized.
+        Type `int`. """
+        
+        self.performer = None
+        """ Intended dispenser.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Amount of medication to supply per dispense.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.validityPeriod = None
+        """ Time period supply is authorized for.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(MedicationRequestDispenseRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationRequestDispenseRequest, self).elementProperties()
+        js.extend([
+            ("expectedSupplyDuration", "expectedSupplyDuration", duration.Duration, False, None, False),
+            ("numberOfRepeatsAllowed", "numberOfRepeatsAllowed", int, False, None, False),
+            ("performer", "performer", fhirreference.FHIRReference, False, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("validityPeriod", "validityPeriod", period.Period, False, None, False),
+        ])
+        return js
+
+
+class MedicationRequestRequester(backboneelement.BackboneElement):
+    """ Who/What requested the Request.
+    
+    The individual, organization or device that initiated the request and has
+    responsibility for its activation.
+    """
+    
+    resource_type = "MedicationRequestRequester"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.agent = None
+        """ Who ordered the initial medication(s).
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, RelatedPerson, Device` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization agent is acting for.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(MedicationRequestRequester, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationRequestRequester, self).elementProperties()
+        js.extend([
+            ("agent", "agent", fhirreference.FHIRReference, False, None, True),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+class MedicationRequestSubstitution(backboneelement.BackboneElement):
+    """ Any restrictions on medication substitution.
+    
+    Indicates whether or not substitution can or should be part of the
+    dispense. In some cases substitution must happen, in other cases
+    substitution must not happen. This block explains the prescriber's intent.
+    If nothing is specified substitution may be done.
+    """
+    
+    resource_type = "MedicationRequestSubstitution"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.allowed = None
+        """ Whether substitution is allowed or not.
+        Type `bool`. """
+        
+        self.reason = None
+        """ Why should (not) substitution be made.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(MedicationRequestSubstitution, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationRequestSubstitution, self).elementProperties()
+        js.extend([
+            ("allowed", "allowed", bool, False, None, True),
+            ("reason", "reason", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import dosage
+except ImportError:
+    dosage = sys.modules[__package__ + '.dosage']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/medicationstatement.py b/fhirclient/models/medicationstatement.py
new file mode 100644
index 0000000..5a199b7
--- /dev/null
+++ b/fhirclient/models/medicationstatement.py
@@ -0,0 +1,189 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MedicationStatement) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class MedicationStatement(domainresource.DomainResource):
+    """ Record of medication being taken by a patient.
+    
+    A record of a medication that is being consumed by a patient.   A
+    MedicationStatement may indicate that the patient may be taking the
+    medication now, or has taken the medication in the past or will be taking
+    the medication in the future.  The source of this information can be the
+    patient, significant other (such as a family member or spouse), or a
+    clinician.  A common scenario where this information is captured is during
+    the history taking process during a patient visit or stay.   The medication
+    information may come from sources such as the patient's memory, from a
+    prescription bottle,  or from a list of medications the patient, clinician
+    or other party maintains
+    
+    The primary difference between a medication statement and a medication
+    administration is that the medication administration has complete
+    administration information and is based on actual administration
+    information from the person who administered the medication.  A medication
+    statement is often, if not always, less specific.  There is no required
+    date/time when the medication was administered, in fact we only know that a
+    source has reported the patient is taking this medication, where details
+    such as time, quantity, or rate or even medication product may be
+    incomplete or missing or less precise.  As stated earlier, the medication
+    statement information may come from the patient's memory, from a
+    prescription bottle or from a list of medications the patient, clinician or
+    other party maintains.  Medication administration is more formal and is not
+    missing detailed information.
+    """
+    
+    resource_type = "MedicationStatement"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.basedOn = None
+        """ Fulfils plan, proposal or order.
+        List of `FHIRReference` items referencing `MedicationRequest, CarePlan, ProcedureRequest, ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Type of medication usage.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter / Episode associated with MedicationStatement.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.dateAsserted = None
+        """ When the statement was asserted?.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.derivedFrom = None
+        """ Additional supporting information.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.dosage = None
+        """ Details of how medication is/was taken or should be taken.
+        List of `Dosage` items (represented as `dict` in JSON). """
+        
+        self.effectiveDateTime = None
+        """ The date/time or interval when the medication was taken.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.effectivePeriod = None
+        """ The date/time or interval when the medication was taken.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.informationSource = None
+        """ Person or organization that provided the information about the
+        taking of this medication.
+        Type `FHIRReference` referencing `Patient, Practitioner, RelatedPerson, Organization` (represented as `dict` in JSON). """
+        
+        self.medicationCodeableConcept = None
+        """ What medication was taken.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.medicationReference = None
+        """ What medication was taken.
+        Type `FHIRReference` referencing `Medication` (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Further information about the statement.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Part of referenced event.
+        List of `FHIRReference` items referencing `MedicationAdministration, MedicationDispense, MedicationStatement, Procedure, Observation` (represented as `dict` in JSON). """
+        
+        self.reasonCode = None
+        """ Reason for why the medication is being/was taken.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonNotTaken = None
+        """ True if asserting medication was not given.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Condition or observation that supports why the medication is
+        being/was taken.
+        List of `FHIRReference` items referencing `Condition, Observation` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | completed | entered-in-error | intended | stopped | on-
+        hold.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who is/was taking  the medication.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.taken = None
+        """ y | n | unk | na.
+        Type `str`. """
+        
+        super(MedicationStatement, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MedicationStatement, self).elementProperties()
+        js.extend([
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("dateAsserted", "dateAsserted", fhirdate.FHIRDate, False, None, False),
+            ("derivedFrom", "derivedFrom", fhirreference.FHIRReference, True, None, False),
+            ("dosage", "dosage", dosage.Dosage, True, None, False),
+            ("effectiveDateTime", "effectiveDateTime", fhirdate.FHIRDate, False, "effective", False),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, "effective", False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("informationSource", "informationSource", fhirreference.FHIRReference, False, None, False),
+            ("medicationCodeableConcept", "medicationCodeableConcept", codeableconcept.CodeableConcept, False, "medication", True),
+            ("medicationReference", "medicationReference", fhirreference.FHIRReference, False, "medication", True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, True, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonNotTaken", "reasonNotTaken", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("taken", "taken", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import dosage
+except ImportError:
+    dosage = sys.modules[__package__ + '.dosage']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/messagedefinition.py b/fhirclient/models/messagedefinition.py
new file mode 100644
index 0000000..071ec59
--- /dev/null
+++ b/fhirclient/models/messagedefinition.py
@@ -0,0 +1,266 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MessageDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class MessageDefinition(domainresource.DomainResource):
+    """ A resource that defines a type of message that can be exchanged between
+    systems.
+    
+    Defines the characteristics of a message that can be shared between
+    systems, including the type of event that initiates the message, the
+    content to be transmitted and what response(s), if any, are permitted.
+    """
+    
+    resource_type = "MessageDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.allowedResponse = None
+        """ Responses to this message.
+        List of `MessageDefinitionAllowedResponse` items (represented as `dict` in JSON). """
+        
+        self.base = None
+        """ Definition this one is based on.
+        Type `FHIRReference` referencing `MessageDefinition` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Consequence | Currency | Notification.
+        Type `str`. """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the message definition.
+        Type `str`. """
+        
+        self.event = None
+        """ Event type.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.focus = None
+        """ Resource(s) that are the subject of the event.
+        List of `MessageDefinitionFocus` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Additional identifier for the message definition.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for message definition (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this message definition (computer friendly).
+        Type `str`. """
+        
+        self.parent = None
+        """ Protocol/workflow this is part of.
+        List of `FHIRReference` items referencing `ActivityDefinition, PlanDefinition` (represented as `dict` in JSON). """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this message definition is defined.
+        Type `str`. """
+        
+        self.replaces = None
+        """ Takes the place of.
+        List of `FHIRReference` items referencing `MessageDefinition` (represented as `dict` in JSON). """
+        
+        self.responseRequired = None
+        """ Is a response required?.
+        Type `bool`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this message definition (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this message definition (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the message definition.
+        Type `str`. """
+        
+        super(MessageDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MessageDefinition, self).elementProperties()
+        js.extend([
+            ("allowedResponse", "allowedResponse", MessageDefinitionAllowedResponse, True, None, False),
+            ("base", "base", fhirreference.FHIRReference, False, None, False),
+            ("category", "category", str, False, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("event", "event", coding.Coding, False, None, True),
+            ("experimental", "experimental", bool, False, None, False),
+            ("focus", "focus", MessageDefinitionFocus, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("parent", "parent", fhirreference.FHIRReference, True, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("replaces", "replaces", fhirreference.FHIRReference, True, None, False),
+            ("responseRequired", "responseRequired", bool, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class MessageDefinitionAllowedResponse(backboneelement.BackboneElement):
+    """ Responses to this message.
+    
+    Indicates what types of messages may be sent as an application-level
+    response to this message.
+    """
+    
+    resource_type = "MessageDefinitionAllowedResponse"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.message = None
+        """ Reference to allowed message definition response.
+        Type `FHIRReference` referencing `MessageDefinition` (represented as `dict` in JSON). """
+        
+        self.situation = None
+        """ When should this response be used.
+        Type `str`. """
+        
+        super(MessageDefinitionAllowedResponse, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MessageDefinitionAllowedResponse, self).elementProperties()
+        js.extend([
+            ("message", "message", fhirreference.FHIRReference, False, None, True),
+            ("situation", "situation", str, False, None, False),
+        ])
+        return js
+
+
+class MessageDefinitionFocus(backboneelement.BackboneElement):
+    """ Resource(s) that are the subject of the event.
+    
+    Identifies the resource (or resources) that are being addressed by the
+    event.  For example, the Encounter for an admit message or two Account
+    records for a merge.
+    """
+    
+    resource_type = "MessageDefinitionFocus"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Type of resource.
+        Type `str`. """
+        
+        self.max = None
+        """ Maximum number of focuses of this type.
+        Type `str`. """
+        
+        self.min = None
+        """ Minimum number of focuses of this type.
+        Type `int`. """
+        
+        self.profile = None
+        """ Profile that must be adhered to by focus.
+        Type `FHIRReference` referencing `StructureDefinition` (represented as `dict` in JSON). """
+        
+        super(MessageDefinitionFocus, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MessageDefinitionFocus, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("max", "max", str, False, None, False),
+            ("min", "min", int, False, None, False),
+            ("profile", "profile", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/messagedefinition_tests.py b/fhirclient/models/messagedefinition_tests.py
new file mode 100644
index 0000000..92068b2
--- /dev/null
+++ b/fhirclient/models/messagedefinition_tests.py
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import messagedefinition
+from .fhirdate import FHIRDate
+
+
+class MessageDefinitionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("MessageDefinition", js["resourceType"])
+        return messagedefinition.MessageDefinition(js)
+    
+    def testMessageDefinition1(self):
+        inst = self.instantiate_from("messagedefinition-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a MessageDefinition instance")
+        self.implMessageDefinition1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("MessageDefinition", js["resourceType"])
+        inst2 = messagedefinition.MessageDefinition(js)
+        self.implMessageDefinition1(inst2)
+    
+    def implMessageDefinition1(self, inst):
+        self.assertEqual(inst.category, "Notification")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org")
+        self.assertEqual(inst.date.date, FHIRDate("2016-11-09").date)
+        self.assertEqual(inst.date.as_json(), "2016-11-09")
+        self.assertEqual(inst.event.code, "communication-request")
+        self.assertEqual(inst.event.system, "http://hl7.org/fhir/message-events")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.name, "EXAMPLE")
+        self.assertEqual(inst.publisher, "Health Level Seven, Int'l")
+        self.assertEqual(inst.purpose, "Defines a base example for other MessageDefintion instances.")
+        self.assertFalse(inst.responseRequired)
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Message definition base example</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Message definition base example")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/MessageDefinition/example")
+
diff --git a/fhirclient/models/messageheader.py b/fhirclient/models/messageheader.py
new file mode 100644
index 0000000..0d582e1
--- /dev/null
+++ b/fhirclient/models/messageheader.py
@@ -0,0 +1,252 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MessageHeader) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class MessageHeader(domainresource.DomainResource):
+    """ A resource that describes a message that is exchanged between systems.
+    
+    The header for a message exchange that is either requesting or responding
+    to an action.  The reference(s) that are the subject of the action as well
+    as other information related to the action are typically transmitted in a
+    bundle in which the MessageHeader resource instance is the first resource
+    in the bundle.
+    """
+    
+    resource_type = "MessageHeader"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.author = None
+        """ The source of the decision.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.destination = None
+        """ Message destination application(s).
+        List of `MessageHeaderDestination` items (represented as `dict` in JSON). """
+        
+        self.enterer = None
+        """ The source of the data entry.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.event = None
+        """ Code for the event this message represents.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.focus = None
+        """ The actual content of the message.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.reason = None
+        """ Cause of event.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.receiver = None
+        """ Intended "real-world" recipient for the data.
+        Type `FHIRReference` referencing `Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.response = None
+        """ If this is a reply to prior message.
+        Type `MessageHeaderResponse` (represented as `dict` in JSON). """
+        
+        self.responsible = None
+        """ Final responsibility for event.
+        Type `FHIRReference` referencing `Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.sender = None
+        """ Real world sender of the message.
+        Type `FHIRReference` referencing `Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.source = None
+        """ Message source application.
+        Type `MessageHeaderSource` (represented as `dict` in JSON). """
+        
+        self.timestamp = None
+        """ Time that the message was sent.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(MessageHeader, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MessageHeader, self).elementProperties()
+        js.extend([
+            ("author", "author", fhirreference.FHIRReference, False, None, False),
+            ("destination", "destination", MessageHeaderDestination, True, None, False),
+            ("enterer", "enterer", fhirreference.FHIRReference, False, None, False),
+            ("event", "event", coding.Coding, False, None, True),
+            ("focus", "focus", fhirreference.FHIRReference, True, None, False),
+            ("reason", "reason", codeableconcept.CodeableConcept, False, None, False),
+            ("receiver", "receiver", fhirreference.FHIRReference, False, None, False),
+            ("response", "response", MessageHeaderResponse, False, None, False),
+            ("responsible", "responsible", fhirreference.FHIRReference, False, None, False),
+            ("sender", "sender", fhirreference.FHIRReference, False, None, False),
+            ("source", "source", MessageHeaderSource, False, None, True),
+            ("timestamp", "timestamp", fhirdate.FHIRDate, False, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class MessageHeaderDestination(backboneelement.BackboneElement):
+    """ Message destination application(s).
+    
+    The destination application which the message is intended for.
+    """
+    
+    resource_type = "MessageHeaderDestination"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.endpoint = None
+        """ Actual destination address or id.
+        Type `str`. """
+        
+        self.name = None
+        """ Name of system.
+        Type `str`. """
+        
+        self.target = None
+        """ Particular delivery destination within the destination.
+        Type `FHIRReference` referencing `Device` (represented as `dict` in JSON). """
+        
+        super(MessageHeaderDestination, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MessageHeaderDestination, self).elementProperties()
+        js.extend([
+            ("endpoint", "endpoint", str, False, None, True),
+            ("name", "name", str, False, None, False),
+            ("target", "target", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+class MessageHeaderResponse(backboneelement.BackboneElement):
+    """ If this is a reply to prior message.
+    
+    Information about the message that this message is a response to.  Only
+    present if this message is a response.
+    """
+    
+    resource_type = "MessageHeaderResponse"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ ok | transient-error | fatal-error.
+        Type `str`. """
+        
+        self.details = None
+        """ Specific list of hints/warnings/errors.
+        Type `FHIRReference` referencing `OperationOutcome` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Id of original message.
+        Type `str`. """
+        
+        super(MessageHeaderResponse, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MessageHeaderResponse, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("details", "details", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", str, False, None, True),
+        ])
+        return js
+
+
+class MessageHeaderSource(backboneelement.BackboneElement):
+    """ Message source application.
+    
+    The source application from which this message originated.
+    """
+    
+    resource_type = "MessageHeaderSource"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contact = None
+        """ Human contact for problems.
+        Type `ContactPoint` (represented as `dict` in JSON). """
+        
+        self.endpoint = None
+        """ Actual message source address or id.
+        Type `str`. """
+        
+        self.name = None
+        """ Name of system.
+        Type `str`. """
+        
+        self.software = None
+        """ Name of software running the system.
+        Type `str`. """
+        
+        self.version = None
+        """ Version of software running.
+        Type `str`. """
+        
+        super(MessageHeaderSource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MessageHeaderSource, self).elementProperties()
+        js.extend([
+            ("contact", "contact", contactpoint.ContactPoint, False, None, False),
+            ("endpoint", "endpoint", str, False, None, True),
+            ("name", "name", str, False, None, False),
+            ("software", "software", str, False, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
diff --git a/fhirclient/models/messageheader_tests.py b/fhirclient/models/messageheader_tests.py
new file mode 100644
index 0000000..c0dff3a
--- /dev/null
+++ b/fhirclient/models/messageheader_tests.py
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import messageheader
+from .fhirdate import FHIRDate
+
+
+class MessageHeaderTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("MessageHeader", js["resourceType"])
+        return messageheader.MessageHeader(js)
+    
+    def testMessageHeader1(self):
+        inst = self.instantiate_from("messageheader-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a MessageHeader instance")
+        self.implMessageHeader1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("MessageHeader", js["resourceType"])
+        inst2 = messageheader.MessageHeader(js)
+        self.implMessageHeader1(inst2)
+    
+    def implMessageHeader1(self, inst):
+        self.assertEqual(inst.destination[0].endpoint, "llp:10.11.12.14:5432")
+        self.assertEqual(inst.destination[0].name, "Acme Message Gateway")
+        self.assertEqual(inst.event.code, "admin-notify")
+        self.assertEqual(inst.event.system, "http://hl7.org/fhir/message-events")
+        self.assertEqual(inst.id, "1cbdfb97-5859-48a4-8301-d54eab818d68")
+        self.assertEqual(inst.reason.coding[0].code, "admit")
+        self.assertEqual(inst.reason.coding[0].system, "http://hl7.org/fhir/message-reasons-encounter")
+        self.assertEqual(inst.response.code, "ok")
+        self.assertEqual(inst.response.identifier, "5015fe84-8e76-4526-89d8-44b322e8d4fb")
+        self.assertEqual(inst.source.contact.system, "phone")
+        self.assertEqual(inst.source.contact.value, "+1 (555) 123 4567")
+        self.assertEqual(inst.source.endpoint, "llp:10.11.12.13:5432")
+        self.assertEqual(inst.source.name, "Acme Central Patient Registry")
+        self.assertEqual(inst.source.software, "FooBar Patient Manager")
+        self.assertEqual(inst.source.version, "3.1.45.AABB")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.timestamp.date, FHIRDate("2012-01-04T09:10:14Z").date)
+        self.assertEqual(inst.timestamp.as_json(), "2012-01-04T09:10:14Z")
+
diff --git a/fhirclient/models/meta.py b/fhirclient/models/meta.py
new file mode 100644
index 0000000..008dfad
--- /dev/null
+++ b/fhirclient/models/meta.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Meta) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Meta(element.Element):
+    """ Metadata about a resource.
+    
+    The metadata about a resource. This is content in the resource that is
+    maintained by the infrastructure. Changes to the content may not always be
+    associated with version changes to the resource.
+    """
+    
+    resource_type = "Meta"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.lastUpdated = None
+        """ When the resource version last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.profile = None
+        """ Profiles this resource claims to conform to.
+        List of `str` items. """
+        
+        self.security = None
+        """ Security Labels applied to this resource.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.tag = None
+        """ Tags applied to this resource.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.versionId = None
+        """ Version specific identifier.
+        Type `str`. """
+        
+        super(Meta, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Meta, self).elementProperties()
+        js.extend([
+            ("lastUpdated", "lastUpdated", fhirdate.FHIRDate, False, None, False),
+            ("profile", "profile", str, True, None, False),
+            ("security", "security", coding.Coding, True, None, False),
+            ("tag", "tag", coding.Coding, True, None, False),
+            ("versionId", "versionId", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
diff --git a/fhirclient/models/metadataresource.py b/fhirclient/models/metadataresource.py
new file mode 100644
index 0000000..afe388e
--- /dev/null
+++ b/fhirclient/models/metadataresource.py
@@ -0,0 +1,112 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MetadataResource) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class MetadataResource(domainresource.DomainResource):
+    """ Common Ancestor declaration for definitional resources.
+    
+    Common Ancestor declaration for conformance and knowledge artifact
+    resources.
+    """
+    
+    resource_type = "MetadataResource"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the metadata resource.
+        Type `str`. """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for metadata resource (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this metadata resource (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this metadata resource (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this metadata resource (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the metadata resource.
+        Type `str`. """
+        
+        super(MetadataResource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(MetadataResource, self).elementProperties()
+        js.extend([
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/money.py b/fhirclient/models/money.py
new file mode 100644
index 0000000..4dfca62
--- /dev/null
+++ b/fhirclient/models/money.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Money) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import quantity
+
+class Money(quantity.Quantity):
+    """ An amount of economic utility in some recognized currency.
+    """
+    
+    resource_type = "Money"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        super(Money, self).__init__(jsondict=jsondict, strict=strict)
+
+
diff --git a/fhirclient/models/namingsystem.py b/fhirclient/models/namingsystem.py
new file mode 100644
index 0000000..6b052d6
--- /dev/null
+++ b/fhirclient/models/namingsystem.py
@@ -0,0 +1,184 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/NamingSystem) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class NamingSystem(domainresource.DomainResource):
+    """ System of unique identification.
+    
+    A curated namespace that issues unique symbols within that namespace for
+    the identification of concepts, people, devices, etc.  Represents a
+    "System" used within the Identifier and Coding data types.
+    """
+    
+    resource_type = "NamingSystem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the naming system.
+        Type `str`. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for naming system (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.kind = None
+        """ codesystem | identifier | root.
+        Type `str`. """
+        
+        self.name = None
+        """ Name for this naming system (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.replacedBy = None
+        """ Use this instead.
+        Type `FHIRReference` referencing `NamingSystem` (represented as `dict` in JSON). """
+        
+        self.responsible = None
+        """ Who maintains system namespace?.
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.type = None
+        """ e.g. driver,  provider,  patient, bank etc..
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.uniqueId = None
+        """ Unique identifiers used for system.
+        List of `NamingSystemUniqueId` items (represented as `dict` in JSON). """
+        
+        self.usage = None
+        """ How/where is it used.
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        super(NamingSystem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(NamingSystem, self).elementProperties()
+        js.extend([
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("kind", "kind", str, False, None, True),
+            ("name", "name", str, False, None, True),
+            ("publisher", "publisher", str, False, None, False),
+            ("replacedBy", "replacedBy", fhirreference.FHIRReference, False, None, False),
+            ("responsible", "responsible", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+            ("uniqueId", "uniqueId", NamingSystemUniqueId, True, None, True),
+            ("usage", "usage", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class NamingSystemUniqueId(backboneelement.BackboneElement):
+    """ Unique identifiers used for system.
+    
+    Indicates how the system may be identified when referenced in electronic
+    exchange.
+    """
+    
+    resource_type = "NamingSystemUniqueId"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.comment = None
+        """ Notes about identifier usage.
+        Type `str`. """
+        
+        self.period = None
+        """ When is identifier valid?.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.preferred = None
+        """ Is this the id that should be used for this type.
+        Type `bool`. """
+        
+        self.type = None
+        """ oid | uuid | uri | other.
+        Type `str`. """
+        
+        self.value = None
+        """ The unique identifier.
+        Type `str`. """
+        
+        super(NamingSystemUniqueId, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(NamingSystemUniqueId, self).elementProperties()
+        js.extend([
+            ("comment", "comment", str, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("preferred", "preferred", bool, False, None, False),
+            ("type", "type", str, False, None, True),
+            ("value", "value", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/namingsystem_tests.py b/fhirclient/models/namingsystem_tests.py
new file mode 100644
index 0000000..84d86fd
--- /dev/null
+++ b/fhirclient/models/namingsystem_tests.py
@@ -0,0 +1,115 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import namingsystem
+from .fhirdate import FHIRDate
+
+
+class NamingSystemTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("NamingSystem", js["resourceType"])
+        return namingsystem.NamingSystem(js)
+    
+    def testNamingSystem1(self):
+        inst = self.instantiate_from("namingsystem-example-id.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NamingSystem instance")
+        self.implNamingSystem1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NamingSystem", js["resourceType"])
+        inst2 = namingsystem.NamingSystem(js)
+        self.implNamingSystem1(inst2)
+    
+    def implNamingSystem1(self, inst):
+        self.assertEqual(inst.contact[0].name, "HL7 Australia FHIR Team")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7-australia.wikispaces.com/FHIR+Australia")
+        self.assertEqual(inst.date.date, FHIRDate("2015-08-31").date)
+        self.assertEqual(inst.date.as_json(), "2015-08-31")
+        self.assertEqual(inst.description, "Australian HI Identifier as established by relevant regulations etc")
+        self.assertEqual(inst.id, "example-id")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "AU")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.kind, "identifier")
+        self.assertEqual(inst.name, "Austalian Healthcare Identifier - Individual")
+        self.assertEqual(inst.publisher, "HL7 Australia on behalf of NEHTA")
+        self.assertEqual(inst.responsible, "HI Service Operator / NEHTA")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "NI")
+        self.assertEqual(inst.type.coding[0].display, "National unique individual identifier")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v2/0203")
+        self.assertEqual(inst.type.text, "IHI")
+        self.assertEqual(inst.uniqueId[0].comment, "This value is used in Australian CDA documents")
+        self.assertEqual(inst.uniqueId[0].type, "oid")
+        self.assertEqual(inst.uniqueId[0].value, "1.2.36.1.2001.1003.0")
+        self.assertEqual(inst.uniqueId[1].period.start.date, FHIRDate("2015-08-21").date)
+        self.assertEqual(inst.uniqueId[1].period.start.as_json(), "2015-08-21")
+        self.assertTrue(inst.uniqueId[1].preferred)
+        self.assertEqual(inst.uniqueId[1].type, "uri")
+        self.assertEqual(inst.uniqueId[1].value, "http://ns.electronichealth.net.au/id/hi/ihi/1.0")
+        self.assertEqual(inst.usage, "Used in Australia for identifying patients")
+    
+    def testNamingSystem2(self):
+        inst = self.instantiate_from("namingsystem-example-replaced.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NamingSystem instance")
+        self.implNamingSystem2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NamingSystem", js["resourceType"])
+        inst2 = namingsystem.NamingSystem(js)
+        self.implNamingSystem2(inst2)
+    
+    def implNamingSystem2(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2005-01-25").date)
+        self.assertEqual(inst.date.as_json(), "2005-01-25")
+        self.assertEqual(inst.description, "This was a wrong registration for the spanish editions of SNOMED CT. Do not use")
+        self.assertEqual(inst.id, "example-replaced")
+        self.assertEqual(inst.kind, "codesystem")
+        self.assertEqual(inst.name, "SNOMED CT Spanish")
+        self.assertEqual(inst.publisher, "Not HL7!")
+        self.assertEqual(inst.status, "retired")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.uniqueId[0].type, "oid")
+        self.assertEqual(inst.uniqueId[0].value, "2.16.840.1.113883.6.96.1")
+    
+    def testNamingSystem3(self):
+        inst = self.instantiate_from("namingsystem-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NamingSystem instance")
+        self.implNamingSystem3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NamingSystem", js["resourceType"])
+        inst2 = namingsystem.NamingSystem(js)
+        self.implNamingSystem3(inst2)
+    
+    def implNamingSystem3(self, inst):
+        self.assertEqual(inst.contact[0].name, "FHIR project team")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.date.date, FHIRDate("2014-12-13").date)
+        self.assertEqual(inst.date.as_json(), "2014-12-13")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.kind, "codesystem")
+        self.assertEqual(inst.name, "SNOMED CT")
+        self.assertEqual(inst.publisher, "HL7 International on behalf of IHTSDO")
+        self.assertEqual(inst.responsible, "IHTSDO & affiliates")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.uniqueId[0].type, "oid")
+        self.assertEqual(inst.uniqueId[0].value, "2.16.840.1.113883.6.96")
+        self.assertTrue(inst.uniqueId[1].preferred)
+        self.assertEqual(inst.uniqueId[1].type, "uri")
+        self.assertEqual(inst.uniqueId[1].value, "http://snomed.info/sct")
+
diff --git a/fhirclient/models/narrative.py b/fhirclient/models/narrative.py
new file mode 100644
index 0000000..df00f18
--- /dev/null
+++ b/fhirclient/models/narrative.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Narrative) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Narrative(element.Element):
+    """ A human-readable formatted text, including images.
+    """
+    
+    resource_type = "Narrative"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.div = None
+        """ Limited xhtml content.
+        Type `str`. """
+        
+        self.status = None
+        """ generated | extensions | additional | empty.
+        Type `str`. """
+        
+        super(Narrative, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Narrative, self).elementProperties()
+        js.extend([
+            ("div", "div", str, False, None, True),
+            ("status", "status", str, False, None, True),
+        ])
+        return js
+
+
diff --git a/fhirclient/models/nutritionorder.py b/fhirclient/models/nutritionorder.py
new file mode 100644
index 0000000..705c96e
--- /dev/null
+++ b/fhirclient/models/nutritionorder.py
@@ -0,0 +1,429 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/NutritionOrder) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class NutritionOrder(domainresource.DomainResource):
+    """ Diet, formula or nutritional supplement request.
+    
+    A request to supply a diet, formula feeding (enteral) or oral nutritional
+    supplement to a patient/resident.
+    """
+    
+    resource_type = "NutritionOrder"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.allergyIntolerance = None
+        """ List of the patient's food and nutrition-related allergies and
+        intolerances.
+        List of `FHIRReference` items referencing `AllergyIntolerance` (represented as `dict` in JSON). """
+        
+        self.dateTime = None
+        """ Date and time the nutrition order was requested.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.encounter = None
+        """ The encounter associated with this nutrition order.
+        Type `FHIRReference` referencing `Encounter` (represented as `dict` in JSON). """
+        
+        self.enteralFormula = None
+        """ Enteral formula components.
+        Type `NutritionOrderEnteralFormula` (represented as `dict` in JSON). """
+        
+        self.excludeFoodModifier = None
+        """ Order-specific modifier about the type of food that should not be
+        given.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.foodPreferenceModifier = None
+        """ Order-specific modifier about the type of food that should be given.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Identifiers assigned to this order.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.oralDiet = None
+        """ Oral diet components.
+        Type `NutritionOrderOralDiet` (represented as `dict` in JSON). """
+        
+        self.orderer = None
+        """ Who ordered the diet, formula or nutritional supplement.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ The person who requires the diet, formula or nutritional supplement.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ proposed | draft | planned | requested | active | on-hold |
+        completed | cancelled | entered-in-error.
+        Type `str`. """
+        
+        self.supplement = None
+        """ Supplement components.
+        List of `NutritionOrderSupplement` items (represented as `dict` in JSON). """
+        
+        super(NutritionOrder, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(NutritionOrder, self).elementProperties()
+        js.extend([
+            ("allergyIntolerance", "allergyIntolerance", fhirreference.FHIRReference, True, None, False),
+            ("dateTime", "dateTime", fhirdate.FHIRDate, False, None, True),
+            ("encounter", "encounter", fhirreference.FHIRReference, False, None, False),
+            ("enteralFormula", "enteralFormula", NutritionOrderEnteralFormula, False, None, False),
+            ("excludeFoodModifier", "excludeFoodModifier", codeableconcept.CodeableConcept, True, None, False),
+            ("foodPreferenceModifier", "foodPreferenceModifier", codeableconcept.CodeableConcept, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("oralDiet", "oralDiet", NutritionOrderOralDiet, False, None, False),
+            ("orderer", "orderer", fhirreference.FHIRReference, False, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("status", "status", str, False, None, False),
+            ("supplement", "supplement", NutritionOrderSupplement, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class NutritionOrderEnteralFormula(backboneelement.BackboneElement):
+    """ Enteral formula components.
+    
+    Feeding provided through the gastrointestinal tract via a tube, catheter,
+    or stoma that delivers nutrition distal to the oral cavity.
+    """
+    
+    resource_type = "NutritionOrderEnteralFormula"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.additiveProductName = None
+        """ Product or brand name of the modular additive.
+        Type `str`. """
+        
+        self.additiveType = None
+        """ Type of modular component to add to the feeding.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.administration = None
+        """ Formula feeding instruction as structured data.
+        List of `NutritionOrderEnteralFormulaAdministration` items (represented as `dict` in JSON). """
+        
+        self.administrationInstruction = None
+        """ Formula feeding instructions expressed as text.
+        Type `str`. """
+        
+        self.baseFormulaProductName = None
+        """ Product or brand name of the enteral or infant formula.
+        Type `str`. """
+        
+        self.baseFormulaType = None
+        """ Type of enteral or infant formula.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.caloricDensity = None
+        """ Amount of energy per specified volume that is required.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.maxVolumeToDeliver = None
+        """ Upper limit on formula volume per unit of time.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.routeofAdministration = None
+        """ How the formula should enter the patient's gastrointestinal tract.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(NutritionOrderEnteralFormula, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(NutritionOrderEnteralFormula, self).elementProperties()
+        js.extend([
+            ("additiveProductName", "additiveProductName", str, False, None, False),
+            ("additiveType", "additiveType", codeableconcept.CodeableConcept, False, None, False),
+            ("administration", "administration", NutritionOrderEnteralFormulaAdministration, True, None, False),
+            ("administrationInstruction", "administrationInstruction", str, False, None, False),
+            ("baseFormulaProductName", "baseFormulaProductName", str, False, None, False),
+            ("baseFormulaType", "baseFormulaType", codeableconcept.CodeableConcept, False, None, False),
+            ("caloricDensity", "caloricDensity", quantity.Quantity, False, None, False),
+            ("maxVolumeToDeliver", "maxVolumeToDeliver", quantity.Quantity, False, None, False),
+            ("routeofAdministration", "routeofAdministration", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class NutritionOrderEnteralFormulaAdministration(backboneelement.BackboneElement):
+    """ Formula feeding instruction as structured data.
+    
+    Formula administration instructions as structured data.  This repeating
+    structure allows for changing the administration rate or volume over time
+    for both bolus and continuous feeding.  An example of this would be an
+    instruction to increase the rate of continuous feeding every 2 hours.
+    """
+    
+    resource_type = "NutritionOrderEnteralFormulaAdministration"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.quantity = None
+        """ The volume of formula to provide.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.rateQuantity = None
+        """ Speed with which the formula is provided per period of time.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.rateRatio = None
+        """ Speed with which the formula is provided per period of time.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.schedule = None
+        """ Scheduled frequency of enteral feeding.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        super(NutritionOrderEnteralFormulaAdministration, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(NutritionOrderEnteralFormulaAdministration, self).elementProperties()
+        js.extend([
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("rateQuantity", "rateQuantity", quantity.Quantity, False, "rate", False),
+            ("rateRatio", "rateRatio", ratio.Ratio, False, "rate", False),
+            ("schedule", "schedule", timing.Timing, False, None, False),
+        ])
+        return js
+
+
+class NutritionOrderOralDiet(backboneelement.BackboneElement):
+    """ Oral diet components.
+    
+    Diet given orally in contrast to enteral (tube) feeding.
+    """
+    
+    resource_type = "NutritionOrderOralDiet"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.fluidConsistencyType = None
+        """ The required consistency of fluids and liquids provided to the
+        patient.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.instruction = None
+        """ Instructions or additional information about the oral diet.
+        Type `str`. """
+        
+        self.nutrient = None
+        """ Required  nutrient modifications.
+        List of `NutritionOrderOralDietNutrient` items (represented as `dict` in JSON). """
+        
+        self.schedule = None
+        """ Scheduled frequency of diet.
+        List of `Timing` items (represented as `dict` in JSON). """
+        
+        self.texture = None
+        """ Required  texture modifications.
+        List of `NutritionOrderOralDietTexture` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type of oral diet or diet restrictions that describe what can be
+        consumed orally.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(NutritionOrderOralDiet, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(NutritionOrderOralDiet, self).elementProperties()
+        js.extend([
+            ("fluidConsistencyType", "fluidConsistencyType", codeableconcept.CodeableConcept, True, None, False),
+            ("instruction", "instruction", str, False, None, False),
+            ("nutrient", "nutrient", NutritionOrderOralDietNutrient, True, None, False),
+            ("schedule", "schedule", timing.Timing, True, None, False),
+            ("texture", "texture", NutritionOrderOralDietTexture, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+class NutritionOrderOralDietNutrient(backboneelement.BackboneElement):
+    """ Required  nutrient modifications.
+    
+    Class that defines the quantity and type of nutrient modifications (for
+    example carbohydrate, fiber or sodium) required for the oral diet.
+    """
+    
+    resource_type = "NutritionOrderOralDietNutrient"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.amount = None
+        """ Quantity of the specified nutrient.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.modifier = None
+        """ Type of nutrient that is being modified.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(NutritionOrderOralDietNutrient, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(NutritionOrderOralDietNutrient, self).elementProperties()
+        js.extend([
+            ("amount", "amount", quantity.Quantity, False, None, False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class NutritionOrderOralDietTexture(backboneelement.BackboneElement):
+    """ Required  texture modifications.
+    
+    Class that describes any texture modifications required for the patient to
+    safely consume various types of solid foods.
+    """
+    
+    resource_type = "NutritionOrderOralDietTexture"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.foodType = None
+        """ Concepts that are used to identify an entity that is ingested for
+        nutritional purposes.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.modifier = None
+        """ Code to indicate how to alter the texture of the foods, e.g. pureed.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(NutritionOrderOralDietTexture, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(NutritionOrderOralDietTexture, self).elementProperties()
+        js.extend([
+            ("foodType", "foodType", codeableconcept.CodeableConcept, False, None, False),
+            ("modifier", "modifier", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class NutritionOrderSupplement(backboneelement.BackboneElement):
+    """ Supplement components.
+    
+    Oral nutritional products given in order to add further nutritional value
+    to the patient's diet.
+    """
+    
+    resource_type = "NutritionOrderSupplement"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.instruction = None
+        """ Instructions or additional information about the oral supplement.
+        Type `str`. """
+        
+        self.productName = None
+        """ Product or brand name of the nutritional supplement.
+        Type `str`. """
+        
+        self.quantity = None
+        """ Amount of the nutritional supplement.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.schedule = None
+        """ Scheduled frequency of supplement.
+        List of `Timing` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type of supplement product requested.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(NutritionOrderSupplement, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(NutritionOrderSupplement, self).elementProperties()
+        js.extend([
+            ("instruction", "instruction", str, False, None, False),
+            ("productName", "productName", str, False, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("schedule", "schedule", timing.Timing, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/nutritionorder_tests.py b/fhirclient/models/nutritionorder_tests.py
new file mode 100644
index 0000000..c3ba0d2
--- /dev/null
+++ b/fhirclient/models/nutritionorder_tests.py
@@ -0,0 +1,494 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import nutritionorder
+from .fhirdate import FHIRDate
+
+
+class NutritionOrderTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("NutritionOrder", js["resourceType"])
+        return nutritionorder.NutritionOrder(js)
+    
+    def testNutritionOrder1(self):
+        inst = self.instantiate_from("nutritionorder-example-cardiacdiet.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NutritionOrder instance")
+        self.implNutritionOrder1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NutritionOrder", js["resourceType"])
+        inst2 = nutritionorder.NutritionOrder(js)
+        self.implNutritionOrder1(inst2)
+    
+    def implNutritionOrder1(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.dateTime.as_json(), "2014-09-17")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].code, "227493005")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].display, "Cashew Nut")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].version, "20140730")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].code, "dairy-free")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].system, "http://hl7.org/fhir/diet")
+        self.assertEqual(inst.id, "cardiacdiet")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealthhospital.org/nutrition-requests")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.oralDiet.instruction, "Starting on 2/10 breakfast, maximum 400 ml fluids per meal")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.code, "g")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.unit, "grams")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.value, 2)
+        self.assertEqual(inst.oralDiet.nutrient[0].modifier.coding[0].code, "39972003")
+        self.assertEqual(inst.oralDiet.nutrient[0].modifier.coding[0].display, "Sodium")
+        self.assertEqual(inst.oralDiet.nutrient[0].modifier.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.nutrient[1].amount.code, "mL")
+        self.assertEqual(inst.oralDiet.nutrient[1].amount.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.oralDiet.nutrient[1].amount.unit, "milliliter")
+        self.assertEqual(inst.oralDiet.nutrient[1].amount.value, 1500)
+        self.assertEqual(inst.oralDiet.nutrient[1].modifier.coding[0].code, "33463005")
+        self.assertEqual(inst.oralDiet.nutrient[1].modifier.coding[0].display, "Fluid")
+        self.assertEqual(inst.oralDiet.nutrient[1].modifier.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].code, "386619000")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].display, "Low sodium diet")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].code, "1040")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].display, "Low Sodium Diet")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].system, "http://goodhealthhospital.org/diet-type-codes")
+        self.assertEqual(inst.oralDiet.type[0].text, "Low sodium diet")
+        self.assertEqual(inst.oralDiet.type[1].coding[0].code, "226208002")
+        self.assertEqual(inst.oralDiet.type[1].coding[0].display, "Fluid restricted diet")
+        self.assertEqual(inst.oralDiet.type[1].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.type[1].coding[1].code, "1040")
+        self.assertEqual(inst.oralDiet.type[1].coding[1].display, "Fluid restricted diet")
+        self.assertEqual(inst.oralDiet.type[1].coding[1].system, "http://goodhealthhospital.org/diet-type-codes")
+        self.assertEqual(inst.oralDiet.type[1].text, "Fluid restricted diet")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testNutritionOrder2(self):
+        inst = self.instantiate_from("nutritionorder-example-diabeticdiet.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NutritionOrder instance")
+        self.implNutritionOrder2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NutritionOrder", js["resourceType"])
+        inst2 = nutritionorder.NutritionOrder(js)
+        self.implNutritionOrder2(inst2)
+    
+    def implNutritionOrder2(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.dateTime.as_json(), "2014-09-17")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].code, "227493005")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].display, "Cashew Nut")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].version, "20140730")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].code, "dairy-free")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].system, "http://hl7.org/fhir/diet")
+        self.assertEqual(inst.id, "diabeticdiet")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealthhospital.org/nutrition-requests")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.code, "g")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.unit, "grams")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.value, 75)
+        self.assertEqual(inst.oralDiet.nutrient[0].modifier.coding[0].code, "2331003")
+        self.assertEqual(inst.oralDiet.nutrient[0].modifier.coding[0].display, "Carbohydrate")
+        self.assertEqual(inst.oralDiet.nutrient[0].modifier.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.boundsPeriod.start.date, FHIRDate("2015-02-10").date)
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.boundsPeriod.start.as_json(), "2015-02-10")
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.frequency, 3)
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.period, 1)
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.periodUnit, "d")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].code, "160670007")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].display, "Diabetic diet")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].code, "1030")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].display, "DD - Diabetic diet")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].system, "http://goodhealthhospital.org/diet-type-codes")
+        self.assertEqual(inst.oralDiet.type[0].text, "DD - Diabetic diet")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testNutritionOrder3(self):
+        inst = self.instantiate_from("nutritionorder-example-diabeticsupplement.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NutritionOrder instance")
+        self.implNutritionOrder3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NutritionOrder", js["resourceType"])
+        inst2 = nutritionorder.NutritionOrder(js)
+        self.implNutritionOrder3(inst2)
+    
+    def implNutritionOrder3(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.dateTime.as_json(), "2014-09-17")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].code, "227493005")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].display, "Cashew Nut")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].version, "20140730")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].code, "kosher")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].system, "http://hl7.org/fhir/diet")
+        self.assertEqual(inst.id, "diabeticsupplement")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealthhospital.org/nutrition-requests")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.supplement[0].productName, "Glucerna")
+        self.assertEqual(inst.supplement[0].quantity.unit, "8 oz bottle")
+        self.assertEqual(inst.supplement[0].quantity.value, 1)
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.boundsPeriod.start.date, FHIRDate("2015-02-10T15:00:00Z").date)
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.boundsPeriod.start.as_json(), "2015-02-10T15:00:00Z")
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.frequency, 1)
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.period, 24)
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.periodUnit, "h")
+        self.assertEqual(inst.supplement[0].schedule[1].repeat.duration, 1)
+        self.assertEqual(inst.supplement[0].schedule[1].repeat.durationUnit, "h")
+        self.assertEqual(inst.supplement[0].schedule[1].repeat.when[0], "HS")
+        self.assertEqual(inst.supplement[0].type.coding[0].code, "443051000124104")
+        self.assertEqual(inst.supplement[0].type.coding[0].display, "Adult diabetes specialty formula")
+        self.assertEqual(inst.supplement[0].type.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.supplement[0].type.coding[1].code, "1010")
+        self.assertEqual(inst.supplement[0].type.coding[1].display, "Adult diabetic formula")
+        self.assertEqual(inst.supplement[0].type.coding[1].system, "http://goodhealthhospital.org/supplement-type-codes")
+        self.assertEqual(inst.supplement[0].type.text, "Adult diabetic formula")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testNutritionOrder4(self):
+        inst = self.instantiate_from("nutritionorder-example-energysupplement.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NutritionOrder instance")
+        self.implNutritionOrder4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NutritionOrder", js["resourceType"])
+        inst2 = nutritionorder.NutritionOrder(js)
+        self.implNutritionOrder4(inst2)
+    
+    def implNutritionOrder4(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.dateTime.as_json(), "2014-09-17")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].code, "227493005")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].display, "Cashew Nut")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].version, "20140730")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].code, "kosher")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].system, "http://hl7.org/fhir/diet")
+        self.assertEqual(inst.id, "energysupplement")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealthhospital.org/nutrition-requests")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.supplement[0].productName, "Ensure")
+        self.assertEqual(inst.supplement[0].quantity.unit, "8 oz can")
+        self.assertEqual(inst.supplement[0].quantity.value, 1)
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.boundsPeriod.start.date, FHIRDate("2015-02-10").date)
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.boundsPeriod.start.as_json(), "2015-02-10")
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.frequency, 3)
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.period, 1)
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.periodUnit, "d")
+        self.assertEqual(inst.supplement[0].type.coding[0].code, "442971000124100")
+        self.assertEqual(inst.supplement[0].type.coding[0].display, "Adult high energy formula")
+        self.assertEqual(inst.supplement[0].type.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.supplement[0].type.coding[1].code, "1010")
+        self.assertEqual(inst.supplement[0].type.coding[1].display, "Adult high energy drink")
+        self.assertEqual(inst.supplement[0].type.coding[1].system, "http://goodhealthhospital.org/supplement-type-codes")
+        self.assertEqual(inst.supplement[0].type.text, "Adult high energy drink")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testNutritionOrder5(self):
+        inst = self.instantiate_from("nutritionorder-example-enteralbolus.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NutritionOrder instance")
+        self.implNutritionOrder5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NutritionOrder", js["resourceType"])
+        inst2 = nutritionorder.NutritionOrder(js)
+        self.implNutritionOrder5(inst2)
+    
+    def implNutritionOrder5(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.dateTime.as_json(), "2014-09-17")
+        self.assertEqual(inst.enteralFormula.additiveProductName, "Acme Lipid Additive")
+        self.assertEqual(inst.enteralFormula.additiveType.coding[0].code, "lipid")
+        self.assertEqual(inst.enteralFormula.additiveType.coding[0].display, "Lipid")
+        self.assertEqual(inst.enteralFormula.additiveType.coding[0].system, "http://hl7.org/fhir/entformula-additive")
+        self.assertEqual(inst.enteralFormula.administrationInstruction, "240 mls every 4hrs ")
+        self.assertEqual(inst.enteralFormula.administration[0].quantity.code, "mL")
+        self.assertEqual(inst.enteralFormula.administration[0].quantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.administration[0].quantity.unit, "milliliters")
+        self.assertEqual(inst.enteralFormula.administration[0].quantity.value, 240)
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.boundsPeriod.start.date, FHIRDate("2014-09-17T16:00:00Z").date)
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.boundsPeriod.start.as_json(), "2014-09-17T16:00:00Z")
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.frequency, 1)
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.period, 4)
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.periodUnit, "h")
+        self.assertEqual(inst.enteralFormula.baseFormulaProductName, "Acme High Protein Formula")
+        self.assertEqual(inst.enteralFormula.baseFormulaType.coding[0].code, "659311000124118")
+        self.assertEqual(inst.enteralFormula.baseFormulaType.coding[0].display, "Adult high protein formula")
+        self.assertEqual(inst.enteralFormula.baseFormulaType.coding[0].system, "http://usextension/snomed.info/sct")
+        self.assertEqual(inst.enteralFormula.caloricDensity.code, "cal/mL")
+        self.assertEqual(inst.enteralFormula.caloricDensity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.caloricDensity.unit, "calories per milliliter")
+        self.assertEqual(inst.enteralFormula.caloricDensity.value, 1.5)
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.code, "mL/d")
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.unit, "milliliter/day")
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.value, 1440)
+        self.assertEqual(inst.enteralFormula.routeofAdministration.coding[0].code, "GT")
+        self.assertEqual(inst.enteralFormula.routeofAdministration.coding[0].display, "Instillation, gastrostomy tube")
+        self.assertEqual(inst.enteralFormula.routeofAdministration.coding[0].system, "http://hl7.org/fhir/v3/RouteOfAdministration")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].code, "227493005")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].display, "Cashew Nut")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].version, "20140730")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].code, "dairy-free")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].system, "http://hl7.org/fhir/diet")
+        self.assertEqual(inst.id, "enteralbolus")
+        self.assertEqual(inst.identifier[0].system, "http://www.acme.org/nutritionorders")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testNutritionOrder6(self):
+        inst = self.instantiate_from("nutritionorder-example-enteralcontinuous.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NutritionOrder instance")
+        self.implNutritionOrder6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NutritionOrder", js["resourceType"])
+        inst2 = nutritionorder.NutritionOrder(js)
+        self.implNutritionOrder6(inst2)
+    
+    def implNutritionOrder6(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.dateTime.as_json(), "2014-09-17")
+        self.assertEqual(inst.enteralFormula.administrationInstruction, "Hold feedings from 7 pm to 7 am. Add MCT oil to increase calories from 1.0 cal/mL to 1.5 cal/mL")
+        self.assertEqual(inst.enteralFormula.administration[0].rateQuantity.code, "mL/h")
+        self.assertEqual(inst.enteralFormula.administration[0].rateQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.administration[0].rateQuantity.unit, "ml/hr")
+        self.assertEqual(inst.enteralFormula.administration[0].rateQuantity.value, 60)
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.boundsPeriod.start.date, FHIRDate("2014-09-17T07:00:00Z").date)
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.boundsPeriod.start.as_json(), "2014-09-17T07:00:00Z")
+        self.assertEqual(inst.enteralFormula.administration[1].rateQuantity.code, "mL/h")
+        self.assertEqual(inst.enteralFormula.administration[1].rateQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.administration[1].rateQuantity.unit, "ml/hr")
+        self.assertEqual(inst.enteralFormula.administration[1].rateQuantity.value, 80)
+        self.assertEqual(inst.enteralFormula.administration[1].schedule.repeat.boundsPeriod.start.date, FHIRDate("2014-09-17T11:00:00Z").date)
+        self.assertEqual(inst.enteralFormula.administration[1].schedule.repeat.boundsPeriod.start.as_json(), "2014-09-17T11:00:00Z")
+        self.assertEqual(inst.enteralFormula.administration[2].rateQuantity.code, "mL/h")
+        self.assertEqual(inst.enteralFormula.administration[2].rateQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.administration[2].rateQuantity.unit, "ml/hr")
+        self.assertEqual(inst.enteralFormula.administration[2].rateQuantity.value, 100)
+        self.assertEqual(inst.enteralFormula.administration[2].schedule.repeat.boundsPeriod.start.date, FHIRDate("2014-09-17T15:00:00Z").date)
+        self.assertEqual(inst.enteralFormula.administration[2].schedule.repeat.boundsPeriod.start.as_json(), "2014-09-17T15:00:00Z")
+        self.assertEqual(inst.enteralFormula.baseFormulaProductName, " Acme Diabetes Formula")
+        self.assertEqual(inst.enteralFormula.baseFormulaType.coding[0].code, "6547210000124112")
+        self.assertEqual(inst.enteralFormula.baseFormulaType.coding[0].display, "Diabetic specialty enteral formula")
+        self.assertEqual(inst.enteralFormula.baseFormulaType.coding[0].system, "http://snomed/sct")
+        self.assertEqual(inst.enteralFormula.caloricDensity.code, "cal/mL")
+        self.assertEqual(inst.enteralFormula.caloricDensity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.caloricDensity.unit, "calories per milliliter")
+        self.assertEqual(inst.enteralFormula.caloricDensity.value, 1)
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.code, "mL/d")
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.unit, "milliliter/day")
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.value, 880)
+        self.assertEqual(inst.enteralFormula.routeofAdministration.coding[0].code, "NGT")
+        self.assertEqual(inst.enteralFormula.routeofAdministration.coding[0].display, "Instillation, nasogastric tube")
+        self.assertEqual(inst.enteralFormula.routeofAdministration.coding[0].system, "http://hl7.org/fhir/v3/RouteOfAdministration")
+        self.assertEqual(inst.id, "enteralcontinuous")
+        self.assertEqual(inst.identifier[0].system, "http://www.acme.org/nutritionorders")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testNutritionOrder7(self):
+        inst = self.instantiate_from("nutritionorder-example-fiberrestricteddiet.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NutritionOrder instance")
+        self.implNutritionOrder7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NutritionOrder", js["resourceType"])
+        inst2 = nutritionorder.NutritionOrder(js)
+        self.implNutritionOrder7(inst2)
+    
+    def implNutritionOrder7(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.dateTime.as_json(), "2014-09-17")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].code, "227493005")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].display, "Cashew Nut")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.excludeFoodModifier[0].coding[0].version, "20140730")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].code, "dairy-free")
+        self.assertEqual(inst.foodPreferenceModifier[0].coding[0].system, "http://hl7.org/fhir/diet")
+        self.assertEqual(inst.id, "fiberrestricteddiet")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealthhospital.org/nutrition-requests")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.code, "g")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.unit, "grams")
+        self.assertEqual(inst.oralDiet.nutrient[0].amount.value, 50)
+        self.assertEqual(inst.oralDiet.nutrient[0].modifier.coding[0].code, "256674009")
+        self.assertEqual(inst.oralDiet.nutrient[0].modifier.coding[0].display, "Fat")
+        self.assertEqual(inst.oralDiet.nutrient[0].modifier.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.boundsPeriod.start.date, FHIRDate("2015-02-10").date)
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.boundsPeriod.start.as_json(), "2015-02-10")
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.frequency, 3)
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.period, 1)
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.periodUnit, "d")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].code, "15108003")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].display, "Restricted fiber diet")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].code, "1000")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].display, "Fiber restricted")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].system, "http://goodhealthhospital.org/diet-type-codes")
+        self.assertEqual(inst.oralDiet.type[0].text, "Fiber restricted diet")
+        self.assertEqual(inst.oralDiet.type[1].coding[0].code, "16208003")
+        self.assertEqual(inst.oralDiet.type[1].coding[0].display, "Low fat diet")
+        self.assertEqual(inst.oralDiet.type[1].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.type[1].coding[1].code, "1100")
+        self.assertEqual(inst.oralDiet.type[1].coding[1].display, "Low Fat")
+        self.assertEqual(inst.oralDiet.type[1].coding[1].system, "http://goodhealthhospital.org/diet-type-codes")
+        self.assertEqual(inst.oralDiet.type[1].text, "Low fat diet")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testNutritionOrder8(self):
+        inst = self.instantiate_from("nutritionorder-example-infantenteral.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NutritionOrder instance")
+        self.implNutritionOrder8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NutritionOrder", js["resourceType"])
+        inst2 = nutritionorder.NutritionOrder(js)
+        self.implNutritionOrder8(inst2)
+    
+    def implNutritionOrder8(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.dateTime.as_json(), "2014-09-17")
+        self.assertEqual(inst.enteralFormula.additiveProductName, "Acme High Carbohydrate Additive")
+        self.assertEqual(inst.enteralFormula.additiveType.coding[0].code, "carbohydrate")
+        self.assertEqual(inst.enteralFormula.additiveType.coding[0].display, "Carbohydrate")
+        self.assertEqual(inst.enteralFormula.additiveType.coding[0].system, "http://hl7.org/fhir/entformula-additive")
+        self.assertEqual(inst.enteralFormula.administrationInstruction, "Add high calorie high carbohydrate additive to increase cal/oz from 24 cal/oz to 27 cal/oz.")
+        self.assertEqual(inst.enteralFormula.administration[0].quantity.code, "[foz_us]")
+        self.assertEqual(inst.enteralFormula.administration[0].quantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.administration[0].quantity.unit, "ounces")
+        self.assertEqual(inst.enteralFormula.administration[0].quantity.value, 4)
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.boundsPeriod.start.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.boundsPeriod.start.as_json(), "2014-09-17")
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.frequency, 1)
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.period, 3)
+        self.assertEqual(inst.enteralFormula.administration[0].schedule.repeat.periodUnit, "h")
+        self.assertEqual(inst.enteralFormula.baseFormulaProductName, "Acme Infant Formula + Iron")
+        self.assertEqual(inst.enteralFormula.baseFormulaType.coding[0].code, "412414007")
+        self.assertEqual(inst.enteralFormula.baseFormulaType.coding[0].display, "infant formula + iron")
+        self.assertEqual(inst.enteralFormula.baseFormulaType.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.enteralFormula.caloricDensity.code, "cal/[foz_us]")
+        self.assertEqual(inst.enteralFormula.caloricDensity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.caloricDensity.unit, "calories per ounce")
+        self.assertEqual(inst.enteralFormula.caloricDensity.value, 20)
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.code, "[foz_us]")
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.unit, "ounces")
+        self.assertEqual(inst.enteralFormula.maxVolumeToDeliver.value, 32)
+        self.assertEqual(inst.enteralFormula.routeofAdministration.coding[0].code, "PO")
+        self.assertEqual(inst.enteralFormula.routeofAdministration.coding[0].display, "Swallow, oral")
+        self.assertEqual(inst.enteralFormula.routeofAdministration.coding[0].system, "http://hl7.org/fhir/v3/RouteOfAdministration")
+        self.assertTrue(inst.enteralFormula.routeofAdministration.coding[0].userSelected)
+        self.assertEqual(inst.id, "infantenteral")
+        self.assertEqual(inst.identifier[0].system, "http://www.acme.org/nutritionorders")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testNutritionOrder9(self):
+        inst = self.instantiate_from("nutritionorder-example-proteinsupplement.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NutritionOrder instance")
+        self.implNutritionOrder9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NutritionOrder", js["resourceType"])
+        inst2 = nutritionorder.NutritionOrder(js)
+        self.implNutritionOrder9(inst2)
+    
+    def implNutritionOrder9(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.dateTime.as_json(), "2014-09-17")
+        self.assertEqual(inst.id, "proteinsupplement")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealthhospital.org/nutrition-requests")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.supplement[0].instruction, "Beneprotein 1 scoop TID with meal.starting on  2015-02-10")
+        self.assertEqual(inst.supplement[0].productName, "Beneprotein")
+        self.assertEqual(inst.supplement[0].quantity.code, "{scoop}")
+        self.assertEqual(inst.supplement[0].quantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.supplement[0].quantity.unit, "scoop")
+        self.assertEqual(inst.supplement[0].quantity.value, 1)
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.boundsPeriod.start.date, FHIRDate("2015-02-10").date)
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.boundsPeriod.start.as_json(), "2015-02-10")
+        self.assertEqual(inst.supplement[0].schedule[0].repeat.when[0], "C")
+        self.assertEqual(inst.supplement[0].type.coding[0].code, "442991000124104")
+        self.assertEqual(inst.supplement[0].type.coding[0].display, "Adult high protein formula")
+        self.assertEqual(inst.supplement[0].type.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.supplement[0].type.coding[1].code, "1000")
+        self.assertEqual(inst.supplement[0].type.coding[1].display, "High Protein Powder")
+        self.assertEqual(inst.supplement[0].type.coding[1].system, "http://goodhealthhospital.org/supplement-type-codes")
+        self.assertEqual(inst.supplement[0].type.text, "High Protein Powder")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testNutritionOrder10(self):
+        inst = self.instantiate_from("nutritionorder-example-pureeddiet-simple.json")
+        self.assertIsNotNone(inst, "Must have instantiated a NutritionOrder instance")
+        self.implNutritionOrder10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("NutritionOrder", js["resourceType"])
+        inst2 = nutritionorder.NutritionOrder(js)
+        self.implNutritionOrder10(inst2)
+    
+    def implNutritionOrder10(self, inst):
+        self.assertEqual(inst.dateTime.date, FHIRDate("2014-09-17").date)
+        self.assertEqual(inst.dateTime.as_json(), "2014-09-17")
+        self.assertEqual(inst.id, "pureeddiet-simple")
+        self.assertEqual(inst.identifier[0].system, "http://goodhealthhospital.org/nutrition-requests")
+        self.assertEqual(inst.identifier[0].value, "123")
+        self.assertEqual(inst.oralDiet.fluidConsistencyType[0].coding[0].code, "439021000124105")
+        self.assertEqual(inst.oralDiet.fluidConsistencyType[0].coding[0].display, "Dietary liquid consistency - nectar thick liquid")
+        self.assertEqual(inst.oralDiet.fluidConsistencyType[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.fluidConsistencyType[0].text, "Nectar thick liquids")
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.boundsPeriod.start.date, FHIRDate("2015-02-10").date)
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.boundsPeriod.start.as_json(), "2015-02-10")
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.frequency, 3)
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.period, 1)
+        self.assertEqual(inst.oralDiet.schedule[0].repeat.periodUnit, "d")
+        self.assertEqual(inst.oralDiet.texture[0].modifier.coding[0].code, "228055009")
+        self.assertEqual(inst.oralDiet.texture[0].modifier.coding[0].display, "Liquidized food")
+        self.assertEqual(inst.oralDiet.texture[0].modifier.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.texture[0].modifier.text, "Pureed")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].code, "226211001")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].display, "Pureed diet")
+        self.assertEqual(inst.oralDiet.type[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].code, "1010")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].display, "Pureed diet")
+        self.assertEqual(inst.oralDiet.type[0].coding[1].system, "http://goodhealthhospital.org/diet-type-codes")
+        self.assertEqual(inst.oralDiet.type[0].text, "Pureed diet")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.supplement[0].instruction, "Ensure Pudding at breakfast, lunch, supper")
+        self.assertEqual(inst.supplement[0].productName, "Ensure Pudding 4 oz container")
+        self.assertEqual(inst.supplement[0].type.coding[0].code, "442971000124100")
+        self.assertEqual(inst.supplement[0].type.coding[0].display, "Adult high energy formula")
+        self.assertEqual(inst.supplement[0].type.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.supplement[0].type.coding[1].code, "1040")
+        self.assertEqual(inst.supplement[0].type.coding[1].display, "Adult high energy pudding")
+        self.assertEqual(inst.supplement[0].type.coding[1].system, "http://goodhealthhospital.org/supplement-type-codes")
+        self.assertEqual(inst.supplement[0].type.text, "Adult high energy pudding")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/observation.py b/fhirclient/models/observation.py
new file mode 100644
index 0000000..f963508
--- /dev/null
+++ b/fhirclient/models/observation.py
@@ -0,0 +1,430 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Observation) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Observation(domainresource.DomainResource):
+    """ Measurements and simple assertions.
+    
+    Measurements and simple assertions made about a patient, device or other
+    subject.
+    """
+    
+    resource_type = "Observation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.basedOn = None
+        """ Fulfills plan, proposal or order.
+        List of `FHIRReference` items referencing `CarePlan, DeviceRequest, ImmunizationRecommendation, MedicationRequest, NutritionOrder, ProcedureRequest, ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.bodySite = None
+        """ Observed body part.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Classification of  type of observation.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Type of observation (code / type).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.comment = None
+        """ Comments about result.
+        Type `str`. """
+        
+        self.component = None
+        """ Component results.
+        List of `ObservationComponent` items (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Healthcare event during which this observation is made.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.dataAbsentReason = None
+        """ Why the result is missing.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.device = None
+        """ (Measurement) Device.
+        Type `FHIRReference` referencing `Device, DeviceMetric` (represented as `dict` in JSON). """
+        
+        self.effectiveDateTime = None
+        """ Clinically relevant time/time-period for observation.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.effectivePeriod = None
+        """ Clinically relevant time/time-period for observation.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier for observation.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.interpretation = None
+        """ High, low, normal, etc..
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.issued = None
+        """ Date/Time this was made available.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.method = None
+        """ How it was done.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.performer = None
+        """ Who is responsible for the observation.
+        List of `FHIRReference` items referencing `Practitioner, Organization, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.referenceRange = None
+        """ Provides guide for interpretation.
+        List of `ObservationReferenceRange` items (represented as `dict` in JSON). """
+        
+        self.related = None
+        """ Resource related to this observation.
+        List of `ObservationRelated` items (represented as `dict` in JSON). """
+        
+        self.specimen = None
+        """ Specimen used for this observation.
+        Type `FHIRReference` referencing `Specimen` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ registered | preliminary | final | amended +.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who and/or what this is about.
+        Type `FHIRReference` referencing `Patient, Group, Device, Location` (represented as `dict` in JSON). """
+        
+        self.valueAttachment = None
+        """ Actual result.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.valueBoolean = None
+        """ Actual result.
+        Type `bool`. """
+        
+        self.valueCodeableConcept = None
+        """ Actual result.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueDateTime = None
+        """ Actual result.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valuePeriod = None
+        """ Actual result.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.valueQuantity = None
+        """ Actual result.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueRange = None
+        """ Actual result.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.valueRatio = None
+        """ Actual result.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.valueSampledData = None
+        """ Actual result.
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.valueString = None
+        """ Actual result.
+        Type `str`. """
+        
+        self.valueTime = None
+        """ Actual result.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(Observation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Observation, self).elementProperties()
+        js.extend([
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("bodySite", "bodySite", codeableconcept.CodeableConcept, False, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("comment", "comment", str, False, None, False),
+            ("component", "component", ObservationComponent, True, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("dataAbsentReason", "dataAbsentReason", codeableconcept.CodeableConcept, False, None, False),
+            ("device", "device", fhirreference.FHIRReference, False, None, False),
+            ("effectiveDateTime", "effectiveDateTime", fhirdate.FHIRDate, False, "effective", False),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, "effective", False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("interpretation", "interpretation", codeableconcept.CodeableConcept, False, None, False),
+            ("issued", "issued", fhirdate.FHIRDate, False, None, False),
+            ("method", "method", codeableconcept.CodeableConcept, False, None, False),
+            ("performer", "performer", fhirreference.FHIRReference, True, None, False),
+            ("referenceRange", "referenceRange", ObservationReferenceRange, True, None, False),
+            ("related", "related", ObservationRelated, True, None, False),
+            ("specimen", "specimen", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("valueAttachment", "valueAttachment", attachment.Attachment, False, "value", False),
+            ("valueBoolean", "valueBoolean", bool, False, "value", False),
+            ("valueCodeableConcept", "valueCodeableConcept", codeableconcept.CodeableConcept, False, "value", False),
+            ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", False),
+            ("valuePeriod", "valuePeriod", period.Period, False, "value", False),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", False),
+            ("valueRange", "valueRange", range.Range, False, "value", False),
+            ("valueRatio", "valueRatio", ratio.Ratio, False, "value", False),
+            ("valueSampledData", "valueSampledData", sampleddata.SampledData, False, "value", False),
+            ("valueString", "valueString", str, False, "value", False),
+            ("valueTime", "valueTime", fhirdate.FHIRDate, False, "value", False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ObservationComponent(backboneelement.BackboneElement):
+    """ Component results.
+    
+    Some observations have multiple component observations.  These component
+    observations are expressed as separate code value pairs that share the same
+    attributes.  Examples include systolic and diastolic component observations
+    for blood pressure measurement and multiple component observations for
+    genetics observations.
+    """
+    
+    resource_type = "ObservationComponent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Type of component observation (code / type).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.dataAbsentReason = None
+        """ Why the component result is missing.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.interpretation = None
+        """ High, low, normal, etc..
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.referenceRange = None
+        """ Provides guide for interpretation of component result.
+        List of `ObservationReferenceRange` items (represented as `dict` in JSON). """
+        
+        self.valueAttachment = None
+        """ Actual component result.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.valueCodeableConcept = None
+        """ Actual component result.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueDateTime = None
+        """ Actual component result.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valuePeriod = None
+        """ Actual component result.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.valueQuantity = None
+        """ Actual component result.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueRange = None
+        """ Actual component result.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.valueRatio = None
+        """ Actual component result.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.valueSampledData = None
+        """ Actual component result.
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.valueString = None
+        """ Actual component result.
+        Type `str`. """
+        
+        self.valueTime = None
+        """ Actual component result.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(ObservationComponent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ObservationComponent, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("dataAbsentReason", "dataAbsentReason", codeableconcept.CodeableConcept, False, None, False),
+            ("interpretation", "interpretation", codeableconcept.CodeableConcept, False, None, False),
+            ("referenceRange", "referenceRange", ObservationReferenceRange, True, None, False),
+            ("valueAttachment", "valueAttachment", attachment.Attachment, False, "value", False),
+            ("valueCodeableConcept", "valueCodeableConcept", codeableconcept.CodeableConcept, False, "value", False),
+            ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", False),
+            ("valuePeriod", "valuePeriod", period.Period, False, "value", False),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", False),
+            ("valueRange", "valueRange", range.Range, False, "value", False),
+            ("valueRatio", "valueRatio", ratio.Ratio, False, "value", False),
+            ("valueSampledData", "valueSampledData", sampleddata.SampledData, False, "value", False),
+            ("valueString", "valueString", str, False, "value", False),
+            ("valueTime", "valueTime", fhirdate.FHIRDate, False, "value", False),
+        ])
+        return js
+
+
+class ObservationReferenceRange(backboneelement.BackboneElement):
+    """ Provides guide for interpretation.
+    
+    Guidance on how to interpret the value by comparison to a normal or
+    recommended range.
+    """
+    
+    resource_type = "ObservationReferenceRange"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.age = None
+        """ Applicable age range, if relevant.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.appliesTo = None
+        """ Reference range population.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.high = None
+        """ High Range, if relevant.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.low = None
+        """ Low Range, if relevant.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.text = None
+        """ Text based reference range in an observation.
+        Type `str`. """
+        
+        self.type = None
+        """ Reference range qualifier.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ObservationReferenceRange, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ObservationReferenceRange, self).elementProperties()
+        js.extend([
+            ("age", "age", range.Range, False, None, False),
+            ("appliesTo", "appliesTo", codeableconcept.CodeableConcept, True, None, False),
+            ("high", "high", quantity.Quantity, False, None, False),
+            ("low", "low", quantity.Quantity, False, None, False),
+            ("text", "text", str, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class ObservationRelated(backboneelement.BackboneElement):
+    """ Resource related to this observation.
+    
+    A  reference to another resource (usually another Observation) whose
+    relationship is defined by the relationship type code.
+    """
+    
+    resource_type = "ObservationRelated"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.target = None
+        """ Resource that is related to this one.
+        Type `FHIRReference` referencing `Observation, QuestionnaireResponse, Sequence` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ has-member | derived-from | sequel-to | replaces | qualified-by |
+        interfered-by.
+        Type `str`. """
+        
+        super(ObservationRelated, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ObservationRelated, self).elementProperties()
+        js.extend([
+            ("target", "target", fhirreference.FHIRReference, False, None, True),
+            ("type", "type", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
+try:
+    from . import sampleddata
+except ImportError:
+    sampleddata = sys.modules[__package__ + '.sampleddata']
diff --git a/fhirclient/models/observation_tests.py b/fhirclient/models/observation_tests.py
new file mode 100644
index 0000000..8fe6ac1
--- /dev/null
+++ b/fhirclient/models/observation_tests.py
@@ -0,0 +1,746 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import observation
+from .fhirdate import FHIRDate
+
+
+class ObservationTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Observation", js["resourceType"])
+        return observation.Observation(js)
+    
+    def testObservation1(self):
+        inst = self.instantiate_from("observation-example-10minute-apgar-score.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Observation instance")
+        self.implObservation1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Observation", js["resourceType"])
+        inst2 = observation.Observation(js)
+        self.implObservation1(inst2)
+    
+    def implObservation1(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "survey")
+        self.assertEqual(inst.category[0].coding[0].display, "Survey")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/observation-category")
+        self.assertEqual(inst.category[0].text, "Survey")
+        self.assertEqual(inst.code.coding[0].code, "9271-8")
+        self.assertEqual(inst.code.coding[0].display, "10 minute Apgar Score")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.coding[1].code, "169922007")
+        self.assertEqual(inst.code.coding[1].display, "Apgar at 10 minutes")
+        self.assertEqual(inst.code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "10 minute Apgar Score")
+        self.assertEqual(inst.component[0].code.coding[0].code, "32401-2")
+        self.assertEqual(inst.component[0].code.coding[0].display, "10 minute Apgar Color")
+        self.assertEqual(inst.component[0].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[0].code.coding[1].code, "249227004")
+        self.assertEqual(inst.component[0].code.coding[1].display, "Apgar color score")
+        self.assertEqual(inst.component[0].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[0].code.text, "Apgar color score")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].code, "LA6724-4")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].display, "Good color all over")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarcolor")
+        self.assertEqual(inst.component[0].valueCodeableConcept.text, "2. Good color all over")
+        self.assertEqual(inst.component[1].code.coding[0].code, "32402-0")
+        self.assertEqual(inst.component[1].code.coding[0].display, "10 minute Apgar Heart Rate")
+        self.assertEqual(inst.component[1].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[1].code.coding[1].code, "249223000")
+        self.assertEqual(inst.component[1].code.coding[1].display, "Apgar heart rate score")
+        self.assertEqual(inst.component[1].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[1].code.text, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].code, "LA6718-6")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].display, "At least 100 beats per minute")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarheartrate")
+        self.assertEqual(inst.component[1].valueCodeableConcept.text, "2. At least 100 beats per minute")
+        self.assertEqual(inst.component[2].code.coding[0].code, "32404-6")
+        self.assertEqual(inst.component[2].code.coding[0].display, "10 minute Apgar Reflex Irritability")
+        self.assertEqual(inst.component[2].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[2].code.coding[1].code, "249226008")
+        self.assertEqual(inst.component[2].code.coding[1].display, "Apgar response to stimulus score")
+        self.assertEqual(inst.component[2].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[2].code.text, "Apgar response to stimulus score")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].code, "LA6721-0")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].display, "Grimace and pulling away, cough, or sneeze during suctioning")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarreflexirritability")
+        self.assertEqual(inst.component[2].valueCodeableConcept.text, "2. Grimace and pulling away, cough, or sneeze during suctioning")
+        self.assertEqual(inst.component[3].code.coding[0].code, "32403-8")
+        self.assertEqual(inst.component[3].code.coding[0].display, "10 minute Apgar Muscle Tone")
+        self.assertEqual(inst.component[3].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[3].code.coding[1].code, "249225007")
+        self.assertEqual(inst.component[3].code.coding[1].display, "Apgar muscle tone score")
+        self.assertEqual(inst.component[3].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[3].code.text, "Apgar muscle tone score")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].code, "LA6715-2")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].display, "Active motion ")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarmuscletone")
+        self.assertEqual(inst.component[3].valueCodeableConcept.text, "2. Active motion")
+        self.assertEqual(inst.component[4].code.coding[0].code, "32405-3")
+        self.assertEqual(inst.component[4].code.coding[0].display, "10 minute Apgar Respiratory effort")
+        self.assertEqual(inst.component[4].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[4].code.coding[1].code, "249224006")
+        self.assertEqual(inst.component[4].code.coding[1].display, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[4].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[4].code.text, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].code, "LA6727-7")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].display, "Good, strong cry; normal rate and effort of breathing    ")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarrespiratoryeffort")
+        self.assertEqual(inst.component[4].valueCodeableConcept.text, "2. Good, strong cry; normal rate and effort of breathing")
+        self.assertEqual(inst.contained[0].id, "newborn")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2016-05-18T22:33:22Z").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2016-05-18T22:33:22Z")
+        self.assertEqual(inst.id, "10minute-apgar-score")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.valueQuantity.code, "{score}")
+        self.assertEqual(inst.valueQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.valueQuantity.value, 10)
+    
+    def testObservation2(self):
+        inst = self.instantiate_from("observation-example-1minute-apgar-score.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Observation instance")
+        self.implObservation2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Observation", js["resourceType"])
+        inst2 = observation.Observation(js)
+        self.implObservation2(inst2)
+    
+    def implObservation2(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "survey")
+        self.assertEqual(inst.category[0].coding[0].display, "Survey")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/observation-category")
+        self.assertEqual(inst.category[0].text, "Survey")
+        self.assertEqual(inst.code.coding[0].code, "9272-6")
+        self.assertEqual(inst.code.coding[0].display, "1 minute Apgar Score")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.coding[1].code, "169895004")
+        self.assertEqual(inst.code.coding[1].display, "Apgar at 1 minute")
+        self.assertEqual(inst.code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "1 minute Apgar Score")
+        self.assertEqual(inst.component[0].code.coding[0].code, "32406-1")
+        self.assertEqual(inst.component[0].code.coding[0].display, "1 minute Apgar Color")
+        self.assertEqual(inst.component[0].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[0].code.coding[1].code, "249227004")
+        self.assertEqual(inst.component[0].code.coding[1].display, "Apgar color score")
+        self.assertEqual(inst.component[0].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[0].code.text, "Apgar color score")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].code, "LA6722-8")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].display, "The baby's whole body is completely bluish-gray or pale")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].extension[0].valueDecimal, 0)
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[1].code, "0")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarcolor")
+        self.assertEqual(inst.component[0].valueCodeableConcept.text, "0. The baby's whole body is completely bluish-gray or pale")
+        self.assertEqual(inst.component[1].code.coding[0].code, "32407-9")
+        self.assertEqual(inst.component[1].code.coding[0].display, "1 minute Apgar Heart Rate")
+        self.assertEqual(inst.component[1].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[1].code.coding[1].code, "249223000")
+        self.assertEqual(inst.component[1].code.coding[1].display, "Apgar heart rate score")
+        self.assertEqual(inst.component[1].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[1].code.text, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].code, "LA6716-0")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].display, "No heart rate")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].extension[0].valueDecimal, 0)
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[1].code, "0")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarheartrate")
+        self.assertEqual(inst.component[1].valueCodeableConcept.text, "0. No heart rate")
+        self.assertEqual(inst.component[2].code.coding[0].code, "32409-5")
+        self.assertEqual(inst.component[2].code.coding[0].display, "1 minute Apgar Reflex Irritability")
+        self.assertEqual(inst.component[2].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[2].code.coding[1].code, "249226008")
+        self.assertEqual(inst.component[2].code.coding[1].display, "Apgar response to stimulus score")
+        self.assertEqual(inst.component[2].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[2].code.text, "Apgar response to stimulus score")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].code, "LA6719-4")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].display, "No response to airways being suctioned")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].extension[0].valueDecimal, 0)
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[1].code, "0")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarreflexirritability")
+        self.assertEqual(inst.component[2].valueCodeableConcept.text, "0. No response to airways being suctioned")
+        self.assertEqual(inst.component[3].code.coding[0].code, "32408-7")
+        self.assertEqual(inst.component[3].code.coding[0].display, "1 minute Apgar Muscle Tone")
+        self.assertEqual(inst.component[3].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[3].code.coding[1].code, "249225007")
+        self.assertEqual(inst.component[3].code.coding[1].display, "Apgar muscle tone score")
+        self.assertEqual(inst.component[3].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[3].code.text, "Apgar muscle tone score")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].code, "LA6713-7")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].display, "Limp; no movement")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].extension[0].valueDecimal, 0)
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[1].code, "0")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarmuscletone")
+        self.assertEqual(inst.component[3].valueCodeableConcept.text, "0. Limp; no movement")
+        self.assertEqual(inst.component[4].code.coding[0].code, "32410-3")
+        self.assertEqual(inst.component[4].code.coding[0].display, "1 minute Apgar Respiratory effort")
+        self.assertEqual(inst.component[4].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[4].code.coding[1].code, "249224006")
+        self.assertEqual(inst.component[4].code.coding[1].display, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[4].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[4].code.text, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].code, "LA6725-1")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].display, "Not breathing")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].extension[0].valueDecimal, 0)
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[1].code, "0")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarrespiratoryeffort")
+        self.assertEqual(inst.component[4].valueCodeableConcept.text, "0. Not breathing")
+        self.assertEqual(inst.contained[0].id, "newborn")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2016-05-18T22:33:22Z").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2016-05-18T22:33:22Z")
+        self.assertEqual(inst.id, "1minute-apgar-score")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.valueQuantity.code, "{score}")
+        self.assertEqual(inst.valueQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.valueQuantity.value, 0)
+    
+    def testObservation3(self):
+        inst = self.instantiate_from("observation-example-20minute-apgar-score.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Observation instance")
+        self.implObservation3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Observation", js["resourceType"])
+        inst2 = observation.Observation(js)
+        self.implObservation3(inst2)
+    
+    def implObservation3(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "survey")
+        self.assertEqual(inst.category[0].coding[0].display, "Survey")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/observation-category")
+        self.assertEqual(inst.category[0].text, "Survey")
+        self.assertEqual(inst.code.coding[0].code, "443849008")
+        self.assertEqual(inst.code.coding[0].display, "Apgar score at 20 minutes")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "20 minute Apgar Score")
+        self.assertEqual(inst.component[0].code.coding[0].code, "249227004")
+        self.assertEqual(inst.component[0].code.coding[0].display, "Apgar color score")
+        self.assertEqual(inst.component[0].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[0].code.text, "Apgar color score")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].code, "LA6724-4")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].display, "Good color all over")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarcolor")
+        self.assertEqual(inst.component[0].valueCodeableConcept.text, "2. Good color all over")
+        self.assertEqual(inst.component[1].code.coding[0].code, "249223000")
+        self.assertEqual(inst.component[1].code.coding[0].display, "Apgar heart rate score")
+        self.assertEqual(inst.component[1].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[1].code.text, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].code, "LA6718-6")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].display, "At least 100 beats per minute")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarheartrate")
+        self.assertEqual(inst.component[1].valueCodeableConcept.text, "2. At least 100 beats per minute")
+        self.assertEqual(inst.component[2].code.coding[0].code, "249226008")
+        self.assertEqual(inst.component[2].code.coding[0].display, "Apgar response to stimulus score")
+        self.assertEqual(inst.component[2].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[2].code.text, "Apgar response to stimulus score")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].code, "LA6721-0")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].display, "Grimace and pulling away, cough, or sneeze during suctioning")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarreflexirritability")
+        self.assertEqual(inst.component[2].valueCodeableConcept.text, "2. Grimace and pulling away, cough, or sneeze during suctioning")
+        self.assertEqual(inst.component[3].code.coding[0].code, "249225007")
+        self.assertEqual(inst.component[3].code.coding[0].display, "Apgar muscle tone score")
+        self.assertEqual(inst.component[3].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[3].code.text, "Apgar muscle tone score")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].code, "LA6715-2")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].display, "Active motion ")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarmuscletone")
+        self.assertEqual(inst.component[3].valueCodeableConcept.text, "2. Active motion")
+        self.assertEqual(inst.component[4].code.coding[0].code, "249224006")
+        self.assertEqual(inst.component[4].code.coding[0].display, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[4].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[4].code.text, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].code, "LA6727-7")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].display, "Good, strong cry; normal rate and effort of breathing    ")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarrespiratoryeffort")
+        self.assertEqual(inst.component[4].valueCodeableConcept.text, "2. Good, strong cry; normal rate and effort of breathing")
+        self.assertEqual(inst.contained[0].id, "newborn")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2016-05-18T22:33:22Z").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2016-05-18T22:33:22Z")
+        self.assertEqual(inst.id, "20minute-apgar-score")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.valueQuantity.code, "{score}")
+        self.assertEqual(inst.valueQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.valueQuantity.value, 10)
+    
+    def testObservation4(self):
+        inst = self.instantiate_from("observation-example-2minute-apgar-score.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Observation instance")
+        self.implObservation4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Observation", js["resourceType"])
+        inst2 = observation.Observation(js)
+        self.implObservation4(inst2)
+    
+    def implObservation4(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "survey")
+        self.assertEqual(inst.category[0].coding[0].display, "Survey")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/observation-category")
+        self.assertEqual(inst.category[0].text, "Survey")
+        self.assertEqual(inst.code.coding[0].code, "9273-4")
+        self.assertEqual(inst.code.coding[0].display, "2 minute Apgar Score")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "2 minute Apgar Score")
+        self.assertEqual(inst.component[0].code.coding[0].code, "249227004")
+        self.assertEqual(inst.component[0].code.coding[0].display, "Apgar color score")
+        self.assertEqual(inst.component[0].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[0].code.text, "Apgar color score")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].code, "LA6723-6")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].display, "Good color in body with bluish hands or feet")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].extension[0].valueDecimal, 1)
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[1].code, "1")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarcolor")
+        self.assertEqual(inst.component[0].valueCodeableConcept.text, "1. Good color in body with bluish hands or feet")
+        self.assertEqual(inst.component[1].code.coding[0].code, "249223000")
+        self.assertEqual(inst.component[1].code.coding[0].display, "Apgar heart rate score")
+        self.assertEqual(inst.component[1].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[1].code.text, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].code, "LA6720-2")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].display, "Fewer than 100 beats per minute")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].extension[0].valueDecimal, 1)
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[1].code, "1")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarheartrate")
+        self.assertEqual(inst.component[1].valueCodeableConcept.text, "1. Fewer than 100 beats per minute")
+        self.assertEqual(inst.component[2].code.coding[0].code, "249226008")
+        self.assertEqual(inst.component[2].code.coding[0].display, "Apgar response to stimulus score")
+        self.assertEqual(inst.component[2].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[2].code.text, "Apgar response to stimulus score")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].code, "LA6721-0")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].display, "Grimace during suctioning")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].extension[0].valueDecimal, 1)
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[1].code, "1")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarreflexirritability")
+        self.assertEqual(inst.component[2].valueCodeableConcept.text, "1. Grimace during suctioning")
+        self.assertEqual(inst.component[3].code.coding[0].code, "249225007")
+        self.assertEqual(inst.component[3].code.coding[0].display, "Apgar muscle tone score")
+        self.assertEqual(inst.component[3].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[3].code.text, "Apgar muscle tone score")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].code, "LA6714-5")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].display, "Some flexion of arms and legs")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].extension[0].valueDecimal, 1)
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[1].code, "1")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarmuscletone")
+        self.assertEqual(inst.component[3].valueCodeableConcept.text, "1. Some flexion of arms and legs")
+        self.assertEqual(inst.component[4].code.coding[0].code, "249224006")
+        self.assertEqual(inst.component[4].code.coding[0].display, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[4].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[4].code.text, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].code, "LA6726-9")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].display, "Weak cry; may sound like whimpering, slow or irregular breathing")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].extension[0].valueDecimal, 1)
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[1].code, "1")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarrespiratoryeffort")
+        self.assertEqual(inst.component[4].valueCodeableConcept.text, "1. Weak cry; may sound like whimpering, slow or irregular breathing")
+        self.assertEqual(inst.contained[0].id, "newborn")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2016-05-18T22:33:22Z").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2016-05-18T22:33:22Z")
+        self.assertEqual(inst.id, "2minute-apgar-score")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.valueQuantity.code, "{score}")
+        self.assertEqual(inst.valueQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.valueQuantity.value, 5)
+    
+    def testObservation5(self):
+        inst = self.instantiate_from("observation-example-5minute-apgar-score.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Observation instance")
+        self.implObservation5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Observation", js["resourceType"])
+        inst2 = observation.Observation(js)
+        self.implObservation5(inst2)
+    
+    def implObservation5(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "survey")
+        self.assertEqual(inst.category[0].coding[0].display, "Survey")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/observation-category")
+        self.assertEqual(inst.category[0].text, "Survey")
+        self.assertEqual(inst.code.coding[0].code, "9274-2")
+        self.assertEqual(inst.code.coding[0].display, "5 minute Apgar Score")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.coding[1].code, "169909004")
+        self.assertEqual(inst.code.coding[1].display, "Apgar at 5 minutes")
+        self.assertEqual(inst.code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "5 minute Apgar Score")
+        self.assertEqual(inst.component[0].code.coding[0].code, "32411-1")
+        self.assertEqual(inst.component[0].code.coding[0].display, "5 minute Apgar Color")
+        self.assertEqual(inst.component[0].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[0].code.coding[1].code, "249227004")
+        self.assertEqual(inst.component[0].code.coding[1].display, "Apgar color score")
+        self.assertEqual(inst.component[0].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[0].code.text, "Apgar color score")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].code, "LA6724-4")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].display, "Good color all over")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[0].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarcolor")
+        self.assertEqual(inst.component[0].valueCodeableConcept.text, "2. Good color all over")
+        self.assertEqual(inst.component[1].code.coding[0].code, "32412-9")
+        self.assertEqual(inst.component[1].code.coding[0].display, "5 minute Apgar Heart Rate")
+        self.assertEqual(inst.component[1].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[1].code.coding[1].code, "249223000")
+        self.assertEqual(inst.component[1].code.coding[1].display, "Apgar heart rate score")
+        self.assertEqual(inst.component[1].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[1].code.text, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].code, "LA6718-6")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].display, "At least 100 beats per minute")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[1].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarheartrate")
+        self.assertEqual(inst.component[1].valueCodeableConcept.text, "2. At least 100 beats per minute")
+        self.assertEqual(inst.component[2].code.coding[0].code, "32414-5")
+        self.assertEqual(inst.component[2].code.coding[0].display, "5 minute Apgar Reflex Irritability")
+        self.assertEqual(inst.component[2].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[2].code.coding[1].code, "249226008")
+        self.assertEqual(inst.component[2].code.coding[1].display, "Apgar response to stimulus score")
+        self.assertEqual(inst.component[2].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[2].code.text, "Apgar response to stimulus score")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].code, "LA6721-0")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].display, "Grimace and pulling away, cough, or sneeze during suctioning")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[2].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarreflexirritability")
+        self.assertEqual(inst.component[2].valueCodeableConcept.text, "2. Grimace and pulling away, cough, or sneeze during suctioning")
+        self.assertEqual(inst.component[3].code.coding[0].code, "32413-7")
+        self.assertEqual(inst.component[3].code.coding[0].display, "5 minute Apgar Muscle Tone")
+        self.assertEqual(inst.component[3].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[3].code.coding[1].code, "249225007")
+        self.assertEqual(inst.component[3].code.coding[1].display, "Apgar muscle tone score")
+        self.assertEqual(inst.component[3].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[3].code.text, "Apgar muscle tone score")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].code, "LA6715-2")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].display, "Active motion ")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[3].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarmuscletone")
+        self.assertEqual(inst.component[3].valueCodeableConcept.text, "2. Active motion")
+        self.assertEqual(inst.component[4].code.coding[0].code, "32415-2")
+        self.assertEqual(inst.component[4].code.coding[0].display, "5 minute Apgar Respiratory effort")
+        self.assertEqual(inst.component[4].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[4].code.coding[1].code, "249224006")
+        self.assertEqual(inst.component[4].code.coding[1].display, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[4].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[4].code.text, "Apgar respiratory effort score")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].code, "LA6727-7")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].display, "Good, strong cry; normal rate and effort of breathing    ")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].extension[0].valueDecimal, 2)
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[0].system, "http://loinc.org/la")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[1].code, "2")
+        self.assertEqual(inst.component[4].valueCodeableConcept.coding[1].system, "http:/acme.ped/apgarrespiratoryeffort")
+        self.assertEqual(inst.component[4].valueCodeableConcept.text, "2. Good, strong cry; normal rate and effort of breathing")
+        self.assertEqual(inst.contained[0].id, "newborn")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2016-05-18T22:33:22Z").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2016-05-18T22:33:22Z")
+        self.assertEqual(inst.id, "5minute-apgar-score")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.valueQuantity.code, "{score}")
+        self.assertEqual(inst.valueQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.valueQuantity.value, 10)
+    
+    def testObservation6(self):
+        inst = self.instantiate_from("observation-example-bloodpressure-cancel.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Observation instance")
+        self.implObservation6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Observation", js["resourceType"])
+        inst2 = observation.Observation(js)
+        self.implObservation6(inst2)
+    
+    def implObservation6(self, inst):
+        self.assertEqual(inst.bodySite.coding[0].code, "368209003")
+        self.assertEqual(inst.bodySite.coding[0].display, "Right arm")
+        self.assertEqual(inst.bodySite.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[0].code, "vital-signs")
+        self.assertEqual(inst.category[0].coding[0].display, "Vital Signs")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/observation-category")
+        self.assertEqual(inst.code.coding[0].code, "85354-9")
+        self.assertEqual(inst.code.coding[0].display, "Bood pressure panel with all children optional")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "Blood pressure systolic & diastolic")
+        self.assertEqual(inst.comment, "In this example, the blood pressure measurements are not available due to cancellation of the order.  Data absent reason is present for each component")
+        self.assertEqual(inst.component[0].code.coding[0].code, "8480-6")
+        self.assertEqual(inst.component[0].code.coding[0].display, "Systolic blood pressure")
+        self.assertEqual(inst.component[0].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[0].code.coding[1].code, "271649006")
+        self.assertEqual(inst.component[0].code.coding[1].display, "Systolic blood pressure")
+        self.assertEqual(inst.component[0].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[0].code.coding[2].code, "bp-s")
+        self.assertEqual(inst.component[0].code.coding[2].display, "Systolic Blood pressure")
+        self.assertEqual(inst.component[0].code.coding[2].system, "http://acme.org/devices/clinical-codes")
+        self.assertEqual(inst.component[0].dataAbsentReason.coding[0].code, "not-asked")
+        self.assertEqual(inst.component[0].dataAbsentReason.coding[0].display, "Not Asked")
+        self.assertEqual(inst.component[0].dataAbsentReason.coding[0].system, "http://hl7.org/fhir/data-absent-reason")
+        self.assertEqual(inst.component[1].code.coding[0].code, "8462-4")
+        self.assertEqual(inst.component[1].code.coding[0].display, "Diastolic blood pressure")
+        self.assertEqual(inst.component[1].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[1].dataAbsentReason.coding[0].code, "not-asked")
+        self.assertEqual(inst.component[1].dataAbsentReason.coding[0].display, "Not Asked")
+        self.assertEqual(inst.component[1].dataAbsentReason.coding[0].system, "http://hl7.org/fhir/data-absent-reason")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2012-09-17").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2012-09-17")
+        self.assertEqual(inst.id, "blood-pressure-cancel")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281")
+        self.assertEqual(inst.interpretation.coding[0].code, "L")
+        self.assertEqual(inst.interpretation.coding[0].display, "low")
+        self.assertEqual(inst.interpretation.coding[0].system, "http://hl7.org/fhir/v2/0078")
+        self.assertEqual(inst.interpretation.text, "Below low normal")
+        self.assertEqual(inst.meta.profile[0], "http://hl7.org/fhir/StructureDefinition/vitalsigns")
+        self.assertEqual(inst.status, "cancelled")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testObservation7(self):
+        inst = self.instantiate_from("observation-example-bloodpressure-dar.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Observation instance")
+        self.implObservation7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Observation", js["resourceType"])
+        inst2 = observation.Observation(js)
+        self.implObservation7(inst2)
+    
+    def implObservation7(self, inst):
+        self.assertEqual(inst.bodySite.coding[0].code, "368209003")
+        self.assertEqual(inst.bodySite.coding[0].display, "Right arm")
+        self.assertEqual(inst.bodySite.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[0].code, "vital-signs")
+        self.assertEqual(inst.category[0].coding[0].display, "Vital Signs")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/observation-category")
+        self.assertEqual(inst.code.coding[0].code, "85354-9")
+        self.assertEqual(inst.code.coding[0].display, "Bood pressure panel with all children optional")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "Blood pressure systolic & diastolic")
+        self.assertEqual(inst.component[0].code.coding[0].code, "8480-6")
+        self.assertEqual(inst.component[0].code.coding[0].display, "Systolic blood pressure")
+        self.assertEqual(inst.component[0].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[0].code.coding[1].code, "271649006")
+        self.assertEqual(inst.component[0].code.coding[1].display, "Systolic blood pressure")
+        self.assertEqual(inst.component[0].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[0].code.coding[2].code, "bp-s")
+        self.assertEqual(inst.component[0].code.coding[2].display, "Systolic Blood pressure")
+        self.assertEqual(inst.component[0].code.coding[2].system, "http://acme.org/devices/clinical-codes")
+        self.assertEqual(inst.component[0].valueQuantity.code, "mm[Hg]")
+        self.assertEqual(inst.component[0].valueQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.component[0].valueQuantity.unit, "mmHg")
+        self.assertEqual(inst.component[0].valueQuantity.value, 107)
+        self.assertEqual(inst.component[1].code.coding[0].code, "8462-4")
+        self.assertEqual(inst.component[1].code.coding[0].display, "Diastolic blood pressure")
+        self.assertEqual(inst.component[1].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[1].dataAbsentReason.coding[0].code, "not-performed")
+        self.assertEqual(inst.component[1].dataAbsentReason.coding[0].display, "Not Performed")
+        self.assertEqual(inst.component[1].dataAbsentReason.coding[0].system, "http://hl7.org/fhir/data-absent-reason")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2012-09-17").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2012-09-17")
+        self.assertEqual(inst.id, "blood-pressure-dar")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281")
+        self.assertEqual(inst.interpretation.coding[0].code, "L")
+        self.assertEqual(inst.interpretation.coding[0].display, "low")
+        self.assertEqual(inst.interpretation.coding[0].system, "http://hl7.org/fhir/v2/0078")
+        self.assertEqual(inst.interpretation.text, "Below low normal")
+        self.assertEqual(inst.meta.profile[0], "http://hl7.org/fhir/StructureDefinition/vitalsigns")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testObservation8(self):
+        inst = self.instantiate_from("observation-example-bloodpressure.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Observation instance")
+        self.implObservation8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Observation", js["resourceType"])
+        inst2 = observation.Observation(js)
+        self.implObservation8(inst2)
+    
+    def implObservation8(self, inst):
+        self.assertEqual(inst.bodySite.coding[0].code, "368209003")
+        self.assertEqual(inst.bodySite.coding[0].display, "Right arm")
+        self.assertEqual(inst.bodySite.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].coding[0].code, "vital-signs")
+        self.assertEqual(inst.category[0].coding[0].display, "Vital Signs")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/observation-category")
+        self.assertEqual(inst.code.coding[0].code, "85354-9")
+        self.assertEqual(inst.code.coding[0].display, "Bood pressure panel with all children optional")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "Blood pressure systolic & diastolic")
+        self.assertEqual(inst.component[0].code.coding[0].code, "8480-6")
+        self.assertEqual(inst.component[0].code.coding[0].display, "Systolic blood pressure")
+        self.assertEqual(inst.component[0].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[0].code.coding[1].code, "271649006")
+        self.assertEqual(inst.component[0].code.coding[1].display, "Systolic blood pressure")
+        self.assertEqual(inst.component[0].code.coding[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.component[0].code.coding[2].code, "bp-s")
+        self.assertEqual(inst.component[0].code.coding[2].display, "Systolic Blood pressure")
+        self.assertEqual(inst.component[0].code.coding[2].system, "http://acme.org/devices/clinical-codes")
+        self.assertEqual(inst.component[0].interpretation.coding[0].code, "N")
+        self.assertEqual(inst.component[0].interpretation.coding[0].display, "normal")
+        self.assertEqual(inst.component[0].interpretation.coding[0].system, "http://hl7.org/fhir/v2/0078")
+        self.assertEqual(inst.component[0].interpretation.text, "Normal")
+        self.assertEqual(inst.component[0].valueQuantity.code, "mm[Hg]")
+        self.assertEqual(inst.component[0].valueQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.component[0].valueQuantity.unit, "mmHg")
+        self.assertEqual(inst.component[0].valueQuantity.value, 107)
+        self.assertEqual(inst.component[1].code.coding[0].code, "8462-4")
+        self.assertEqual(inst.component[1].code.coding[0].display, "Diastolic blood pressure")
+        self.assertEqual(inst.component[1].code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.component[1].interpretation.coding[0].code, "L")
+        self.assertEqual(inst.component[1].interpretation.coding[0].display, "low")
+        self.assertEqual(inst.component[1].interpretation.coding[0].system, "http://hl7.org/fhir/v2/0078")
+        self.assertEqual(inst.component[1].interpretation.text, "Below low normal")
+        self.assertEqual(inst.component[1].valueQuantity.code, "mm[Hg]")
+        self.assertEqual(inst.component[1].valueQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.component[1].valueQuantity.unit, "mmHg")
+        self.assertEqual(inst.component[1].valueQuantity.value, 60)
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("2012-09-17").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "2012-09-17")
+        self.assertEqual(inst.id, "blood-pressure")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281")
+        self.assertEqual(inst.interpretation.coding[0].code, "L")
+        self.assertEqual(inst.interpretation.coding[0].display, "low")
+        self.assertEqual(inst.interpretation.coding[0].system, "http://hl7.org/fhir/v2/0078")
+        self.assertEqual(inst.interpretation.text, "Below low normal")
+        self.assertEqual(inst.meta.profile[0], "http://hl7.org/fhir/StructureDefinition/vitalsigns")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testObservation9(self):
+        inst = self.instantiate_from("observation-example-bmd.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Observation instance")
+        self.implObservation9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Observation", js["resourceType"])
+        inst2 = observation.Observation(js)
+        self.implObservation9(inst2)
+    
+    def implObservation9(self, inst):
+        self.assertEqual(inst.bodySite.coding[0].code, "71341001:272741003=7771000")
+        self.assertEqual(inst.bodySite.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.bodySite.text, "Left Femur")
+        self.assertEqual(inst.code.coding[0].code, "24701-5")
+        self.assertEqual(inst.code.coding[0].display, "Femur DXA Bone density")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "BMD - Left Femur")
+        self.assertEqual(inst.id, "bmd")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.valueQuantity.code, "g/cm-2")
+        self.assertEqual(inst.valueQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.valueQuantity.unit, "g/cm²")
+        self.assertEqual(inst.valueQuantity.value, 0.887)
+    
+    def testObservation10(self):
+        inst = self.instantiate_from("observation-example-bmi.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Observation instance")
+        self.implObservation10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Observation", js["resourceType"])
+        inst2 = observation.Observation(js)
+        self.implObservation10(inst2)
+    
+    def implObservation10(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "vital-signs")
+        self.assertEqual(inst.category[0].coding[0].display, "Vital Signs")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org/fhir/observation-category")
+        self.assertEqual(inst.category[0].text, "Vital Signs")
+        self.assertEqual(inst.code.coding[0].code, "39156-5")
+        self.assertEqual(inst.code.coding[0].display, "Body mass index (BMI) [Ratio]")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "BMI")
+        self.assertEqual(inst.effectiveDateTime.date, FHIRDate("1999-07-02").date)
+        self.assertEqual(inst.effectiveDateTime.as_json(), "1999-07-02")
+        self.assertEqual(inst.id, "bmi")
+        self.assertEqual(inst.meta.profile[0], "http://hl7.org/fhir/StructureDefinition/vitalsigns")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.valueQuantity.code, "kg/m2")
+        self.assertEqual(inst.valueQuantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.valueQuantity.unit, "kg/m2")
+        self.assertEqual(inst.valueQuantity.value, 16.2)
+
diff --git a/fhirclient/models/operationdefinition.py b/fhirclient/models/operationdefinition.py
new file mode 100644
index 0000000..229aa5b
--- /dev/null
+++ b/fhirclient/models/operationdefinition.py
@@ -0,0 +1,328 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/OperationDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class OperationDefinition(domainresource.DomainResource):
+    """ Definition of an operation or a named query.
+    
+    A formal computable definition of an operation (on the RESTful interface)
+    or a named query (using the search interaction).
+    """
+    
+    resource_type = "OperationDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.base = None
+        """ Marks this as a profile of the base.
+        Type `FHIRReference` referencing `OperationDefinition` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Name used to invoke the operation.
+        Type `str`. """
+        
+        self.comment = None
+        """ Additional information about use.
+        Type `str`. """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the operation definition.
+        Type `str`. """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.idempotent = None
+        """ Whether content is unchanged by the operation.
+        Type `bool`. """
+        
+        self.instance = None
+        """ Invoke on an instance?.
+        Type `bool`. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for operation definition (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.kind = None
+        """ operation | query.
+        Type `str`. """
+        
+        self.name = None
+        """ Name for this operation definition (computer friendly).
+        Type `str`. """
+        
+        self.overload = None
+        """ Define overloaded variants for when  generating code.
+        List of `OperationDefinitionOverload` items (represented as `dict` in JSON). """
+        
+        self.parameter = None
+        """ Parameters for the operation/query.
+        List of `OperationDefinitionParameter` items (represented as `dict` in JSON). """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this operation definition is defined.
+        Type `str`. """
+        
+        self.resource = None
+        """ Types this operation applies to.
+        List of `str` items. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.system = None
+        """ Invoke at the system level?.
+        Type `bool`. """
+        
+        self.type = None
+        """ Invole at the type level?.
+        Type `bool`. """
+        
+        self.url = None
+        """ Logical URI to reference this operation definition (globally
+        unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the operation definition.
+        Type `str`. """
+        
+        super(OperationDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(OperationDefinition, self).elementProperties()
+        js.extend([
+            ("base", "base", fhirreference.FHIRReference, False, None, False),
+            ("code", "code", str, False, None, True),
+            ("comment", "comment", str, False, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("idempotent", "idempotent", bool, False, None, False),
+            ("instance", "instance", bool, False, None, True),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("kind", "kind", str, False, None, True),
+            ("name", "name", str, False, None, True),
+            ("overload", "overload", OperationDefinitionOverload, True, None, False),
+            ("parameter", "parameter", OperationDefinitionParameter, True, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("resource", "resource", str, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("system", "system", bool, False, None, True),
+            ("type", "type", bool, False, None, True),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class OperationDefinitionOverload(backboneelement.BackboneElement):
+    """ Define overloaded variants for when  generating code.
+    
+    Defines an appropriate combination of parameters to use when invoking this
+    operation, to help code generators when generating overloaded parameter
+    sets for this operation.
+    """
+    
+    resource_type = "OperationDefinitionOverload"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.comment = None
+        """ Comments to go on overload.
+        Type `str`. """
+        
+        self.parameterName = None
+        """ Name of parameter to include in overload.
+        List of `str` items. """
+        
+        super(OperationDefinitionOverload, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(OperationDefinitionOverload, self).elementProperties()
+        js.extend([
+            ("comment", "comment", str, False, None, False),
+            ("parameterName", "parameterName", str, True, None, False),
+        ])
+        return js
+
+
+class OperationDefinitionParameter(backboneelement.BackboneElement):
+    """ Parameters for the operation/query.
+    
+    The parameters for the operation/query.
+    """
+    
+    resource_type = "OperationDefinitionParameter"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.binding = None
+        """ ValueSet details if this is coded.
+        Type `OperationDefinitionParameterBinding` (represented as `dict` in JSON). """
+        
+        self.documentation = None
+        """ Description of meaning/use.
+        Type `str`. """
+        
+        self.max = None
+        """ Maximum Cardinality (a number or *).
+        Type `str`. """
+        
+        self.min = None
+        """ Minimum Cardinality.
+        Type `int`. """
+        
+        self.name = None
+        """ Name in Parameters.parameter.name or in URL.
+        Type `str`. """
+        
+        self.part = None
+        """ Parts of a nested Parameter.
+        List of `OperationDefinitionParameter` items (represented as `dict` in JSON). """
+        
+        self.profile = None
+        """ Profile on the type.
+        Type `FHIRReference` referencing `StructureDefinition` (represented as `dict` in JSON). """
+        
+        self.searchType = None
+        """ number | date | string | token | reference | composite | quantity |
+        uri.
+        Type `str`. """
+        
+        self.type = None
+        """ What type this parameter has.
+        Type `str`. """
+        
+        self.use = None
+        """ in | out.
+        Type `str`. """
+        
+        super(OperationDefinitionParameter, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(OperationDefinitionParameter, self).elementProperties()
+        js.extend([
+            ("binding", "binding", OperationDefinitionParameterBinding, False, None, False),
+            ("documentation", "documentation", str, False, None, False),
+            ("max", "max", str, False, None, True),
+            ("min", "min", int, False, None, True),
+            ("name", "name", str, False, None, True),
+            ("part", "part", OperationDefinitionParameter, True, None, False),
+            ("profile", "profile", fhirreference.FHIRReference, False, None, False),
+            ("searchType", "searchType", str, False, None, False),
+            ("type", "type", str, False, None, False),
+            ("use", "use", str, False, None, True),
+        ])
+        return js
+
+
+class OperationDefinitionParameterBinding(backboneelement.BackboneElement):
+    """ ValueSet details if this is coded.
+    
+    Binds to a value set if this parameter is coded (code, Coding,
+    CodeableConcept).
+    """
+    
+    resource_type = "OperationDefinitionParameterBinding"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.strength = None
+        """ required | extensible | preferred | example.
+        Type `str`. """
+        
+        self.valueSetReference = None
+        """ Source of value set.
+        Type `FHIRReference` referencing `ValueSet` (represented as `dict` in JSON). """
+        
+        self.valueSetUri = None
+        """ Source of value set.
+        Type `str`. """
+        
+        super(OperationDefinitionParameterBinding, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(OperationDefinitionParameterBinding, self).elementProperties()
+        js.extend([
+            ("strength", "strength", str, False, None, True),
+            ("valueSetReference", "valueSetReference", fhirreference.FHIRReference, False, "valueSet", True),
+            ("valueSetUri", "valueSetUri", str, False, "valueSet", True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/operationdefinition_tests.py b/fhirclient/models/operationdefinition_tests.py
new file mode 100644
index 0000000..aff5ce8
--- /dev/null
+++ b/fhirclient/models/operationdefinition_tests.py
@@ -0,0 +1,85 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import operationdefinition
+from .fhirdate import FHIRDate
+
+
+class OperationDefinitionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("OperationDefinition", js["resourceType"])
+        return operationdefinition.OperationDefinition(js)
+    
+    def testOperationDefinition1(self):
+        inst = self.instantiate_from("operationdefinition-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a OperationDefinition instance")
+        self.implOperationDefinition1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("OperationDefinition", js["resourceType"])
+        inst2 = operationdefinition.OperationDefinition(js)
+        self.implOperationDefinition1(inst2)
+    
+    def implOperationDefinition1(self, inst):
+        self.assertEqual(inst.code, "populate")
+        self.assertEqual(inst.comment, "Only implemented for Labs and Medications so far")
+        self.assertEqual(inst.contact[0].name, "System Administrator")
+        self.assertEqual(inst.contact[0].telecom[0].system, "email")
+        self.assertEqual(inst.contact[0].telecom[0].value, "beep at coyote.acme.com")
+        self.assertEqual(inst.date.date, FHIRDate("2015-08-04").date)
+        self.assertEqual(inst.date.as_json(), "2015-08-04")
+        self.assertEqual(inst.description, "Limited implementation of the Populate Questionnaire implemenation")
+        self.assertEqual(inst.id, "example")
+        self.assertTrue(inst.instance)
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "GB")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United Kingdom of Great Britain and Northern Ireland (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.kind, "operation")
+        self.assertEqual(inst.name, "Populate Questionnaire")
+        self.assertEqual(inst.overload[0].parameterName[0], "subject")
+        self.assertEqual(inst.overload[0].parameterName[1], "local")
+        self.assertEqual(inst.overload[1].comment, "local defaults to false when not passed as a parameter")
+        self.assertEqual(inst.overload[1].parameterName[0], "subject")
+        self.assertEqual(inst.parameter[0].max, "1")
+        self.assertEqual(inst.parameter[0].min, 1)
+        self.assertEqual(inst.parameter[0].name, "subject")
+        self.assertEqual(inst.parameter[0].type, "Reference")
+        self.assertEqual(inst.parameter[0].use, "in")
+        self.assertEqual(inst.parameter[1].documentation, "If the *local* parameter is set to true, server information about the specified subject will be used to populate the instance.")
+        self.assertEqual(inst.parameter[1].max, "1")
+        self.assertEqual(inst.parameter[1].min, 0)
+        self.assertEqual(inst.parameter[1].name, "local")
+        self.assertEqual(inst.parameter[1].type, "Reference")
+        self.assertEqual(inst.parameter[1].use, "in")
+        self.assertEqual(inst.parameter[2].documentation, "The partially (or fully)-populated set of answers for the specified Questionnaire")
+        self.assertEqual(inst.parameter[2].max, "1")
+        self.assertEqual(inst.parameter[2].min, 1)
+        self.assertEqual(inst.parameter[2].name, "return")
+        self.assertEqual(inst.parameter[2].type, "QuestionnaireResponse")
+        self.assertEqual(inst.parameter[2].use, "out")
+        self.assertEqual(inst.publisher, "Acme Healthcare Services")
+        self.assertEqual(inst.resource[0], "Questionnaire")
+        self.assertEqual(inst.status, "draft")
+        self.assertFalse(inst.system)
+        self.assertEqual(inst.text.status, "generated")
+        self.assertFalse(inst.type)
+        self.assertEqual(inst.url, "http://h7.org/fhir/OperationDefinition/example")
+        self.assertEqual(inst.useContext[0].code.code, "venue")
+        self.assertEqual(inst.useContext[0].code.display, "Clinical Venue")
+        self.assertEqual(inst.useContext[0].code.system, "http://build.fhir.org/codesystem-usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "IMP")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].display, "inpatient encounter")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "http://hl7.org/fhir/v3/ActCode")
+        self.assertEqual(inst.version, "B")
+
diff --git a/fhirclient/models/operationoutcome.py b/fhirclient/models/operationoutcome.py
new file mode 100644
index 0000000..39c9b15
--- /dev/null
+++ b/fhirclient/models/operationoutcome.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/OperationOutcome) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class OperationOutcome(domainresource.DomainResource):
+    """ Information about the success/failure of an action.
+    
+    A collection of error, warning or information messages that result from a
+    system action.
+    """
+    
+    resource_type = "OperationOutcome"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.issue = None
+        """ A single issue associated with the action.
+        List of `OperationOutcomeIssue` items (represented as `dict` in JSON). """
+        
+        super(OperationOutcome, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(OperationOutcome, self).elementProperties()
+        js.extend([
+            ("issue", "issue", OperationOutcomeIssue, True, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class OperationOutcomeIssue(backboneelement.BackboneElement):
+    """ A single issue associated with the action.
+    
+    An error, warning or information message that results from a system action.
+    """
+    
+    resource_type = "OperationOutcomeIssue"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Error or warning code.
+        Type `str`. """
+        
+        self.details = None
+        """ Additional details about the error.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.diagnostics = None
+        """ Additional diagnostic information about the issue.
+        Type `str`. """
+        
+        self.expression = None
+        """ FHIRPath of element(s) related to issue.
+        List of `str` items. """
+        
+        self.location = None
+        """ Path of element(s) related to issue.
+        List of `str` items. """
+        
+        self.severity = None
+        """ fatal | error | warning | information.
+        Type `str`. """
+        
+        super(OperationOutcomeIssue, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(OperationOutcomeIssue, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("details", "details", codeableconcept.CodeableConcept, False, None, False),
+            ("diagnostics", "diagnostics", str, False, None, False),
+            ("expression", "expression", str, True, None, False),
+            ("location", "location", str, True, None, False),
+            ("severity", "severity", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
diff --git a/fhirclient/models/operationoutcome_tests.py b/fhirclient/models/operationoutcome_tests.py
new file mode 100644
index 0000000..16c537c
--- /dev/null
+++ b/fhirclient/models/operationoutcome_tests.py
@@ -0,0 +1,134 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import operationoutcome
+from .fhirdate import FHIRDate
+
+
+class OperationOutcomeTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("OperationOutcome", js["resourceType"])
+        return operationoutcome.OperationOutcome(js)
+    
+    def testOperationOutcome1(self):
+        inst = self.instantiate_from("operationoutcome-example-allok.json")
+        self.assertIsNotNone(inst, "Must have instantiated a OperationOutcome instance")
+        self.implOperationOutcome1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("OperationOutcome", js["resourceType"])
+        inst2 = operationoutcome.OperationOutcome(js)
+        self.implOperationOutcome1(inst2)
+    
+    def implOperationOutcome1(self, inst):
+        self.assertEqual(inst.id, "allok")
+        self.assertEqual(inst.issue[0].code, "informational")
+        self.assertEqual(inst.issue[0].details.text, "All OK")
+        self.assertEqual(inst.issue[0].severity, "information")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testOperationOutcome2(self):
+        inst = self.instantiate_from("operationoutcome-example-break-the-glass.json")
+        self.assertIsNotNone(inst, "Must have instantiated a OperationOutcome instance")
+        self.implOperationOutcome2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("OperationOutcome", js["resourceType"])
+        inst2 = operationoutcome.OperationOutcome(js)
+        self.implOperationOutcome2(inst2)
+    
+    def implOperationOutcome2(self, inst):
+        self.assertEqual(inst.id, "break-the-glass")
+        self.assertEqual(inst.issue[0].code, "suppressed")
+        self.assertEqual(inst.issue[0].details.coding[0].code, "ETREAT")
+        self.assertEqual(inst.issue[0].details.coding[0].display, "Emergency Treatment")
+        self.assertEqual(inst.issue[0].details.coding[0].system, "http://hl7.org/fhir/v3/ActReason")
+        self.assertEqual(inst.issue[0].details.text, "Additional information may be available using the Break-The-Glass Protocol")
+        self.assertEqual(inst.issue[0].severity, "information")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testOperationOutcome3(self):
+        inst = self.instantiate_from("operationoutcome-example-exception.json")
+        self.assertIsNotNone(inst, "Must have instantiated a OperationOutcome instance")
+        self.implOperationOutcome3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("OperationOutcome", js["resourceType"])
+        inst2 = operationoutcome.OperationOutcome(js)
+        self.implOperationOutcome3(inst2)
+    
+    def implOperationOutcome3(self, inst):
+        self.assertEqual(inst.id, "exception")
+        self.assertEqual(inst.issue[0].code, "exception")
+        self.assertEqual(inst.issue[0].details.text, "SQL Link Communication Error (dbx = 34234)")
+        self.assertEqual(inst.issue[0].severity, "error")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testOperationOutcome4(self):
+        inst = self.instantiate_from("operationoutcome-example-searchfail.json")
+        self.assertIsNotNone(inst, "Must have instantiated a OperationOutcome instance")
+        self.implOperationOutcome4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("OperationOutcome", js["resourceType"])
+        inst2 = operationoutcome.OperationOutcome(js)
+        self.implOperationOutcome4(inst2)
+    
+    def implOperationOutcome4(self, inst):
+        self.assertEqual(inst.id, "searchfail")
+        self.assertEqual(inst.issue[0].code, "code-invalid")
+        self.assertEqual(inst.issue[0].details.text, "The \"name\" parameter has the modifier \"exact\" which is not supported by this server")
+        self.assertEqual(inst.issue[0].location[0], "http.name:exact")
+        self.assertEqual(inst.issue[0].severity, "fatal")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testOperationOutcome5(self):
+        inst = self.instantiate_from("operationoutcome-example-validationfail.json")
+        self.assertIsNotNone(inst, "Must have instantiated a OperationOutcome instance")
+        self.implOperationOutcome5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("OperationOutcome", js["resourceType"])
+        inst2 = operationoutcome.OperationOutcome(js)
+        self.implOperationOutcome5(inst2)
+    
+    def implOperationOutcome5(self, inst):
+        self.assertEqual(inst.id, "validationfail")
+        self.assertEqual(inst.issue[0].code, "structure")
+        self.assertEqual(inst.issue[0].details.text, "Error parsing resource XML (Unknown Content \"label\"")
+        self.assertEqual(inst.issue[0].expression[0], "Patient.identifier")
+        self.assertEqual(inst.issue[0].location[0], "/f:Patient/f:identifier")
+        self.assertEqual(inst.issue[0].severity, "error")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testOperationOutcome6(self):
+        inst = self.instantiate_from("operationoutcome-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a OperationOutcome instance")
+        self.implOperationOutcome6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("OperationOutcome", js["resourceType"])
+        inst2 = operationoutcome.OperationOutcome(js)
+        self.implOperationOutcome6(inst2)
+    
+    def implOperationOutcome6(self, inst):
+        self.assertEqual(inst.id, "101")
+        self.assertEqual(inst.issue[0].code, "code-invalid")
+        self.assertEqual(inst.issue[0].details.text, "The code \"W\" is not known and not legal in this context")
+        self.assertEqual(inst.issue[0].diagnostics, "Acme.Interop.FHIRProcessors.Patient.processGender line 2453")
+        self.assertEqual(inst.issue[0].expression[0], "Person.gender")
+        self.assertEqual(inst.issue[0].location[0], "/f:Person/f:gender")
+        self.assertEqual(inst.issue[0].severity, "error")
+        self.assertEqual(inst.text.status, "additional")
+
diff --git a/fhirclient/models/organization.py b/fhirclient/models/organization.py
new file mode 100644
index 0000000..88065dc
--- /dev/null
+++ b/fhirclient/models/organization.py
@@ -0,0 +1,159 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Organization) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Organization(domainresource.DomainResource):
+    """ A grouping of people or organizations with a common purpose.
+    
+    A formally or informally recognized grouping of people or organizations
+    formed for the purpose of achieving some form of collective action.
+    Includes companies, institutions, corporations, departments, community
+    groups, healthcare practice groups, etc.
+    """
+    
+    resource_type = "Organization"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Whether the organization's record is still in active use.
+        Type `bool`. """
+        
+        self.address = None
+        """ An address for the organization.
+        List of `Address` items (represented as `dict` in JSON). """
+        
+        self.alias = None
+        """ A list of alternate names that the organization is known as, or was
+        known as in the past.
+        List of `str` items. """
+        
+        self.contact = None
+        """ Contact for the organization for a certain purpose.
+        List of `OrganizationContact` items (represented as `dict` in JSON). """
+        
+        self.endpoint = None
+        """ Technical endpoints providing access to services operated for the
+        organization.
+        List of `FHIRReference` items referencing `Endpoint` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Identifies this organization  across multiple systems.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name used for the organization.
+        Type `str`. """
+        
+        self.partOf = None
+        """ The organization of which this organization forms a part.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.telecom = None
+        """ A contact detail for the organization.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Kind of organization.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(Organization, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Organization, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("address", "address", address.Address, True, None, False),
+            ("alias", "alias", str, True, None, False),
+            ("contact", "contact", OrganizationContact, True, None, False),
+            ("endpoint", "endpoint", fhirreference.FHIRReference, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, False, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class OrganizationContact(backboneelement.BackboneElement):
+    """ Contact for the organization for a certain purpose.
+    """
+    
+    resource_type = "OrganizationContact"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.address = None
+        """ Visiting or postal addresses for the contact.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ A name associated with the contact.
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.purpose = None
+        """ The type of contact.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.telecom = None
+        """ Contact details (telephone, email, etc.)  for a contact.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        super(OrganizationContact, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(OrganizationContact, self).elementProperties()
+        js.extend([
+            ("address", "address", address.Address, False, None, False),
+            ("name", "name", humanname.HumanName, False, None, False),
+            ("purpose", "purpose", codeableconcept.CodeableConcept, False, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import humanname
+except ImportError:
+    humanname = sys.modules[__package__ + '.humanname']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/organization_tests.py b/fhirclient/models/organization_tests.py
new file mode 100644
index 0000000..a5c8601
--- /dev/null
+++ b/fhirclient/models/organization_tests.py
@@ -0,0 +1,315 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import organization
+from .fhirdate import FHIRDate
+
+
+class OrganizationTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Organization", js["resourceType"])
+        return organization.Organization(js)
+    
+    def testOrganization1(self):
+        inst = self.instantiate_from("organization-example-f001-burgers.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Organization instance")
+        self.implOrganization1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Organization", js["resourceType"])
+        inst2 = organization.Organization(js)
+        self.implOrganization1(inst2)
+    
+    def implOrganization1(self, inst):
+        self.assertEqual(inst.address[0].city, "Den Burg")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Galapagosweg 91")
+        self.assertEqual(inst.address[0].postalCode, "9105 PZ")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.address[1].city, "Den Burg")
+        self.assertEqual(inst.address[1].country, "NLD")
+        self.assertEqual(inst.address[1].line[0], "PO Box 2311")
+        self.assertEqual(inst.address[1].postalCode, "9100 AA")
+        self.assertEqual(inst.address[1].use, "work")
+        self.assertEqual(inst.contact[0].purpose.coding[0].code, "PRESS")
+        self.assertEqual(inst.contact[0].purpose.coding[0].system, "http://hl7.org/fhir/contactentity-type")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].value, "022-655 2334")
+        self.assertEqual(inst.contact[1].purpose.coding[0].code, "PATINF")
+        self.assertEqual(inst.contact[1].purpose.coding[0].system, "http://hl7.org/fhir/contactentity-type")
+        self.assertEqual(inst.contact[1].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[1].telecom[0].value, "022-655 2335")
+        self.assertEqual(inst.id, "f001")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "91654")
+        self.assertEqual(inst.identifier[1].system, "urn:oid:2.16.840.1.113883.2.4.6.1")
+        self.assertEqual(inst.identifier[1].use, "usual")
+        self.assertEqual(inst.identifier[1].value, "17-0112278")
+        self.assertEqual(inst.name, "Burgers University Medical Center")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "022-655 2300")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "V6")
+        self.assertEqual(inst.type[0].coding[0].display, "University Medical Hospital")
+        self.assertEqual(inst.type[0].coding[0].system, "urn:oid:2.16.840.1.113883.2.4.15.1060")
+        self.assertEqual(inst.type[0].coding[1].code, "prov")
+        self.assertEqual(inst.type[0].coding[1].display, "Healthcare Provider")
+        self.assertEqual(inst.type[0].coding[1].system, "http://hl7.org/fhir/organization-type")
+    
+    def testOrganization2(self):
+        inst = self.instantiate_from("organization-example-f002-burgers-card.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Organization instance")
+        self.implOrganization2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Organization", js["resourceType"])
+        inst2 = organization.Organization(js)
+        self.implOrganization2(inst2)
+    
+    def implOrganization2(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].line[0], "South Wing, floor 2")
+        self.assertEqual(inst.contact[0].address.line[0], "South Wing, floor 2")
+        self.assertEqual(inst.contact[0].name.text, "mevr. D. de Haan")
+        self.assertEqual(inst.contact[0].purpose.coding[0].code, "ADMIN")
+        self.assertEqual(inst.contact[0].purpose.coding[0].system, "http://hl7.org/fhir/contactentity-type")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].value, "022-655 2321")
+        self.assertEqual(inst.contact[0].telecom[1].system, "email")
+        self.assertEqual(inst.contact[0].telecom[1].value, "cardio at burgersumc.nl")
+        self.assertEqual(inst.contact[0].telecom[2].system, "fax")
+        self.assertEqual(inst.contact[0].telecom[2].value, "022-655 2322")
+        self.assertEqual(inst.id, "f002")
+        self.assertEqual(inst.name, "Burgers UMC Cardiology unit")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].value, "022-655 2320")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "dept")
+        self.assertEqual(inst.type[0].coding[0].display, "Hospital Department")
+        self.assertEqual(inst.type[0].coding[0].system, "http://hl7.org/fhir/organization-type")
+    
+    def testOrganization3(self):
+        inst = self.instantiate_from("organization-example-f003-burgers-ENT.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Organization instance")
+        self.implOrganization3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Organization", js["resourceType"])
+        inst2 = organization.Organization(js)
+        self.implOrganization3(inst2)
+    
+    def implOrganization3(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].line[0], "West Wing, floor 5")
+        self.assertEqual(inst.contact[0].address.line[0], "West Wing, floor 5")
+        self.assertEqual(inst.contact[0].name.text, "mr. F. de Hond")
+        self.assertEqual(inst.contact[0].purpose.coding[0].code, "ADMIN")
+        self.assertEqual(inst.contact[0].purpose.coding[0].system, "http://hl7.org/fhir/contactentity-type")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].value, "022-655 7654")
+        self.assertEqual(inst.contact[0].telecom[1].system, "email")
+        self.assertEqual(inst.contact[0].telecom[1].value, "KNO at burgersumc.nl")
+        self.assertEqual(inst.contact[0].telecom[2].system, "fax")
+        self.assertEqual(inst.contact[0].telecom[2].value, "022-655 0998")
+        self.assertEqual(inst.id, "f003")
+        self.assertEqual(inst.name, "Burgers UMC Ear,Nose,Throat unit")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].value, "022-655 6780")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "dept")
+        self.assertEqual(inst.type[0].coding[0].display, "Hospital Department")
+        self.assertEqual(inst.type[0].coding[0].system, "http://hl7.org/fhir/organization-type")
+    
+    def testOrganization4(self):
+        inst = self.instantiate_from("organization-example-f201-aumc.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Organization instance")
+        self.implOrganization4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Organization", js["resourceType"])
+        inst2 = organization.Organization(js)
+        self.implOrganization4(inst2)
+    
+    def implOrganization4(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].city, "Den Helder")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Walvisbaai 3")
+        self.assertEqual(inst.address[0].postalCode, "2333ZA")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.contact[0].address.city, "Den helder")
+        self.assertEqual(inst.contact[0].address.country, "NLD")
+        self.assertEqual(inst.contact[0].address.line[0], "Walvisbaai 3")
+        self.assertEqual(inst.contact[0].address.line[1], "Gebouw 2")
+        self.assertEqual(inst.contact[0].address.postalCode, "2333ZA")
+        self.assertEqual(inst.contact[0].name.family, "Brand")
+        self.assertEqual(inst.contact[0].name.given[0], "Ronald")
+        self.assertEqual(inst.contact[0].name.prefix[0], "Prof.Dr.")
+        self.assertEqual(inst.contact[0].name.text, "Professor Brand")
+        self.assertEqual(inst.contact[0].name.use, "official")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "+31715269702")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.identifier[0].system, "http://www.zorgkaartnederland.nl/")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "Artis University Medical Center")
+        self.assertEqual(inst.name, "Artis University Medical Center (AUMC)")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "+31715269111")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "405608006")
+        self.assertEqual(inst.type[0].coding[0].display, "Academic Medical Center")
+        self.assertEqual(inst.type[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.type[0].coding[1].code, "V6")
+        self.assertEqual(inst.type[0].coding[1].display, "University Medical Hospital")
+        self.assertEqual(inst.type[0].coding[1].system, "urn:oid:2.16.840.1.113883.2.4.15.1060")
+        self.assertEqual(inst.type[0].coding[2].code, "prov")
+        self.assertEqual(inst.type[0].coding[2].display, "Healthcare Provider")
+        self.assertEqual(inst.type[0].coding[2].system, "http://hl7.org/fhir/organization-type")
+    
+    def testOrganization5(self):
+        inst = self.instantiate_from("organization-example-f203-bumc.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Organization instance")
+        self.implOrganization5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Organization", js["resourceType"])
+        inst2 = organization.Organization(js)
+        self.implOrganization5(inst2)
+    
+    def implOrganization5(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].city, "Blijdorp")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "apenrots 230")
+        self.assertEqual(inst.address[0].postalCode, "3056BE")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.id, "f203")
+        self.assertEqual(inst.identifier[0].system, "http://www.zorgkaartnederland.nl/")
+        self.assertEqual(inst.identifier[0].type.text, "Zorginstelling naam")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "Blijdorp MC")
+        self.assertEqual(inst.name, "Blijdorp Medisch Centrum (BUMC)")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "+31107040704")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type[0].coding[0].code, "405608006")
+        self.assertEqual(inst.type[0].coding[0].display, "Academic Medical Center")
+        self.assertEqual(inst.type[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.type[0].coding[1].code, "prov")
+        self.assertEqual(inst.type[0].coding[1].system, "http://hl7.org/fhir/organization-type")
+    
+    def testOrganization6(self):
+        inst = self.instantiate_from("organization-example-gastro.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Organization instance")
+        self.implOrganization6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Organization", js["resourceType"])
+        inst2 = organization.Organization(js)
+        self.implOrganization6(inst2)
+    
+    def implOrganization6(self, inst):
+        self.assertEqual(inst.id, "1")
+        self.assertEqual(inst.identifier[0].system, "http://www.acme.org.au/units")
+        self.assertEqual(inst.identifier[0].value, "Gastro")
+        self.assertEqual(inst.name, "Gastroenterology")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "mobile")
+        self.assertEqual(inst.telecom[0].value, "+1 555 234 3523")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "gastro at acme.org")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testOrganization7(self):
+        inst = self.instantiate_from("organization-example-good-health-care.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Organization instance")
+        self.implOrganization7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Organization", js["resourceType"])
+        inst2 = organization.Organization(js)
+        self.implOrganization7(inst2)
+    
+    def implOrganization7(self, inst):
+        self.assertEqual(inst.id, "2.16.840.1.113883.19.5")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "2.16.840.1.113883.19.5")
+        self.assertEqual(inst.name, "Good Health Clinic")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testOrganization8(self):
+        inst = self.instantiate_from("organization-example-insurer.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Organization instance")
+        self.implOrganization8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Organization", js["resourceType"])
+        inst2 = organization.Organization(js)
+        self.implOrganization8(inst2)
+    
+    def implOrganization8(self, inst):
+        self.assertEqual(inst.alias[0], "ABC Insurance")
+        self.assertEqual(inst.id, "2")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.840.1.113883.3.19.2.3")
+        self.assertEqual(inst.identifier[0].value, "666666")
+        self.assertEqual(inst.name, "XYZ Insurance")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testOrganization9(self):
+        inst = self.instantiate_from("organization-example-lab.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Organization instance")
+        self.implOrganization9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Organization", js["resourceType"])
+        inst2 = organization.Organization(js)
+        self.implOrganization9(inst2)
+    
+    def implOrganization9(self, inst):
+        self.assertEqual(inst.id, "1832473e-2fe0-452d-abe9-3cdb9879522f")
+        self.assertEqual(inst.identifier[0].system, "http://www.acme.org.au/units")
+        self.assertEqual(inst.identifier[0].value, "ClinLab")
+        self.assertEqual(inst.name, "Clinical Lab")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "+1 555 234 1234")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "contact at labs.acme.org")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testOrganization10(self):
+        inst = self.instantiate_from("organization-example-mmanu.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Organization instance")
+        self.implOrganization10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Organization", js["resourceType"])
+        inst2 = organization.Organization(js)
+        self.implOrganization10(inst2)
+    
+    def implOrganization10(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].country, "Swizterland")
+        self.assertEqual(inst.id, "mmanu")
+        self.assertEqual(inst.name, "Acme Corporation")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/parameterdefinition.py b/fhirclient/models/parameterdefinition.py
new file mode 100644
index 0000000..c4138d2
--- /dev/null
+++ b/fhirclient/models/parameterdefinition.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ParameterDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class ParameterDefinition(element.Element):
+    """ Definition of a parameter to a module.
+    
+    The parameters to the module. This collection specifies both the input and
+    output parameters. Input parameters are provided by the caller as part of
+    the $evaluate operation. Output parameters are included in the
+    GuidanceResponse.
+    """
+    
+    resource_type = "ParameterDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.documentation = None
+        """ A brief description of the parameter.
+        Type `str`. """
+        
+        self.max = None
+        """ Maximum cardinality (a number of *).
+        Type `str`. """
+        
+        self.min = None
+        """ Minimum cardinality.
+        Type `int`. """
+        
+        self.name = None
+        """ Name used to access the parameter value.
+        Type `str`. """
+        
+        self.profile = None
+        """ What profile the value is expected to be.
+        Type `FHIRReference` referencing `StructureDefinition` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ What type of value.
+        Type `str`. """
+        
+        self.use = None
+        """ in | out.
+        Type `str`. """
+        
+        super(ParameterDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ParameterDefinition, self).elementProperties()
+        js.extend([
+            ("documentation", "documentation", str, False, None, False),
+            ("max", "max", str, False, None, False),
+            ("min", "min", int, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("profile", "profile", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", str, False, None, True),
+            ("use", "use", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
diff --git a/fhirclient/models/parameters.py b/fhirclient/models/parameters.py
new file mode 100644
index 0000000..621acdb
--- /dev/null
+++ b/fhirclient/models/parameters.py
@@ -0,0 +1,366 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Parameters) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import resource
+
+class Parameters(resource.Resource):
+    """ Operation Request or Response.
+    
+    This special resource type is used to represent an operation request and
+    response (operations.html). It has no other use, and there is no RESTful
+    endpoint associated with it.
+    """
+    
+    resource_type = "Parameters"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.parameter = None
+        """ Operation Parameter.
+        List of `ParametersParameter` items (represented as `dict` in JSON). """
+        
+        super(Parameters, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Parameters, self).elementProperties()
+        js.extend([
+            ("parameter", "parameter", ParametersParameter, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ParametersParameter(backboneelement.BackboneElement):
+    """ Operation Parameter.
+    
+    A parameter passed to or received from the operation.
+    """
+    
+    resource_type = "ParametersParameter"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.name = None
+        """ Name from the definition.
+        Type `str`. """
+        
+        self.part = None
+        """ Named part of a multi-part parameter.
+        List of `ParametersParameter` items (represented as `dict` in JSON). """
+        
+        self.resource = None
+        """ If parameter is a whole resource.
+        Type `Resource` (represented as `dict` in JSON). """
+        
+        self.valueAddress = None
+        """ If parameter is a data type.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.valueAge = None
+        """ If parameter is a data type.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.valueAnnotation = None
+        """ If parameter is a data type.
+        Type `Annotation` (represented as `dict` in JSON). """
+        
+        self.valueAttachment = None
+        """ If parameter is a data type.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.valueBase64Binary = None
+        """ If parameter is a data type.
+        Type `str`. """
+        
+        self.valueBoolean = None
+        """ If parameter is a data type.
+        Type `bool`. """
+        
+        self.valueCode = None
+        """ If parameter is a data type.
+        Type `str`. """
+        
+        self.valueCodeableConcept = None
+        """ If parameter is a data type.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueCoding = None
+        """ If parameter is a data type.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.valueContactPoint = None
+        """ If parameter is a data type.
+        Type `ContactPoint` (represented as `dict` in JSON). """
+        
+        self.valueCount = None
+        """ If parameter is a data type.
+        Type `Count` (represented as `dict` in JSON). """
+        
+        self.valueDate = None
+        """ If parameter is a data type.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDateTime = None
+        """ If parameter is a data type.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDecimal = None
+        """ If parameter is a data type.
+        Type `float`. """
+        
+        self.valueDistance = None
+        """ If parameter is a data type.
+        Type `Distance` (represented as `dict` in JSON). """
+        
+        self.valueDuration = None
+        """ If parameter is a data type.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.valueHumanName = None
+        """ If parameter is a data type.
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.valueId = None
+        """ If parameter is a data type.
+        Type `str`. """
+        
+        self.valueIdentifier = None
+        """ If parameter is a data type.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.valueInstant = None
+        """ If parameter is a data type.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueInteger = None
+        """ If parameter is a data type.
+        Type `int`. """
+        
+        self.valueMarkdown = None
+        """ If parameter is a data type.
+        Type `str`. """
+        
+        self.valueMeta = None
+        """ If parameter is a data type.
+        Type `Meta` (represented as `dict` in JSON). """
+        
+        self.valueMoney = None
+        """ If parameter is a data type.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.valueOid = None
+        """ If parameter is a data type.
+        Type `str`. """
+        
+        self.valuePeriod = None
+        """ If parameter is a data type.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.valuePositiveInt = None
+        """ If parameter is a data type.
+        Type `int`. """
+        
+        self.valueQuantity = None
+        """ If parameter is a data type.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueRange = None
+        """ If parameter is a data type.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.valueRatio = None
+        """ If parameter is a data type.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.valueReference = None
+        """ If parameter is a data type.
+        Type `FHIRReference` (represented as `dict` in JSON). """
+        
+        self.valueSampledData = None
+        """ If parameter is a data type.
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.valueSignature = None
+        """ If parameter is a data type.
+        Type `Signature` (represented as `dict` in JSON). """
+        
+        self.valueString = None
+        """ If parameter is a data type.
+        Type `str`. """
+        
+        self.valueTime = None
+        """ If parameter is a data type.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueTiming = None
+        """ If parameter is a data type.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.valueUnsignedInt = None
+        """ If parameter is a data type.
+        Type `int`. """
+        
+        self.valueUri = None
+        """ If parameter is a data type.
+        Type `str`. """
+        
+        super(ParametersParameter, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ParametersParameter, self).elementProperties()
+        js.extend([
+            ("name", "name", str, False, None, True),
+            ("part", "part", ParametersParameter, True, None, False),
+            ("resource", "resource", resource.Resource, False, None, False),
+            ("valueAddress", "valueAddress", address.Address, False, "value", False),
+            ("valueAge", "valueAge", age.Age, False, "value", False),
+            ("valueAnnotation", "valueAnnotation", annotation.Annotation, False, "value", False),
+            ("valueAttachment", "valueAttachment", attachment.Attachment, False, "value", False),
+            ("valueBase64Binary", "valueBase64Binary", str, False, "value", False),
+            ("valueBoolean", "valueBoolean", bool, False, "value", False),
+            ("valueCode", "valueCode", str, False, "value", False),
+            ("valueCodeableConcept", "valueCodeableConcept", codeableconcept.CodeableConcept, False, "value", False),
+            ("valueCoding", "valueCoding", coding.Coding, False, "value", False),
+            ("valueContactPoint", "valueContactPoint", contactpoint.ContactPoint, False, "value", False),
+            ("valueCount", "valueCount", count.Count, False, "value", False),
+            ("valueDate", "valueDate", fhirdate.FHIRDate, False, "value", False),
+            ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", False),
+            ("valueDecimal", "valueDecimal", float, False, "value", False),
+            ("valueDistance", "valueDistance", distance.Distance, False, "value", False),
+            ("valueDuration", "valueDuration", duration.Duration, False, "value", False),
+            ("valueHumanName", "valueHumanName", humanname.HumanName, False, "value", False),
+            ("valueId", "valueId", str, False, "value", False),
+            ("valueIdentifier", "valueIdentifier", identifier.Identifier, False, "value", False),
+            ("valueInstant", "valueInstant", fhirdate.FHIRDate, False, "value", False),
+            ("valueInteger", "valueInteger", int, False, "value", False),
+            ("valueMarkdown", "valueMarkdown", str, False, "value", False),
+            ("valueMeta", "valueMeta", meta.Meta, False, "value", False),
+            ("valueMoney", "valueMoney", money.Money, False, "value", False),
+            ("valueOid", "valueOid", str, False, "value", False),
+            ("valuePeriod", "valuePeriod", period.Period, False, "value", False),
+            ("valuePositiveInt", "valuePositiveInt", int, False, "value", False),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", False),
+            ("valueRange", "valueRange", range.Range, False, "value", False),
+            ("valueRatio", "valueRatio", ratio.Ratio, False, "value", False),
+            ("valueReference", "valueReference", fhirreference.FHIRReference, False, "value", False),
+            ("valueSampledData", "valueSampledData", sampleddata.SampledData, False, "value", False),
+            ("valueSignature", "valueSignature", signature.Signature, False, "value", False),
+            ("valueString", "valueString", str, False, "value", False),
+            ("valueTime", "valueTime", fhirdate.FHIRDate, False, "value", False),
+            ("valueTiming", "valueTiming", timing.Timing, False, "value", False),
+            ("valueUnsignedInt", "valueUnsignedInt", int, False, "value", False),
+            ("valueUri", "valueUri", str, False, "value", False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import age
+except ImportError:
+    age = sys.modules[__package__ + '.age']
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import count
+except ImportError:
+    count = sys.modules[__package__ + '.count']
+try:
+    from . import distance
+except ImportError:
+    distance = sys.modules[__package__ + '.distance']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import humanname
+except ImportError:
+    humanname = sys.modules[__package__ + '.humanname']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import meta
+except ImportError:
+    meta = sys.modules[__package__ + '.meta']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
+try:
+    from . import sampleddata
+except ImportError:
+    sampleddata = sys.modules[__package__ + '.sampleddata']
+try:
+    from . import signature
+except ImportError:
+    signature = sys.modules[__package__ + '.signature']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/parameters_tests.py b/fhirclient/models/parameters_tests.py
new file mode 100644
index 0000000..4065a61
--- /dev/null
+++ b/fhirclient/models/parameters_tests.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import parameters
+from .fhirdate import FHIRDate
+
+
+class ParametersTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Parameters", js["resourceType"])
+        return parameters.Parameters(js)
+    
+    def testParameters1(self):
+        inst = self.instantiate_from("parameters-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Parameters instance")
+        self.implParameters1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Parameters", js["resourceType"])
+        inst2 = parameters.Parameters(js)
+        self.implParameters1(inst2)
+    
+    def implParameters1(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.parameter[0].name, "start")
+        self.assertEqual(inst.parameter[0].valueDate.date, FHIRDate("2010-01-01").date)
+        self.assertEqual(inst.parameter[0].valueDate.as_json(), "2010-01-01")
+        self.assertEqual(inst.parameter[1].name, "end")
+
diff --git a/fhirclient/models/patient.py b/fhirclient/models/patient.py
new file mode 100644
index 0000000..db45fec
--- /dev/null
+++ b/fhirclient/models/patient.py
@@ -0,0 +1,344 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Patient) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Patient(domainresource.DomainResource):
+    """ Information about an individual or animal receiving health care services.
+    
+    Demographics and other administrative information about an individual or
+    animal receiving care or other health-related services.
+    """
+    
+    resource_type = "Patient"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Whether this patient's record is in active use.
+        Type `bool`. """
+        
+        self.address = None
+        """ Addresses for the individual.
+        List of `Address` items (represented as `dict` in JSON). """
+        
+        self.animal = None
+        """ This patient is known to be an animal (non-human).
+        Type `PatientAnimal` (represented as `dict` in JSON). """
+        
+        self.birthDate = None
+        """ The date of birth for the individual.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.communication = None
+        """ A list of Languages which may be used to communicate with the
+        patient about his or her health.
+        List of `PatientCommunication` items (represented as `dict` in JSON). """
+        
+        self.contact = None
+        """ A contact party (e.g. guardian, partner, friend) for the patient.
+        List of `PatientContact` items (represented as `dict` in JSON). """
+        
+        self.deceasedBoolean = None
+        """ Indicates if the individual is deceased or not.
+        Type `bool`. """
+        
+        self.deceasedDateTime = None
+        """ Indicates if the individual is deceased or not.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.gender = None
+        """ male | female | other | unknown.
+        Type `str`. """
+        
+        self.generalPractitioner = None
+        """ Patient's nominated primary care provider.
+        List of `FHIRReference` items referencing `Organization, Practitioner` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ An identifier for this patient.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.link = None
+        """ Link to another patient resource that concerns the same actual
+        person.
+        List of `PatientLink` items (represented as `dict` in JSON). """
+        
+        self.managingOrganization = None
+        """ Organization that is the custodian of the patient record.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.maritalStatus = None
+        """ Marital (civil) status of a patient.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.multipleBirthBoolean = None
+        """ Whether patient is part of a multiple birth.
+        Type `bool`. """
+        
+        self.multipleBirthInteger = None
+        """ Whether patient is part of a multiple birth.
+        Type `int`. """
+        
+        self.name = None
+        """ A name associated with the patient.
+        List of `HumanName` items (represented as `dict` in JSON). """
+        
+        self.photo = None
+        """ Image of the patient.
+        List of `Attachment` items (represented as `dict` in JSON). """
+        
+        self.telecom = None
+        """ A contact detail for the individual.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        super(Patient, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Patient, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("address", "address", address.Address, True, None, False),
+            ("animal", "animal", PatientAnimal, False, None, False),
+            ("birthDate", "birthDate", fhirdate.FHIRDate, False, None, False),
+            ("communication", "communication", PatientCommunication, True, None, False),
+            ("contact", "contact", PatientContact, True, None, False),
+            ("deceasedBoolean", "deceasedBoolean", bool, False, "deceased", False),
+            ("deceasedDateTime", "deceasedDateTime", fhirdate.FHIRDate, False, "deceased", False),
+            ("gender", "gender", str, False, None, False),
+            ("generalPractitioner", "generalPractitioner", fhirreference.FHIRReference, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("link", "link", PatientLink, True, None, False),
+            ("managingOrganization", "managingOrganization", fhirreference.FHIRReference, False, None, False),
+            ("maritalStatus", "maritalStatus", codeableconcept.CodeableConcept, False, None, False),
+            ("multipleBirthBoolean", "multipleBirthBoolean", bool, False, "multipleBirth", False),
+            ("multipleBirthInteger", "multipleBirthInteger", int, False, "multipleBirth", False),
+            ("name", "name", humanname.HumanName, True, None, False),
+            ("photo", "photo", attachment.Attachment, True, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class PatientAnimal(backboneelement.BackboneElement):
+    """ This patient is known to be an animal (non-human).
+    
+    This patient is known to be an animal.
+    """
+    
+    resource_type = "PatientAnimal"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.breed = None
+        """ E.g. Poodle, Angus.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.genderStatus = None
+        """ E.g. Neutered, Intact.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.species = None
+        """ E.g. Dog, Cow.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(PatientAnimal, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PatientAnimal, self).elementProperties()
+        js.extend([
+            ("breed", "breed", codeableconcept.CodeableConcept, False, None, False),
+            ("genderStatus", "genderStatus", codeableconcept.CodeableConcept, False, None, False),
+            ("species", "species", codeableconcept.CodeableConcept, False, None, True),
+        ])
+        return js
+
+
+class PatientCommunication(backboneelement.BackboneElement):
+    """ A list of Languages which may be used to communicate with the patient about
+    his or her health.
+    
+    Languages which may be used to communicate with the patient about his or
+    her health.
+    """
+    
+    resource_type = "PatientCommunication"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.language = None
+        """ The language which can be used to communicate with the patient
+        about his or her health.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.preferred = None
+        """ Language preference indicator.
+        Type `bool`. """
+        
+        super(PatientCommunication, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PatientCommunication, self).elementProperties()
+        js.extend([
+            ("language", "language", codeableconcept.CodeableConcept, False, None, True),
+            ("preferred", "preferred", bool, False, None, False),
+        ])
+        return js
+
+
+class PatientContact(backboneelement.BackboneElement):
+    """ A contact party (e.g. guardian, partner, friend) for the patient.
+    """
+    
+    resource_type = "PatientContact"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.address = None
+        """ Address for the contact person.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.gender = None
+        """ male | female | other | unknown.
+        Type `str`. """
+        
+        self.name = None
+        """ A name associated with the contact person.
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Organization that is associated with the contact.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ The period during which this contact person or organization is
+        valid to be contacted relating to this patient.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.relationship = None
+        """ The kind of relationship.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.telecom = None
+        """ A contact detail for the person.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        super(PatientContact, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PatientContact, self).elementProperties()
+        js.extend([
+            ("address", "address", address.Address, False, None, False),
+            ("gender", "gender", str, False, None, False),
+            ("name", "name", humanname.HumanName, False, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("relationship", "relationship", codeableconcept.CodeableConcept, True, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+        ])
+        return js
+
+
+class PatientLink(backboneelement.BackboneElement):
+    """ Link to another patient resource that concerns the same actual person.
+    
+    Link to another patient resource that concerns the same actual patient.
+    """
+    
+    resource_type = "PatientLink"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.other = None
+        """ The other patient or related person resource that the link refers
+        to.
+        Type `FHIRReference` referencing `Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ replaced-by | replaces | refer | seealso - type of link.
+        Type `str`. """
+        
+        super(PatientLink, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PatientLink, self).elementProperties()
+        js.extend([
+            ("other", "other", fhirreference.FHIRReference, False, None, True),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import humanname
+except ImportError:
+    humanname = sys.modules[__package__ + '.humanname']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/patient_tests.py b/fhirclient/models/patient_tests.py
new file mode 100644
index 0000000..4018541
--- /dev/null
+++ b/fhirclient/models/patient_tests.py
@@ -0,0 +1,393 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import patient
+from .fhirdate import FHIRDate
+
+
+class PatientTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Patient", js["resourceType"])
+        return patient.Patient(js)
+    
+    def testPatient1(self):
+        inst = self.instantiate_from("patient-example-a.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Patient instance")
+        self.implPatient1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Patient", js["resourceType"])
+        inst2 = patient.Patient(js)
+        self.implPatient1(inst2)
+    
+    def implPatient1(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.contact[0].relationship[0].coding[0].code, "E")
+        self.assertEqual(inst.contact[0].relationship[0].coding[0].system, "http://hl7.org/fhir/v2/0131")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "pat1")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:0.1.2.3.4.5.6.7")
+        self.assertEqual(inst.identifier[0].type.coding[0].code, "MR")
+        self.assertEqual(inst.identifier[0].type.coding[0].system, "http://hl7.org/fhir/v2/0203")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "654321")
+        self.assertEqual(inst.link[0].type, "seealso")
+        self.assertEqual(inst.name[0].family, "Donald")
+        self.assertEqual(inst.name[0].given[0], "Duck")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.photo[0].contentType, "image/gif")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPatient2(self):
+        inst = self.instantiate_from("patient-example-animal.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Patient instance")
+        self.implPatient2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Patient", js["resourceType"])
+        inst2 = patient.Patient(js)
+        self.implPatient2(inst2)
+    
+    def implPatient2(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.animal.breed.coding[0].code, "58108001")
+        self.assertEqual(inst.animal.breed.coding[0].display, "Golden retriever")
+        self.assertEqual(inst.animal.breed.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.animal.breed.coding[1].code, "gret")
+        self.assertEqual(inst.animal.breed.coding[1].display, "Golden Retriever")
+        self.assertEqual(inst.animal.breed.coding[1].system, "http://hl7.org/fhir/animal-breed")
+        self.assertEqual(inst.animal.genderStatus.coding[0].code, "neutered")
+        self.assertEqual(inst.animal.genderStatus.coding[0].system, "http://hl7.org/fhir/animal-genderstatus")
+        self.assertEqual(inst.animal.species.coding[0].code, "canislf")
+        self.assertEqual(inst.animal.species.coding[0].display, "Dog")
+        self.assertEqual(inst.animal.species.coding[0].system, "http://hl7.org/fhir/animal-species")
+        self.assertEqual(inst.birthDate.date, FHIRDate("2010-03-23").date)
+        self.assertEqual(inst.birthDate.as_json(), "2010-03-23")
+        self.assertEqual(inst.contact[0].name.family, "Chalmers")
+        self.assertEqual(inst.contact[0].name.given[0], "Peter")
+        self.assertEqual(inst.contact[0].name.given[1], "James")
+        self.assertEqual(inst.contact[0].relationship[0].coding[0].code, "C")
+        self.assertEqual(inst.contact[0].relationship[0].coding[0].system, "http://hl7.org/fhir/v2/0131")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "(03) 5555 6473")
+        self.assertEqual(inst.gender, "female")
+        self.assertEqual(inst.id, "animal")
+        self.assertEqual(inst.identifier[0].period.start.date, FHIRDate("2010-05-31").date)
+        self.assertEqual(inst.identifier[0].period.start.as_json(), "2010-05-31")
+        self.assertEqual(inst.identifier[0].system, "http://www.maroondah.vic.gov.au/AnimalRegFees.aspx")
+        self.assertEqual(inst.identifier[0].type.text, "Dog Tag")
+        self.assertEqual(inst.identifier[0].value, "1234123")
+        self.assertEqual(inst.name[0].given[0], "Kenzi")
+        self.assertEqual(inst.name[0].use, "usual")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPatient3(self):
+        inst = self.instantiate_from("patient-example-b.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Patient instance")
+        self.implPatient3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Patient", js["resourceType"])
+        inst2 = patient.Patient(js)
+        self.implPatient3(inst2)
+    
+    def implPatient3(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.gender, "other")
+        self.assertEqual(inst.id, "pat2")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:0.1.2.3.4.5.6.7")
+        self.assertEqual(inst.identifier[0].type.coding[0].code, "MR")
+        self.assertEqual(inst.identifier[0].type.coding[0].system, "http://hl7.org/fhir/v2/0203")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "123456")
+        self.assertEqual(inst.link[0].type, "seealso")
+        self.assertEqual(inst.name[0].family, "Donald")
+        self.assertEqual(inst.name[0].given[0], "Duck")
+        self.assertEqual(inst.name[0].given[1], "D")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.photo[0].contentType, "image/gif")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPatient4(self):
+        inst = self.instantiate_from("patient-example-c.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Patient instance")
+        self.implPatient4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Patient", js["resourceType"])
+        inst2 = patient.Patient(js)
+        self.implPatient4(inst2)
+    
+    def implPatient4(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.birthDate.date, FHIRDate("1982-01-23").date)
+        self.assertEqual(inst.birthDate.as_json(), "1982-01-23")
+        self.assertEqual(inst.deceasedDateTime.date, FHIRDate("2015-02-14T13:42:00+10:00").date)
+        self.assertEqual(inst.deceasedDateTime.as_json(), "2015-02-14T13:42:00+10:00")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "pat3")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:0.1.2.3.4.5.6.7")
+        self.assertEqual(inst.identifier[0].type.coding[0].code, "MR")
+        self.assertEqual(inst.identifier[0].type.coding[0].system, "http://hl7.org/fhir/v2/0203")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "123457")
+        self.assertEqual(inst.name[0].family, "Notsowell")
+        self.assertEqual(inst.name[0].given[0], "Simon")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPatient5(self):
+        inst = self.instantiate_from("patient-example-chinese.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Patient instance")
+        self.implPatient5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Patient", js["resourceType"])
+        inst2 = patient.Patient(js)
+        self.implPatient5(inst2)
+    
+    def implPatient5(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].city, "上海市")
+        self.assertEqual(inst.address[0].district, "黄埔区")
+        self.assertEqual(inst.address[0].line[0], "马当路190号")
+        self.assertEqual(inst.address[0].period.start.date, FHIRDate("1974-12-25").date)
+        self.assertEqual(inst.address[0].period.start.as_json(), "1974-12-25")
+        self.assertEqual(inst.address[0].postalCode, "200000")
+        self.assertEqual(inst.address[0].type, "both")
+        self.assertEqual(inst.address[0].use, "home")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1974-12-25").date)
+        self.assertEqual(inst.birthDate.as_json(), "1974-12-25")
+        self.assertFalse(inst.deceasedBoolean)
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "ch-example")
+        self.assertEqual(inst.identifier[0].period.start.date, FHIRDate("2001-05-06").date)
+        self.assertEqual(inst.identifier[0].period.start.as_json(), "2001-05-06")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:1.2.36.146.595.217.0.1")
+        self.assertEqual(inst.identifier[0].type.coding[0].code, "MR")
+        self.assertEqual(inst.identifier[0].type.coding[0].system, "http://hl7.org/fhir/v2/0203")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "3112219680806371X")
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2016-05-16T00:55:52Z").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2016-05-16T00:55:52Z")
+        self.assertEqual(inst.meta.versionId, "1")
+        self.assertEqual(inst.name[0].text, "张无忌")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.telecom[0].use, "home")
+        self.assertEqual(inst.telecom[1].system, "phone")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "18337177888")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPatient6(self):
+        inst = self.instantiate_from("patient-example-d.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Patient instance")
+        self.implPatient6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Patient", js["resourceType"])
+        inst2 = patient.Patient(js)
+        self.implPatient6(inst2)
+    
+    def implPatient6(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.birthDate.date, FHIRDate("1982-08-02").date)
+        self.assertEqual(inst.birthDate.as_json(), "1982-08-02")
+        self.assertTrue(inst.deceasedBoolean)
+        self.assertEqual(inst.gender, "female")
+        self.assertEqual(inst.id, "pat4")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:0.1.2.3.4.5.6.7")
+        self.assertEqual(inst.identifier[0].type.coding[0].code, "MR")
+        self.assertEqual(inst.identifier[0].type.coding[0].system, "http://hl7.org/fhir/v2/0203")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "123458")
+        self.assertEqual(inst.name[0].family, "Notsowell")
+        self.assertEqual(inst.name[0].given[0], "Sandy")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPatient7(self):
+        inst = self.instantiate_from("patient-example-dicom.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Patient instance")
+        self.implPatient7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Patient", js["resourceType"])
+        inst2 = patient.Patient(js)
+        self.implPatient7(inst2)
+    
+    def implPatient7(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.extension[0].url, "http://nema.org/fhir/extensions#0010:1010")
+        self.assertEqual(inst.extension[0].valueQuantity.unit, "Y")
+        self.assertEqual(inst.extension[0].valueQuantity.value, 56)
+        self.assertEqual(inst.extension[1].url, "http://nema.org/fhir/extensions#0010:1020")
+        self.assertEqual(inst.extension[1].valueQuantity.unit, "m")
+        self.assertEqual(inst.extension[1].valueQuantity.value, 1.83)
+        self.assertEqual(inst.extension[2].url, "http://nema.org/fhir/extensions#0010:1030")
+        self.assertEqual(inst.extension[2].valueQuantity.unit, "kg")
+        self.assertEqual(inst.extension[2].valueQuantity.value, 72.58)
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "dicom")
+        self.assertEqual(inst.identifier[0].system, "http://nema.org/examples/patients")
+        self.assertEqual(inst.identifier[0].value, "MINT1234")
+        self.assertEqual(inst.name[0].family, "MINT_TEST")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPatient8(self):
+        inst = self.instantiate_from("patient-example-f001-pieter.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Patient instance")
+        self.implPatient8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Patient", js["resourceType"])
+        inst2 = patient.Patient(js)
+        self.implPatient8(inst2)
+    
+    def implPatient8(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].city, "Amsterdam")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Van Egmondkade 23")
+        self.assertEqual(inst.address[0].postalCode, "1024 RJ")
+        self.assertEqual(inst.address[0].use, "home")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1944-11-17").date)
+        self.assertEqual(inst.birthDate.as_json(), "1944-11-17")
+        self.assertEqual(inst.communication[0].language.coding[0].code, "nl")
+        self.assertEqual(inst.communication[0].language.coding[0].display, "Dutch")
+        self.assertEqual(inst.communication[0].language.coding[0].system, "urn:ietf:bcp:47")
+        self.assertEqual(inst.communication[0].language.text, "Nederlands")
+        self.assertTrue(inst.communication[0].preferred)
+        self.assertEqual(inst.contact[0].name.family, "Abels")
+        self.assertEqual(inst.contact[0].name.given[0], "Sarah")
+        self.assertEqual(inst.contact[0].name.use, "usual")
+        self.assertEqual(inst.contact[0].relationship[0].coding[0].code, "C")
+        self.assertEqual(inst.contact[0].relationship[0].coding[0].system, "http://hl7.org/fhir/v2/0131")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].use, "mobile")
+        self.assertEqual(inst.contact[0].telecom[0].value, "0690383372")
+        self.assertFalse(inst.deceasedBoolean)
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "f001")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "738472983")
+        self.assertEqual(inst.identifier[1].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[1].use, "usual")
+        self.assertEqual(inst.maritalStatus.coding[0].code, "M")
+        self.assertEqual(inst.maritalStatus.coding[0].display, "Married")
+        self.assertEqual(inst.maritalStatus.coding[0].system, "http://hl7.org/fhir/v3/MaritalStatus")
+        self.assertEqual(inst.maritalStatus.text, "Getrouwd")
+        self.assertTrue(inst.multipleBirthBoolean)
+        self.assertEqual(inst.name[0].family, "van de Heuvel")
+        self.assertEqual(inst.name[0].given[0], "Pieter")
+        self.assertEqual(inst.name[0].suffix[0], "MSc")
+        self.assertEqual(inst.name[0].use, "usual")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "mobile")
+        self.assertEqual(inst.telecom[0].value, "0648352638")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "home")
+        self.assertEqual(inst.telecom[1].value, "p.heuvel at gmail.com")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPatient9(self):
+        inst = self.instantiate_from("patient-example-f201-roel.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Patient instance")
+        self.implPatient9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Patient", js["resourceType"])
+        inst2 = patient.Patient(js)
+        self.implPatient9(inst2)
+    
+    def implPatient9(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].city, "Amsterdam")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Bos en Lommerplein 280")
+        self.assertEqual(inst.address[0].postalCode, "1055RW")
+        self.assertEqual(inst.address[0].use, "home")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1960-03-13").date)
+        self.assertEqual(inst.birthDate.as_json(), "1960-03-13")
+        self.assertEqual(inst.communication[0].language.coding[0].code, "nl-NL")
+        self.assertEqual(inst.communication[0].language.coding[0].display, "Dutch")
+        self.assertEqual(inst.communication[0].language.coding[0].system, "urn:ietf:bcp:47")
+        self.assertTrue(inst.communication[0].preferred)
+        self.assertEqual(inst.contact[0].name.text, "Ariadne Bor-Jansma")
+        self.assertEqual(inst.contact[0].name.use, "usual")
+        self.assertEqual(inst.contact[0].relationship[0].coding[0].code, "127850001")
+        self.assertEqual(inst.contact[0].relationship[0].coding[0].display, "Wife")
+        self.assertEqual(inst.contact[0].relationship[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.contact[0].relationship[0].coding[1].code, "N")
+        self.assertEqual(inst.contact[0].relationship[0].coding[1].system, "http://hl7.org/fhir/v2/0131")
+        self.assertEqual(inst.contact[0].relationship[0].coding[2].code, "WIFE")
+        self.assertEqual(inst.contact[0].relationship[0].coding[2].system, "http://hl7.org/fhir/v3/RoleCode")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].use, "home")
+        self.assertEqual(inst.contact[0].telecom[0].value, "+31201234567")
+        self.assertFalse(inst.deceasedBoolean)
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[0].type.text, "BSN")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "123456789")
+        self.assertEqual(inst.identifier[1].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[1].type.text, "BSN")
+        self.assertEqual(inst.identifier[1].use, "official")
+        self.assertEqual(inst.identifier[1].value, "123456789")
+        self.assertEqual(inst.maritalStatus.coding[0].code, "36629006")
+        self.assertEqual(inst.maritalStatus.coding[0].display, "Legally married")
+        self.assertEqual(inst.maritalStatus.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.maritalStatus.coding[1].code, "M")
+        self.assertEqual(inst.maritalStatus.coding[1].system, "http://hl7.org/fhir/v3/MaritalStatus")
+        self.assertFalse(inst.multipleBirthBoolean)
+        self.assertEqual(inst.name[0].family, "Bor")
+        self.assertEqual(inst.name[0].given[0], "Roelof Olaf")
+        self.assertEqual(inst.name[0].prefix[0], "Drs.")
+        self.assertEqual(inst.name[0].suffix[0], "PDEng.")
+        self.assertEqual(inst.name[0].text, "Roel")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.photo[0].contentType, "image/jpeg")
+        self.assertEqual(inst.photo[0].url, "Binary/f006")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "mobile")
+        self.assertEqual(inst.telecom[0].value, "+31612345678")
+        self.assertEqual(inst.telecom[1].system, "phone")
+        self.assertEqual(inst.telecom[1].use, "home")
+        self.assertEqual(inst.telecom[1].value, "+31201234567")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPatient10(self):
+        inst = self.instantiate_from("patient-example-ihe-pcd.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Patient instance")
+        self.implPatient10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Patient", js["resourceType"])
+        inst2 = patient.Patient(js)
+        self.implPatient10(inst2)
+    
+    def implPatient10(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.id, "ihe-pcd")
+        self.assertEqual(inst.identifier[0].type.text, "Internal Identifier")
+        self.assertEqual(inst.identifier[0].value, "AB60001")
+        self.assertEqual(inst.name[0].family, "BROOKS")
+        self.assertEqual(inst.name[0].given[0], "ALBERT")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Albert Brooks, Id: AB60001</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/paymentnotice.py b/fhirclient/models/paymentnotice.py
new file mode 100644
index 0000000..ba687a8
--- /dev/null
+++ b/fhirclient/models/paymentnotice.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/PaymentNotice) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class PaymentNotice(domainresource.DomainResource):
+    """ PaymentNotice request.
+    
+    This resource provides the status of the payment for goods and services
+    rendered, and the request and response resource references.
+    """
+    
+    resource_type = "PaymentNotice"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Responsible organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.paymentStatus = None
+        """ Whether payment has been sent or cleared.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.provider = None
+        """ Responsible practitioner.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.request = None
+        """ Request reference.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.response = None
+        """ Response reference.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        self.statusDate = None
+        """ Payment or clearing date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.target = None
+        """ Insurer or Regulatory body.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(PaymentNotice, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PaymentNotice, self).elementProperties()
+        js.extend([
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("paymentStatus", "paymentStatus", codeableconcept.CodeableConcept, False, None, False),
+            ("provider", "provider", fhirreference.FHIRReference, False, None, False),
+            ("request", "request", fhirreference.FHIRReference, False, None, False),
+            ("response", "response", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("statusDate", "statusDate", fhirdate.FHIRDate, False, None, False),
+            ("target", "target", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/paymentnotice_tests.py b/fhirclient/models/paymentnotice_tests.py
new file mode 100644
index 0000000..62f4f92
--- /dev/null
+++ b/fhirclient/models/paymentnotice_tests.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import paymentnotice
+from .fhirdate import FHIRDate
+
+
+class PaymentNoticeTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("PaymentNotice", js["resourceType"])
+        return paymentnotice.PaymentNotice(js)
+    
+    def testPaymentNotice1(self):
+        inst = self.instantiate_from("paymentnotice-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a PaymentNotice instance")
+        self.implPaymentNotice1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("PaymentNotice", js["resourceType"])
+        inst2 = paymentnotice.PaymentNotice(js)
+        self.implPaymentNotice1(inst2)
+    
+    def implPaymentNotice1(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "77654")
+        self.assertEqual(inst.identifier[0].system, "http://benefitsinc.com/paymentnotice")
+        self.assertEqual(inst.identifier[0].value, "776543")
+        self.assertEqual(inst.paymentStatus.coding[0].code, "paid")
+        self.assertEqual(inst.paymentStatus.coding[0].system, "http://hl7.org/fhir/paymentstatus")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.statusDate.date, FHIRDate("2014-08-15").date)
+        self.assertEqual(inst.statusDate.as_json(), "2014-08-15")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the PaymentNotice</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/paymentreconciliation.py b/fhirclient/models/paymentreconciliation.py
new file mode 100644
index 0000000..26bcba1
--- /dev/null
+++ b/fhirclient/models/paymentreconciliation.py
@@ -0,0 +1,227 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/PaymentReconciliation) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class PaymentReconciliation(domainresource.DomainResource):
+    """ PaymentReconciliation resource.
+    
+    This resource provides payment details and claim references supporting a
+    bulk payment.
+    """
+    
+    resource_type = "PaymentReconciliation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.detail = None
+        """ List of settlements.
+        List of `PaymentReconciliationDetail` items (represented as `dict` in JSON). """
+        
+        self.disposition = None
+        """ Disposition Message.
+        Type `str`. """
+        
+        self.form = None
+        """ Printed Form Identifier.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Insurer.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.outcome = None
+        """ complete | error | partial.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Period covered.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.processNote = None
+        """ Processing comments.
+        List of `PaymentReconciliationProcessNote` items (represented as `dict` in JSON). """
+        
+        self.request = None
+        """ Claim reference.
+        Type `FHIRReference` referencing `ProcessRequest` (represented as `dict` in JSON). """
+        
+        self.requestOrganization = None
+        """ Responsible organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.requestProvider = None
+        """ Responsible practitioner.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        self.total = None
+        """ Total amount of Payment.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        super(PaymentReconciliation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PaymentReconciliation, self).elementProperties()
+        js.extend([
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("detail", "detail", PaymentReconciliationDetail, True, None, False),
+            ("disposition", "disposition", str, False, None, False),
+            ("form", "form", codeableconcept.CodeableConcept, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("outcome", "outcome", codeableconcept.CodeableConcept, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("processNote", "processNote", PaymentReconciliationProcessNote, True, None, False),
+            ("request", "request", fhirreference.FHIRReference, False, None, False),
+            ("requestOrganization", "requestOrganization", fhirreference.FHIRReference, False, None, False),
+            ("requestProvider", "requestProvider", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("total", "total", money.Money, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class PaymentReconciliationDetail(backboneelement.BackboneElement):
+    """ List of settlements.
+    
+    List of individual settlement amounts and the corresponding transaction.
+    """
+    
+    resource_type = "PaymentReconciliationDetail"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.amount = None
+        """ Amount being paid.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Invoice date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.payee = None
+        """ Organization which is receiving the payment.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.request = None
+        """ Claim.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.response = None
+        """ Claim Response.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.submitter = None
+        """ Organization which submitted the claim.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Type code.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(PaymentReconciliationDetail, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PaymentReconciliationDetail, self).elementProperties()
+        js.extend([
+            ("amount", "amount", money.Money, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("payee", "payee", fhirreference.FHIRReference, False, None, False),
+            ("request", "request", fhirreference.FHIRReference, False, None, False),
+            ("response", "response", fhirreference.FHIRReference, False, None, False),
+            ("submitter", "submitter", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+        ])
+        return js
+
+
+class PaymentReconciliationProcessNote(backboneelement.BackboneElement):
+    """ Processing comments.
+    
+    Suite of notes.
+    """
+    
+    resource_type = "PaymentReconciliationProcessNote"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.text = None
+        """ Comment on the processing.
+        Type `str`. """
+        
+        self.type = None
+        """ display | print | printoper.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(PaymentReconciliationProcessNote, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PaymentReconciliationProcessNote, self).elementProperties()
+        js.extend([
+            ("text", "text", str, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/paymentreconciliation_tests.py b/fhirclient/models/paymentreconciliation_tests.py
new file mode 100644
index 0000000..57a2269
--- /dev/null
+++ b/fhirclient/models/paymentreconciliation_tests.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import paymentreconciliation
+from .fhirdate import FHIRDate
+
+
+class PaymentReconciliationTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("PaymentReconciliation", js["resourceType"])
+        return paymentreconciliation.PaymentReconciliation(js)
+    
+    def testPaymentReconciliation1(self):
+        inst = self.instantiate_from("paymentreconciliation-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a PaymentReconciliation instance")
+        self.implPaymentReconciliation1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("PaymentReconciliation", js["resourceType"])
+        inst2 = paymentreconciliation.PaymentReconciliation(js)
+        self.implPaymentReconciliation1(inst2)
+    
+    def implPaymentReconciliation1(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.detail[0].amount.code, "USD")
+        self.assertEqual(inst.detail[0].amount.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.detail[0].amount.value, 1000.0)
+        self.assertEqual(inst.detail[0].date.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.detail[0].date.as_json(), "2014-08-16")
+        self.assertEqual(inst.detail[0].type.coding[0].code, "payment")
+        self.assertEqual(inst.detail[0].type.coding[0].system, "http://hl7.org/fhir/payment-type")
+        self.assertEqual(inst.detail[1].amount.code, "USD")
+        self.assertEqual(inst.detail[1].amount.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.detail[1].amount.value, 4000.0)
+        self.assertEqual(inst.detail[1].date.date, FHIRDate("2014-08-12").date)
+        self.assertEqual(inst.detail[1].date.as_json(), "2014-08-12")
+        self.assertEqual(inst.detail[1].type.coding[0].code, "payment")
+        self.assertEqual(inst.detail[1].type.coding[0].system, "http://hl7.org/fhir/payment-type")
+        self.assertEqual(inst.detail[2].amount.code, "USD")
+        self.assertEqual(inst.detail[2].amount.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.detail[2].amount.value, -1500.0)
+        self.assertEqual(inst.detail[2].date.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.detail[2].date.as_json(), "2014-08-16")
+        self.assertEqual(inst.detail[2].type.coding[0].code, "advance")
+        self.assertEqual(inst.detail[2].type.coding[0].system, "http://hl7.org/fhir/payment-type")
+        self.assertEqual(inst.disposition, "2014 August mid-month settlement.")
+        self.assertEqual(inst.form.coding[0].code, "PAYREC/2016/01B")
+        self.assertEqual(inst.form.coding[0].system, "http://ncforms.org/formid")
+        self.assertEqual(inst.id, "ER2500")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/enrollmentresponse")
+        self.assertEqual(inst.identifier[0].value, "781234")
+        self.assertEqual(inst.outcome.coding[0].code, "complete")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/remittance-outcome")
+        self.assertEqual(inst.period.end.date, FHIRDate("2014-08-31").date)
+        self.assertEqual(inst.period.end.as_json(), "2014-08-31")
+        self.assertEqual(inst.period.start.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.period.start.as_json(), "2014-08-16")
+        self.assertEqual(inst.processNote[0].text, "Due to the year end holiday the cutoff for submissions for December will be the 28th.")
+        self.assertEqual(inst.processNote[0].type.coding[0].code, "display")
+        self.assertEqual(inst.processNote[0].type.coding[0].system, "http://hl7.org/fhir/note-type")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the PaymentReconciliation</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.total.code, "USD")
+        self.assertEqual(inst.total.system, "urn:iso:std:iso:4217")
+        self.assertEqual(inst.total.value, 3500.0)
+
diff --git a/fhirclient/models/period.py b/fhirclient/models/period.py
new file mode 100644
index 0000000..e643a40
--- /dev/null
+++ b/fhirclient/models/period.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Period) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Period(element.Element):
+    """ Time range defined by start and end date/time.
+    
+    A time period defined by a start and end date and optionally time.
+    """
+    
+    resource_type = "Period"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.end = None
+        """ End time with inclusive boundary, if not ongoing.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.start = None
+        """ Starting time with inclusive boundary.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(Period, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Period, self).elementProperties()
+        js.extend([
+            ("end", "end", fhirdate.FHIRDate, False, None, False),
+            ("start", "start", fhirdate.FHIRDate, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
diff --git a/fhirclient/models/person.py b/fhirclient/models/person.py
new file mode 100644
index 0000000..d31b555
--- /dev/null
+++ b/fhirclient/models/person.py
@@ -0,0 +1,149 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Person) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Person(domainresource.DomainResource):
+    """ A generic person record.
+    
+    Demographics and administrative information about a person independent of a
+    specific health-related context.
+    """
+    
+    resource_type = "Person"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ This person's record is in active use.
+        Type `bool`. """
+        
+        self.address = None
+        """ One or more addresses for the person.
+        List of `Address` items (represented as `dict` in JSON). """
+        
+        self.birthDate = None
+        """ The date on which the person was born.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.gender = None
+        """ male | female | other | unknown.
+        Type `str`. """
+        
+        self.identifier = None
+        """ A human identifier for this person.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.link = None
+        """ Link to a resource that concerns the same actual person.
+        List of `PersonLink` items (represented as `dict` in JSON). """
+        
+        self.managingOrganization = None
+        """ The organization that is the custodian of the person record.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ A name associated with the person.
+        List of `HumanName` items (represented as `dict` in JSON). """
+        
+        self.photo = None
+        """ Image of the person.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.telecom = None
+        """ A contact detail for the person.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        super(Person, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Person, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("address", "address", address.Address, True, None, False),
+            ("birthDate", "birthDate", fhirdate.FHIRDate, False, None, False),
+            ("gender", "gender", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("link", "link", PersonLink, True, None, False),
+            ("managingOrganization", "managingOrganization", fhirreference.FHIRReference, False, None, False),
+            ("name", "name", humanname.HumanName, True, None, False),
+            ("photo", "photo", attachment.Attachment, False, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class PersonLink(backboneelement.BackboneElement):
+    """ Link to a resource that concerns the same actual person.
+    """
+    
+    resource_type = "PersonLink"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.assurance = None
+        """ level1 | level2 | level3 | level4.
+        Type `str`. """
+        
+        self.target = None
+        """ The resource to which this actual person is associated.
+        Type `FHIRReference` referencing `Patient, Practitioner, RelatedPerson, Person` (represented as `dict` in JSON). """
+        
+        super(PersonLink, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PersonLink, self).elementProperties()
+        js.extend([
+            ("assurance", "assurance", str, False, None, False),
+            ("target", "target", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import humanname
+except ImportError:
+    humanname = sys.modules[__package__ + '.humanname']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/person_tests.py b/fhirclient/models/person_tests.py
new file mode 100644
index 0000000..b0b5936
--- /dev/null
+++ b/fhirclient/models/person_tests.py
@@ -0,0 +1,90 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import person
+from .fhirdate import FHIRDate
+
+
+class PersonTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Person", js["resourceType"])
+        return person.Person(js)
+    
+    def testPerson1(self):
+        inst = self.instantiate_from("person-example-f002-ariadne.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Person instance")
+        self.implPerson1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Person", js["resourceType"])
+        inst2 = person.Person(js)
+        self.implPerson1(inst2)
+    
+    def implPerson1(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.birthDate.date, FHIRDate("1963").date)
+        self.assertEqual(inst.birthDate.as_json(), "1963")
+        self.assertEqual(inst.gender, "female")
+        self.assertEqual(inst.id, "f002")
+        self.assertEqual(inst.name[0].text, "Ariadne Bor-Jansma")
+        self.assertEqual(inst.name[0].use, "usual")
+        self.assertEqual(inst.photo.contentType, "image/jpeg")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "home")
+        self.assertEqual(inst.telecom[0].value, "+31201234567")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPerson2(self):
+        inst = self.instantiate_from("person-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Person instance")
+        self.implPerson2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Person", js["resourceType"])
+        inst2 = person.Person(js)
+        self.implPerson2(inst2)
+    
+    def implPerson2(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].city, "PleasantVille")
+        self.assertEqual(inst.address[0].line[0], "534 Erewhon St")
+        self.assertEqual(inst.address[0].postalCode, "3999")
+        self.assertEqual(inst.address[0].state, "Vic")
+        self.assertEqual(inst.address[0].use, "home")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1974-12-25").date)
+        self.assertEqual(inst.birthDate.as_json(), "1974-12-25")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].period.start.date, FHIRDate("2001-05-06").date)
+        self.assertEqual(inst.identifier[0].period.start.as_json(), "2001-05-06")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:1.2.36.146.595.217.0.1")
+        self.assertEqual(inst.identifier[0].type.coding[0].code, "MR")
+        self.assertEqual(inst.identifier[0].type.coding[0].system, "http://hl7.org/fhir/v2/0203")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.name[0].family, "Chalmers")
+        self.assertEqual(inst.name[0].given[0], "Peter")
+        self.assertEqual(inst.name[0].given[1], "James")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.name[1].given[0], "Jim")
+        self.assertEqual(inst.name[1].use, "usual")
+        self.assertEqual(inst.telecom[0].use, "home")
+        self.assertEqual(inst.telecom[1].system, "phone")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "(03) 5555 6473")
+        self.assertEqual(inst.telecom[2].system, "email")
+        self.assertEqual(inst.telecom[2].use, "home")
+        self.assertEqual(inst.telecom[2].value, "Jim at example.org")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/plandefinition.py b/fhirclient/models/plandefinition.py
new file mode 100644
index 0000000..c0e2094
--- /dev/null
+++ b/fhirclient/models/plandefinition.py
@@ -0,0 +1,696 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/PlanDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class PlanDefinition(domainresource.DomainResource):
+    """ The definition of a plan for a series of actions, independent of any
+    specific patient or context.
+    
+    This resource allows for the definition of various types of plans as a
+    sharable, consumable, and executable artifact. The resource is general
+    enough to support the description of a broad range of clinical artifacts
+    such as clinical decision support rules, order sets and protocols.
+    """
+    
+    resource_type = "PlanDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ Action defined by the plan.
+        List of `PlanDefinitionAction` items (represented as `dict` in JSON). """
+        
+        self.approvalDate = None
+        """ When the plan definition was approved by publisher.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.contributor = None
+        """ A content contributor.
+        List of `Contributor` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the plan definition.
+        Type `str`. """
+        
+        self.effectivePeriod = None
+        """ When the plan definition is expected to be used.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.goal = None
+        """ What the plan is trying to accomplish.
+        List of `PlanDefinitionGoal` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Additional identifier for the plan definition.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for plan definition (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.lastReviewDate = None
+        """ When the plan definition was last reviewed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.library = None
+        """ Logic used by the plan definition.
+        List of `FHIRReference` items referencing `Library` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this plan definition (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this plan definition is defined.
+        Type `str`. """
+        
+        self.relatedArtifact = None
+        """ Related artifacts for the asset.
+        List of `RelatedArtifact` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this plan definition (human friendly).
+        Type `str`. """
+        
+        self.topic = None
+        """ E.g. Education, Treatment, Assessment, etc.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ order-set | protocol | eca-rule.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.url = None
+        """ Logical URI to reference this plan definition (globally unique).
+        Type `str`. """
+        
+        self.usage = None
+        """ Describes the clinical usage of the asset.
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the plan definition.
+        Type `str`. """
+        
+        super(PlanDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PlanDefinition, self).elementProperties()
+        js.extend([
+            ("action", "action", PlanDefinitionAction, True, None, False),
+            ("approvalDate", "approvalDate", fhirdate.FHIRDate, False, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("contributor", "contributor", contributor.Contributor, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("goal", "goal", PlanDefinitionGoal, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("lastReviewDate", "lastReviewDate", fhirdate.FHIRDate, False, None, False),
+            ("library", "library", fhirreference.FHIRReference, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("relatedArtifact", "relatedArtifact", relatedartifact.RelatedArtifact, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("topic", "topic", codeableconcept.CodeableConcept, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("usage", "usage", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class PlanDefinitionAction(backboneelement.BackboneElement):
+    """ Action defined by the plan.
+    
+    An action to be taken as part of the plan.
+    """
+    
+    resource_type = "PlanDefinitionAction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ A sub-action.
+        List of `PlanDefinitionAction` items (represented as `dict` in JSON). """
+        
+        self.cardinalityBehavior = None
+        """ single | multiple.
+        Type `str`. """
+        
+        self.code = None
+        """ Code representing the meaning of the action or sub-actions.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.condition = None
+        """ Whether or not the action is applicable.
+        List of `PlanDefinitionActionCondition` items (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Description of the activity to be performed.
+        Type `FHIRReference` referencing `ActivityDefinition, PlanDefinition` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Short description of the action.
+        Type `str`. """
+        
+        self.documentation = None
+        """ Supporting documentation for the intended performer of the action.
+        List of `RelatedArtifact` items (represented as `dict` in JSON). """
+        
+        self.dynamicValue = None
+        """ Dynamic aspects of the definition.
+        List of `PlanDefinitionActionDynamicValue` items (represented as `dict` in JSON). """
+        
+        self.goalId = None
+        """ What goals this action supports.
+        List of `str` items. """
+        
+        self.groupingBehavior = None
+        """ visual-group | logical-group | sentence-group.
+        Type `str`. """
+        
+        self.input = None
+        """ Input data requirements.
+        List of `DataRequirement` items (represented as `dict` in JSON). """
+        
+        self.label = None
+        """ User-visible label for the action (e.g. 1. or A.).
+        Type `str`. """
+        
+        self.output = None
+        """ Output data definition.
+        List of `DataRequirement` items (represented as `dict` in JSON). """
+        
+        self.participant = None
+        """ Who should participate in the action.
+        List of `PlanDefinitionActionParticipant` items (represented as `dict` in JSON). """
+        
+        self.precheckBehavior = None
+        """ yes | no.
+        Type `str`. """
+        
+        self.reason = None
+        """ Why the action should be performed.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.relatedAction = None
+        """ Relationship to another action.
+        List of `PlanDefinitionActionRelatedAction` items (represented as `dict` in JSON). """
+        
+        self.requiredBehavior = None
+        """ must | could | must-unless-documented.
+        Type `str`. """
+        
+        self.selectionBehavior = None
+        """ any | all | all-or-none | exactly-one | at-most-one | one-or-more.
+        Type `str`. """
+        
+        self.textEquivalent = None
+        """ Static text equivalent of the action, used if the dynamic aspects
+        cannot be interpreted by the receiving system.
+        Type `str`. """
+        
+        self.timingDateTime = None
+        """ When the action should take place.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.timingDuration = None
+        """ When the action should take place.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.timingPeriod = None
+        """ When the action should take place.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.timingRange = None
+        """ When the action should take place.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.timingTiming = None
+        """ When the action should take place.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.title = None
+        """ User-visible title.
+        Type `str`. """
+        
+        self.transform = None
+        """ Transform to apply the template.
+        Type `FHIRReference` referencing `StructureMap` (represented as `dict` in JSON). """
+        
+        self.triggerDefinition = None
+        """ When the action should be triggered.
+        List of `TriggerDefinition` items (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ create | update | remove | fire-event.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(PlanDefinitionAction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PlanDefinitionAction, self).elementProperties()
+        js.extend([
+            ("action", "action", PlanDefinitionAction, True, None, False),
+            ("cardinalityBehavior", "cardinalityBehavior", str, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, True, None, False),
+            ("condition", "condition", PlanDefinitionActionCondition, True, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("documentation", "documentation", relatedartifact.RelatedArtifact, True, None, False),
+            ("dynamicValue", "dynamicValue", PlanDefinitionActionDynamicValue, True, None, False),
+            ("goalId", "goalId", str, True, None, False),
+            ("groupingBehavior", "groupingBehavior", str, False, None, False),
+            ("input", "input", datarequirement.DataRequirement, True, None, False),
+            ("label", "label", str, False, None, False),
+            ("output", "output", datarequirement.DataRequirement, True, None, False),
+            ("participant", "participant", PlanDefinitionActionParticipant, True, None, False),
+            ("precheckBehavior", "precheckBehavior", str, False, None, False),
+            ("reason", "reason", codeableconcept.CodeableConcept, True, None, False),
+            ("relatedAction", "relatedAction", PlanDefinitionActionRelatedAction, True, None, False),
+            ("requiredBehavior", "requiredBehavior", str, False, None, False),
+            ("selectionBehavior", "selectionBehavior", str, False, None, False),
+            ("textEquivalent", "textEquivalent", str, False, None, False),
+            ("timingDateTime", "timingDateTime", fhirdate.FHIRDate, False, "timing", False),
+            ("timingDuration", "timingDuration", duration.Duration, False, "timing", False),
+            ("timingPeriod", "timingPeriod", period.Period, False, "timing", False),
+            ("timingRange", "timingRange", range.Range, False, "timing", False),
+            ("timingTiming", "timingTiming", timing.Timing, False, "timing", False),
+            ("title", "title", str, False, None, False),
+            ("transform", "transform", fhirreference.FHIRReference, False, None, False),
+            ("triggerDefinition", "triggerDefinition", triggerdefinition.TriggerDefinition, True, None, False),
+            ("type", "type", coding.Coding, False, None, False),
+        ])
+        return js
+
+
+class PlanDefinitionActionCondition(backboneelement.BackboneElement):
+    """ Whether or not the action is applicable.
+    
+    An expression that describes applicability criteria, or start/stop
+    conditions for the action.
+    """
+    
+    resource_type = "PlanDefinitionActionCondition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Natural language description of the condition.
+        Type `str`. """
+        
+        self.expression = None
+        """ Boolean-valued expression.
+        Type `str`. """
+        
+        self.kind = None
+        """ applicability | start | stop.
+        Type `str`. """
+        
+        self.language = None
+        """ Language of the expression.
+        Type `str`. """
+        
+        super(PlanDefinitionActionCondition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PlanDefinitionActionCondition, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("expression", "expression", str, False, None, False),
+            ("kind", "kind", str, False, None, True),
+            ("language", "language", str, False, None, False),
+        ])
+        return js
+
+
+class PlanDefinitionActionDynamicValue(backboneelement.BackboneElement):
+    """ Dynamic aspects of the definition.
+    
+    Customizations that should be applied to the statically defined resource.
+    For example, if the dosage of a medication must be computed based on the
+    patient's weight, a customization would be used to specify an expression
+    that calculated the weight, and the path on the resource that would contain
+    the result.
+    """
+    
+    resource_type = "PlanDefinitionActionDynamicValue"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Natural language description of the dynamic value.
+        Type `str`. """
+        
+        self.expression = None
+        """ An expression that provides the dynamic value for the customization.
+        Type `str`. """
+        
+        self.language = None
+        """ Language of the expression.
+        Type `str`. """
+        
+        self.path = None
+        """ The path to the element to be set dynamically.
+        Type `str`. """
+        
+        super(PlanDefinitionActionDynamicValue, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PlanDefinitionActionDynamicValue, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("expression", "expression", str, False, None, False),
+            ("language", "language", str, False, None, False),
+            ("path", "path", str, False, None, False),
+        ])
+        return js
+
+
+class PlanDefinitionActionParticipant(backboneelement.BackboneElement):
+    """ Who should participate in the action.
+    
+    Indicates who should participate in performing the action described.
+    """
+    
+    resource_type = "PlanDefinitionActionParticipant"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.role = None
+        """ E.g. Nurse, Surgeon, Parent, etc.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ patient | practitioner | related-person.
+        Type `str`. """
+        
+        super(PlanDefinitionActionParticipant, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PlanDefinitionActionParticipant, self).elementProperties()
+        js.extend([
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+class PlanDefinitionActionRelatedAction(backboneelement.BackboneElement):
+    """ Relationship to another action.
+    
+    A relationship to another action such as "before" or "30-60 minutes after
+    start of".
+    """
+    
+    resource_type = "PlanDefinitionActionRelatedAction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actionId = None
+        """ What action is this related to.
+        Type `str`. """
+        
+        self.offsetDuration = None
+        """ Time offset for the relationship.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.offsetRange = None
+        """ Time offset for the relationship.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.relationship = None
+        """ before-start | before | before-end | concurrent-with-start |
+        concurrent | concurrent-with-end | after-start | after | after-end.
+        Type `str`. """
+        
+        super(PlanDefinitionActionRelatedAction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PlanDefinitionActionRelatedAction, self).elementProperties()
+        js.extend([
+            ("actionId", "actionId", str, False, None, True),
+            ("offsetDuration", "offsetDuration", duration.Duration, False, "offset", False),
+            ("offsetRange", "offsetRange", range.Range, False, "offset", False),
+            ("relationship", "relationship", str, False, None, True),
+        ])
+        return js
+
+
+class PlanDefinitionGoal(backboneelement.BackboneElement):
+    """ What the plan is trying to accomplish.
+    
+    Goals that describe what the activities within the plan are intended to
+    achieve. For example, weight loss, restoring an activity of daily living,
+    obtaining herd immunity via immunization, meeting a process improvement
+    objective, etc.
+    """
+    
+    resource_type = "PlanDefinitionGoal"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.addresses = None
+        """ What does the goal address.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ E.g. Treatment, dietary, behavioral, etc.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Code or text describing the goal.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.documentation = None
+        """ Supporting documentation for the goal.
+        List of `RelatedArtifact` items (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ high-priority | medium-priority | low-priority.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.start = None
+        """ When goal pursuit begins.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.target = None
+        """ Target outcome for the goal.
+        List of `PlanDefinitionGoalTarget` items (represented as `dict` in JSON). """
+        
+        super(PlanDefinitionGoal, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PlanDefinitionGoal, self).elementProperties()
+        js.extend([
+            ("addresses", "addresses", codeableconcept.CodeableConcept, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("description", "description", codeableconcept.CodeableConcept, False, None, True),
+            ("documentation", "documentation", relatedartifact.RelatedArtifact, True, None, False),
+            ("priority", "priority", codeableconcept.CodeableConcept, False, None, False),
+            ("start", "start", codeableconcept.CodeableConcept, False, None, False),
+            ("target", "target", PlanDefinitionGoalTarget, True, None, False),
+        ])
+        return js
+
+
+class PlanDefinitionGoalTarget(backboneelement.BackboneElement):
+    """ Target outcome for the goal.
+    
+    Indicates what should be done and within what timeframe.
+    """
+    
+    resource_type = "PlanDefinitionGoalTarget"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.detailCodeableConcept = None
+        """ The target value to be achieved.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.detailQuantity = None
+        """ The target value to be achieved.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.detailRange = None
+        """ The target value to be achieved.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.due = None
+        """ Reach goal within.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.measure = None
+        """ The parameter whose value is to be tracked.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(PlanDefinitionGoalTarget, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PlanDefinitionGoalTarget, self).elementProperties()
+        js.extend([
+            ("detailCodeableConcept", "detailCodeableConcept", codeableconcept.CodeableConcept, False, "detail", False),
+            ("detailQuantity", "detailQuantity", quantity.Quantity, False, "detail", False),
+            ("detailRange", "detailRange", range.Range, False, "detail", False),
+            ("due", "due", duration.Duration, False, None, False),
+            ("measure", "measure", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import contributor
+except ImportError:
+    contributor = sys.modules[__package__ + '.contributor']
+try:
+    from . import datarequirement
+except ImportError:
+    datarequirement = sys.modules[__package__ + '.datarequirement']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
+try:
+    from . import relatedartifact
+except ImportError:
+    relatedartifact = sys.modules[__package__ + '.relatedartifact']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
+try:
+    from . import triggerdefinition
+except ImportError:
+    triggerdefinition = sys.modules[__package__ + '.triggerdefinition']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/plandefinition_tests.py b/fhirclient/models/plandefinition_tests.py
new file mode 100644
index 0000000..b140dc6
--- /dev/null
+++ b/fhirclient/models/plandefinition_tests.py
@@ -0,0 +1,399 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import plandefinition
+from .fhirdate import FHIRDate
+
+
+class PlanDefinitionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("PlanDefinition", js["resourceType"])
+        return plandefinition.PlanDefinition(js)
+    
+    def testPlanDefinition1(self):
+        inst = self.instantiate_from("plandefinition-example-kdn5-simplified.json")
+        self.assertIsNotNone(inst, "Must have instantiated a PlanDefinition instance")
+        self.implPlanDefinition1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("PlanDefinition", js["resourceType"])
+        inst2 = plandefinition.PlanDefinition(js)
+        self.implPlanDefinition1(inst2)
+    
+    def implPlanDefinition1(self, inst):
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].extension[0].extension[0].url, "day")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].extension[0].extension[0].valueInteger, 1)
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].extension[0].extension[1].url, "day")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].extension[0].extension[1].valueInteger, 8)
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/timing-daysOfCycle")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].id, "action-1")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].textEquivalent, "Gemcitabine 1250 mg/m² IV over 30 minutes on days 1 and 8")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].extension[0].extension[0].url, "day")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].extension[0].extension[0].valueInteger, 1)
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].extension[0].url, "http://hl7.org/fhir/StructureDefinition/timing-daysOfCycle")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].id, "action-2")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].relatedAction[0].actionId, "action-1")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].relatedAction[0].relationship, "concurrent-with-start")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].textEquivalent, "CARBOplatin AUC 5 IV over 30 minutes on Day 1")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].id, "cycle-definition-1")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].textEquivalent, "21-day cycle for 6 cycles")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].timingTiming.repeat.count, 6)
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].timingTiming.repeat.duration, 21)
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].timingTiming.repeat.durationUnit, "d")
+        self.assertEqual(inst.action[0].action[0].action[0].groupingBehavior, "sentence-group")
+        self.assertEqual(inst.action[0].action[0].action[0].selectionBehavior, "exactly-one")
+        self.assertEqual(inst.action[0].action[0].selectionBehavior, "all")
+        self.assertEqual(inst.action[0].selectionBehavior, "exactly-one")
+        self.assertEqual(inst.approvalDate.date, FHIRDate("2016-07-27").date)
+        self.assertEqual(inst.approvalDate.as_json(), "2016-07-27")
+        self.assertEqual(inst.contained[0].id, "1111")
+        self.assertEqual(inst.contained[1].id, "2222")
+        self.assertEqual(inst.contributor[0].name, "Lee Surprenant")
+        self.assertEqual(inst.contributor[0].type, "author")
+        self.assertEqual(inst.copyright, "All rights reserved.")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "KDN5")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/ordertemplates")
+        self.assertEqual(inst.identifier[0].value, "KDN5")
+        self.assertEqual(inst.lastReviewDate.date, FHIRDate("2016-07-27").date)
+        self.assertEqual(inst.lastReviewDate.as_json(), "2016-07-27")
+        self.assertEqual(inst.publisher, "National Comprehensive Cancer Network, Inc.")
+        self.assertEqual(inst.relatedArtifact[0].display, "NCCN Guidelines for Kidney Cancer. V.2.2016")
+        self.assertEqual(inst.relatedArtifact[0].type, "derived-from")
+        self.assertEqual(inst.relatedArtifact[0].url, "http://www.example.org/professionals/physician_gls/PDF/kidney.pdf")
+        self.assertEqual(inst.relatedArtifact[1].citation, "Oudard S, et al. J Urol. 2007;177(5):1698-702")
+        self.assertEqual(inst.relatedArtifact[1].type, "citation")
+        self.assertEqual(inst.relatedArtifact[1].url, "http://www.ncbi.nlm.nih.gov/pubmed/17437788")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "additional")
+        self.assertEqual(inst.title, "Gemcitabine/CARBOplatin")
+        self.assertEqual(inst.type.text, "Chemotherapy Order Template")
+        self.assertEqual(inst.useContext[0].code.code, "treamentSetting-or-diseaseStatus")
+        self.assertEqual(inst.useContext[0].code.system, "http://example.org/fhir/CodeSystem/indications")
+        self.assertEqual(inst.useContext[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/usagecontext-group")
+        self.assertEqual(inst.useContext[0].extension[0].valueString, "A")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.text, "Metastatic")
+        self.assertEqual(inst.useContext[1].code.code, "disease-or-histology")
+        self.assertEqual(inst.useContext[1].code.system, "http://example.org/fhir/CodeSystem/indications")
+        self.assertEqual(inst.useContext[1].extension[0].url, "http://hl7.org/fhir/StructureDefinition/usagecontext-group")
+        self.assertEqual(inst.useContext[1].extension[0].valueString, "A")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.text, "Collecting Duct/Medullary Subtypes")
+        self.assertEqual(inst.useContext[2].code.code, "focus")
+        self.assertEqual(inst.useContext[2].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[2].extension[0].url, "http://hl7.org/fhir/StructureDefinition/usagecontext-group")
+        self.assertEqual(inst.useContext[2].extension[0].valueString, "A")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.text, "Kidney Cancer")
+        self.assertEqual(inst.useContext[3].code.code, "treatmentSetting-or-diseaseStatus")
+        self.assertEqual(inst.useContext[3].code.system, "http://example.org/fhir/CodeSystem/indications")
+        self.assertEqual(inst.useContext[3].extension[0].url, "http://hl7.org/fhir/StructureDefinition/usagecontext-group")
+        self.assertEqual(inst.useContext[3].extension[0].valueString, "B")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.text, "Relapsed")
+        self.assertEqual(inst.useContext[4].code.code, "disease-or-histology")
+        self.assertEqual(inst.useContext[4].code.system, "http://example.org/fhir/CodeSystem/indications")
+        self.assertEqual(inst.useContext[4].extension[0].url, "http://hl7.org/fhir/StructureDefinition/usagecontext-group")
+        self.assertEqual(inst.useContext[4].extension[0].valueString, "B")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.text, "Collecting Duct/Medullary Subtypes")
+        self.assertEqual(inst.useContext[5].code.code, "focus")
+        self.assertEqual(inst.useContext[5].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[5].extension[0].url, "http://hl7.org/fhir/StructureDefinition/usagecontext-group")
+        self.assertEqual(inst.useContext[5].extension[0].valueString, "B")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.text, "Kidney Cancer – Collecting Duct/Medullary Subtypes - Metastatic")
+        self.assertEqual(inst.version, "1")
+    
+    def testPlanDefinition2(self):
+        inst = self.instantiate_from("plandefinition-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a PlanDefinition instance")
+        self.implPlanDefinition2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("PlanDefinition", js["resourceType"])
+        inst2 = plandefinition.PlanDefinition(js)
+        self.implPlanDefinition2(inst2)
+    
+    def implPlanDefinition2(self, inst):
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[0].expression, "Now()")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[0].path, "timing.event")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[1].expression, "Code '261QM0850X' from SuicideRiskLogic.\"NUCC Provider Taxonomy\" display 'Adult Mental Health'")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[1].path, "specialty")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[2].expression, "SuicideRiskLogic.ReferralRequestFulfillmentTime")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[2].path, "occurrenceDateTime")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[3].expression, "SuicideRiskLogic.Patient")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[3].path, "subject")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[4].expression, "SuicideRiskLogic.Practitioner")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[4].path, "requester.agent")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[5].expression, "SuicideRiskLogic.RiskAssessmentScore")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[5].path, "reasonCode")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[6].expression, "SuicideRiskLogic.RiskAssessment")
+        self.assertEqual(inst.action[0].action[0].action[0].dynamicValue[6].path, "reasonReference")
+        self.assertEqual(inst.action[0].action[0].action[0].textEquivalent, "Refer to outpatient mental health program for evaluation and treatment of mental health conditions now")
+        self.assertEqual(inst.action[0].action[0].groupingBehavior, "logical-group")
+        self.assertEqual(inst.action[0].action[0].selectionBehavior, "any")
+        self.assertEqual(inst.action[0].action[0].title, "Consults and Referrals")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].dynamicValue[0].expression, "'draft'")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].dynamicValue[0].path, "status")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].dynamicValue[1].expression, "SuicideRiskLogic.Patient")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].dynamicValue[1].path, "patient")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].dynamicValue[2].expression, "SuicideRiskLogic.Practitioner")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].dynamicValue[2].path, "prescriber")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].dynamicValue[3].expression, "SuicideRiskLogic.RiskAssessmentScore")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].dynamicValue[3].path, "reasonCode")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].dynamicValue[4].expression, "SuicideRiskLogic.RiskAssessment")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].dynamicValue[4].path, "reasonReference")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[0].textEquivalent, "citalopram 20 mg tablet 1 tablet oral 1 time daily now (30 table; 3 refills)")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[1].textEquivalent, "escitalopram 10 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills)")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[2].textEquivalent, "fluoxetine 20 mg capsule 1 capsule oral 1 time daily now (30 tablet; 3 refills)")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[3].textEquivalent, "paroxetine 20 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills)")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].action[4].textEquivalent, "sertraline 50 mg tablet 1 tablet oral 1 time daily now (30 tablet; 3 refills)")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].documentation[0].document.contentType, "text/html")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].documentation[0].document.title, "National Library of Medicine. DailyMed website. CITALOPRAM- citalopram hydrobromide tablet, film coated.")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].documentation[0].document.url, "http://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=6daeb45c-451d-b135-bf8f-2d6dff4b6b01")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].documentation[0].type, "citation")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].groupingBehavior, "logical-group")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].selectionBehavior, "at-most-one")
+        self.assertEqual(inst.action[0].action[1].action[0].action[0].title, "Selective Serotonin Reuptake Inhibitors (Choose a mazimum of one or document reasons for exception)")
+        self.assertEqual(inst.action[0].action[1].action[0].action[1].textEquivalent, "Dopamine Norepinephrine Reuptake Inhibitors (Choose a maximum of one or document reasons for exception)")
+        self.assertEqual(inst.action[0].action[1].action[0].action[2].textEquivalent, "Serotonin Norepinephrine Reuptake Inhibitors (Choose a maximum of one or doument reasons for exception)")
+        self.assertEqual(inst.action[0].action[1].action[0].action[3].textEquivalent, "Norepinephrine-Serotonin Modulators (Choose a maximum of one or document reasons for exception)")
+        self.assertEqual(inst.action[0].action[1].action[0].documentation[0].document.contentType, "text/html")
+        self.assertEqual(inst.action[0].action[1].action[0].documentation[0].document.extension[0].url, "http://hl7.org/fhir/StructureDefinition/cqif-qualityOfEvidence")
+        self.assertEqual(inst.action[0].action[1].action[0].documentation[0].document.extension[0].valueCodeableConcept.coding[0].code, "high")
+        self.assertEqual(inst.action[0].action[1].action[0].documentation[0].document.extension[0].valueCodeableConcept.coding[0].system, "http://hl7.org/fhir/evidence-quality")
+        self.assertEqual(inst.action[0].action[1].action[0].documentation[0].document.extension[0].valueCodeableConcept.text, "High Quality")
+        self.assertEqual(inst.action[0].action[1].action[0].documentation[0].document.title, "Practice Guideline for the Treatment of Patients with Major Depressive Disorder")
+        self.assertEqual(inst.action[0].action[1].action[0].documentation[0].document.url, "http://psychiatryonline.org/pb/assets/raw/sitewide/practice_guidelines/guidelines/mdd.pdf")
+        self.assertEqual(inst.action[0].action[1].action[0].documentation[0].type, "citation")
+        self.assertEqual(inst.action[0].action[1].action[0].groupingBehavior, "logical-group")
+        self.assertEqual(inst.action[0].action[1].action[0].selectionBehavior, "at-most-one")
+        self.assertEqual(inst.action[0].action[1].action[0].title, "First-Line Antidepressants")
+        self.assertEqual(inst.action[0].action[1].groupingBehavior, "logical-group")
+        self.assertEqual(inst.action[0].action[1].selectionBehavior, "at-most-one")
+        self.assertEqual(inst.action[0].action[1].title, "Medications")
+        self.assertEqual(inst.action[0].title, "Suicide Risk Assessment and Outpatient Management")
+        self.assertEqual(inst.approvalDate.date, FHIRDate("2016-03-12").date)
+        self.assertEqual(inst.approvalDate.as_json(), "2016-03-12")
+        self.assertEqual(inst.contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "415-362-4007")
+        self.assertEqual(inst.contact[0].telecom[1].system, "email")
+        self.assertEqual(inst.contact[0].telecom[1].use, "work")
+        self.assertEqual(inst.contact[0].telecom[1].value, "info at motivemi.com")
+        self.assertEqual(inst.contained[0].id, "referralToMentalHealthCare")
+        self.assertEqual(inst.contained[1].id, "citalopramPrescription")
+        self.assertEqual(inst.contained[2].id, "citalopramMedication")
+        self.assertEqual(inst.contained[3].id, "citalopramSubstance")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].system, "phone")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].value, "415-362-4007")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].system, "email")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].use, "work")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[1].value, "info at motivemi.com")
+        self.assertEqual(inst.contributor[0].name, "Motive Medical Intelligence")
+        self.assertEqual(inst.contributor[0].type, "author")
+        self.assertEqual(inst.copyright, "© Copyright 2016 Motive Medical Intelligence. All rights reserved.")
+        self.assertEqual(inst.date.date, FHIRDate("2015-08-15").date)
+        self.assertEqual(inst.date.as_json(), "2015-08-15")
+        self.assertEqual(inst.description, "Orders to be applied to a patient characterized as low suicide risk.")
+        self.assertEqual(inst.effectivePeriod.end.date, FHIRDate("2017-12-31").date)
+        self.assertEqual(inst.effectivePeriod.end.as_json(), "2017-12-31")
+        self.assertEqual(inst.effectivePeriod.start.date, FHIRDate("2016-01-01").date)
+        self.assertEqual(inst.effectivePeriod.start.as_json(), "2016-01-01")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "low-suicide-risk-order-set")
+        self.assertEqual(inst.identifier[0].system, "http://motivemi.com/artifacts")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "mmi:low-suicide-risk-order-set")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.lastReviewDate.date, FHIRDate("2016-08-15").date)
+        self.assertEqual(inst.lastReviewDate.as_json(), "2016-08-15")
+        self.assertEqual(inst.name, "LowSuicideRiskOrderSet")
+        self.assertEqual(inst.publisher, "Motive Medical Intelligence")
+        self.assertEqual(inst.purpose, "This order set helps ensure consistent application of appropriate orders for the care of low suicide risk patients.")
+        self.assertEqual(inst.relatedArtifact[0].display, "Practice Guideline for the Treatment of Patients with Major Depressive Disorder")
+        self.assertEqual(inst.relatedArtifact[0].type, "derived-from")
+        self.assertEqual(inst.relatedArtifact[0].url, "http://psychiatryonline.org/pb/assets/raw/sitewide/practice_guidelines/guidelines/mdd.pdf")
+        self.assertEqual(inst.relatedArtifact[1].type, "composed-of")
+        self.assertEqual(inst.relatedArtifact[2].type, "composed-of")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Low Suicide Risk Order Set")
+        self.assertEqual(inst.topic[0].text, "Suicide risk assessment")
+        self.assertEqual(inst.url, "http://motivemi.com/artifacts/PlanDefinition/low-suicide-risk-order-set")
+        self.assertEqual(inst.usage, "This order set should be applied after assessing a patient for suicide risk, when the findings of that assessment indicate the patient has low suicide risk.")
+        self.assertEqual(inst.useContext[0].code.code, "age")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "D000328")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].display, "Adult")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "https://meshb.nlm.nih.gov")
+        self.assertEqual(inst.useContext[1].code.code, "focus")
+        self.assertEqual(inst.useContext[1].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].code, "87512008")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].display, "Mild major depression")
+        self.assertEqual(inst.useContext[1].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[2].code.code, "focus")
+        self.assertEqual(inst.useContext[2].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].code, "40379007")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].display, "Major depression, recurrent, mild")
+        self.assertEqual(inst.useContext[2].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[3].code.code, "focus")
+        self.assertEqual(inst.useContext[3].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].code, "394687007")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].display, "Low suicide risk")
+        self.assertEqual(inst.useContext[3].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[4].code.code, "focus")
+        self.assertEqual(inst.useContext[4].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].code, "225337009")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].display, "Suicide risk assessment")
+        self.assertEqual(inst.useContext[4].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[5].code.code, "user")
+        self.assertEqual(inst.useContext[5].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].code, "309343006")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].display, "Physician")
+        self.assertEqual(inst.useContext[5].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.useContext[6].code.code, "venue")
+        self.assertEqual(inst.useContext[6].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].code, "440655000")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].display, "Outpatient environment")
+        self.assertEqual(inst.useContext[6].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.version, "1.0.0")
+    
+    def testPlanDefinition3(self):
+        inst = self.instantiate_from("plandefinition-options-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a PlanDefinition instance")
+        self.implPlanDefinition3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("PlanDefinition", js["resourceType"])
+        inst2 = plandefinition.PlanDefinition(js)
+        self.implPlanDefinition3(inst2)
+    
+    def implPlanDefinition3(self, inst):
+        self.assertEqual(inst.action[0].action[0].id, "medication-action-1")
+        self.assertEqual(inst.action[0].action[0].title, "Administer Medication 1")
+        self.assertEqual(inst.action[0].action[1].id, "medication-action-2")
+        self.assertEqual(inst.action[0].action[1].relatedAction[0].actionId, "medication-action-1")
+        self.assertEqual(inst.action[0].action[1].relatedAction[0].offsetDuration.unit, "h")
+        self.assertEqual(inst.action[0].action[1].relatedAction[0].offsetDuration.value, 1)
+        self.assertEqual(inst.action[0].action[1].relatedAction[0].relationship, "after-end")
+        self.assertEqual(inst.action[0].action[1].title, "Administer Medication 2")
+        self.assertEqual(inst.action[0].groupingBehavior, "logical-group")
+        self.assertEqual(inst.action[0].selectionBehavior, "all")
+        self.assertEqual(inst.contained[0].id, "activitydefinition-medicationrequest-1")
+        self.assertEqual(inst.contained[1].id, "activitydefinition-medicationrequest-2")
+        self.assertEqual(inst.id, "options-example")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "This example illustrates relationships between actions.")
+    
+    def testPlanDefinition4(self):
+        inst = self.instantiate_from("plandefinition-predecessor-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a PlanDefinition instance")
+        self.implPlanDefinition4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("PlanDefinition", js["resourceType"])
+        inst2 = plandefinition.PlanDefinition(js)
+        self.implPlanDefinition4(inst2)
+    
+    def implPlanDefinition4(self, inst):
+        self.assertEqual(inst.action[0].action[0].condition[0].expression, "Should Administer Zika Virus Exposure Assessment")
+        self.assertEqual(inst.action[0].action[0].condition[0].kind, "applicability")
+        self.assertEqual(inst.action[0].action[1].condition[0].expression, "Should Order Serum + Urine rRT-PCR Test")
+        self.assertEqual(inst.action[0].action[1].condition[0].kind, "applicability")
+        self.assertEqual(inst.action[0].action[2].condition[0].expression, "Should Order Serum Zika Virus IgM + Dengue Virus IgM")
+        self.assertEqual(inst.action[0].action[2].condition[0].kind, "applicability")
+        self.assertEqual(inst.action[0].action[3].condition[0].expression, "Should Consider IgM Antibody Testing")
+        self.assertEqual(inst.action[0].action[3].condition[0].kind, "applicability")
+        self.assertEqual(inst.action[0].action[4].condition[0].expression, "Should Provide Mosquito Prevention and Contraception Advice")
+        self.assertEqual(inst.action[0].action[4].condition[0].kind, "applicability")
+        self.assertEqual(inst.action[0].condition[0].expression, "Is Patient Pregnant")
+        self.assertEqual(inst.action[0].condition[0].kind, "applicability")
+        self.assertEqual(inst.action[0].title, "Zika Virus Assessment")
+        self.assertEqual(inst.action[0].triggerDefinition[0].eventName, "patient-view")
+        self.assertEqual(inst.action[0].triggerDefinition[0].type, "named-event")
+        self.assertEqual(inst.date.date, FHIRDate("2016-11-14").date)
+        self.assertEqual(inst.date.as_json(), "2016-11-14")
+        self.assertEqual(inst.description, "Zika Virus Management intervention describing the CDC Guidelines for Zika Virus Reporting and Management.")
+        self.assertEqual(inst.id, "zika-virus-intervention-initial")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "zika-virus-intervention")
+        self.assertEqual(inst.relatedArtifact[0].type, "derived-from")
+        self.assertEqual(inst.relatedArtifact[0].url, "https://www.cdc.gov/mmwr/volumes/65/wr/mm6539e1.htm?s_cid=mm6539e1_w")
+        self.assertEqual(inst.relatedArtifact[1].type, "successor")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Example Zika Virus Intervention")
+        self.assertEqual(inst.topic[0].text, "Zika Virus Management")
+        self.assertEqual(inst.url, "http://example.org/PlanDefinition/zika-virus-intervention")
+        self.assertEqual(inst.version, "1.0.0")
+    
+    def testPlanDefinition5(self):
+        inst = self.instantiate_from("plandefinition-protocol-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a PlanDefinition instance")
+        self.implPlanDefinition5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("PlanDefinition", js["resourceType"])
+        inst2 = plandefinition.PlanDefinition(js)
+        self.implPlanDefinition5(inst2)
+    
+    def implPlanDefinition5(self, inst):
+        self.assertEqual(inst.action[0].cardinalityBehavior, "single")
+        self.assertEqual(inst.action[0].condition[0].expression, "exists ([Condition: Obesity]) or not exists ([Observation: BMI] O where O.effectiveDateTime 2 years or less before Today())")
+        self.assertEqual(inst.action[0].condition[0].kind, "applicability")
+        self.assertEqual(inst.action[0].condition[0].language, "text/cql")
+        self.assertEqual(inst.action[0].goalId[0], "reduce-bmi-ratio")
+        self.assertEqual(inst.action[0].label, "Measure BMI")
+        self.assertEqual(inst.action[0].requiredBehavior, "must-unless-documented")
+        self.assertEqual(inst.action[0].title, "Measure, Weight, Height, Waist, Circumference; Calculate BMI")
+        self.assertEqual(inst.contained[0].id, "procedure")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contributor[0].contact[0].telecom[0].value, "https://www.nhlbi.nih.gov/health-pro/guidelines")
+        self.assertEqual(inst.contributor[0].name, "National Heart, Lung, and Blood Institute")
+        self.assertEqual(inst.contributor[0].type, "author")
+        self.assertEqual(inst.goal[0].addresses[0].coding[0].code, "414916001")
+        self.assertEqual(inst.goal[0].addresses[0].coding[0].display, "Obesity (disorder)")
+        self.assertEqual(inst.goal[0].addresses[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.goal[0].category.text, "Treatment")
+        self.assertEqual(inst.goal[0].description.text, "Reduce BMI to below 25")
+        self.assertEqual(inst.goal[0].documentation[0].display, "Evaluation and Treatment Strategy")
+        self.assertEqual(inst.goal[0].documentation[0].type, "justification")
+        self.assertEqual(inst.goal[0].documentation[0].url, "https://www.nhlbi.nih.gov/health-pro/guidelines/current/obesity-guidelines/e_textbook/txgd/42.htm")
+        self.assertEqual(inst.goal[0].id, "reduce-bmi-ratio")
+        self.assertEqual(inst.goal[0].priority.text, "medium-priority")
+        self.assertEqual(inst.goal[0].start.text, "When the patient's BMI Ratio is at or above 25")
+        self.assertEqual(inst.goal[0].target[0].detailRange.high.unit, "kg/m2")
+        self.assertEqual(inst.goal[0].target[0].detailRange.high.value, 24.9)
+        self.assertEqual(inst.goal[0].target[0].due.unit, "a")
+        self.assertEqual(inst.goal[0].target[0].due.value, 1)
+        self.assertEqual(inst.goal[0].target[0].measure.coding[0].code, "39156-5")
+        self.assertEqual(inst.goal[0].target[0].measure.coding[0].display, "Body mass index (BMI) [Ratio]")
+        self.assertEqual(inst.goal[0].target[0].measure.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.id, "protocol-example")
+        self.assertEqual(inst.identifier[0].system, "http://acme.org")
+        self.assertEqual(inst.identifier[0].value, "example-1")
+        self.assertEqual(inst.purpose, "Example of A medical algorithm for assessment and treatment of overweight and obesity")
+        self.assertEqual(inst.relatedArtifact[0].display, "Overweight and Obesity Treatment Guidelines")
+        self.assertEqual(inst.relatedArtifact[0].type, "derived-from")
+        self.assertEqual(inst.relatedArtifact[0].url, "http://www.nhlbi.nih.gov/health-pro/guidelines/current/obesity-guidelines/e_textbook/txgd/algorthm/algorthm.htm")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Obesity Assessment Protocol")
+        self.assertEqual(inst.type.coding[0].code, "protocol")
+        self.assertEqual(inst.useContext[0].code.code, "focus")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "414916001")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].display, "Obesity (disorder)")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+
diff --git a/fhirclient/models/practitioner.py b/fhirclient/models/practitioner.py
new file mode 100644
index 0000000..aeb3e27
--- /dev/null
+++ b/fhirclient/models/practitioner.py
@@ -0,0 +1,169 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Practitioner) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Practitioner(domainresource.DomainResource):
+    """ A person with a  formal responsibility in the provisioning of healthcare or
+    related services.
+    
+    A person who is directly or indirectly involved in the provisioning of
+    healthcare.
+    """
+    
+    resource_type = "Practitioner"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Whether this practitioner's record is in active use.
+        Type `bool`. """
+        
+        self.address = None
+        """ Address(es) of the practitioner that are not role specific
+        (typically home address).
+        List of `Address` items (represented as `dict` in JSON). """
+        
+        self.birthDate = None
+        """ The date  on which the practitioner was born.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.communication = None
+        """ A language the practitioner is able to use in patient communication.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.gender = None
+        """ male | female | other | unknown.
+        Type `str`. """
+        
+        self.identifier = None
+        """ A identifier for the person as this agent.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ The name(s) associated with the practitioner.
+        List of `HumanName` items (represented as `dict` in JSON). """
+        
+        self.photo = None
+        """ Image of the person.
+        List of `Attachment` items (represented as `dict` in JSON). """
+        
+        self.qualification = None
+        """ Qualifications obtained by training and certification.
+        List of `PractitionerQualification` items (represented as `dict` in JSON). """
+        
+        self.telecom = None
+        """ A contact detail for the practitioner (that apply to all roles).
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        super(Practitioner, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Practitioner, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("address", "address", address.Address, True, None, False),
+            ("birthDate", "birthDate", fhirdate.FHIRDate, False, None, False),
+            ("communication", "communication", codeableconcept.CodeableConcept, True, None, False),
+            ("gender", "gender", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("name", "name", humanname.HumanName, True, None, False),
+            ("photo", "photo", attachment.Attachment, True, None, False),
+            ("qualification", "qualification", PractitionerQualification, True, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class PractitionerQualification(backboneelement.BackboneElement):
+    """ Qualifications obtained by training and certification.
+    """
+    
+    resource_type = "PractitionerQualification"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Coded representation of the qualification.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ An identifier for this qualification for the practitioner.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.issuer = None
+        """ Organization that regulates and issues the qualification.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Period during which the qualification is valid.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(PractitionerQualification, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PractitionerQualification, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("issuer", "issuer", fhirreference.FHIRReference, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import humanname
+except ImportError:
+    humanname = sys.modules[__package__ + '.humanname']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/practitioner_tests.py b/fhirclient/models/practitioner_tests.py
new file mode 100644
index 0000000..12aafd5
--- /dev/null
+++ b/fhirclient/models/practitioner_tests.py
@@ -0,0 +1,436 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import practitioner
+from .fhirdate import FHIRDate
+
+
+class PractitionerTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Practitioner", js["resourceType"])
+        return practitioner.Practitioner(js)
+    
+    def testPractitioner1(self):
+        inst = self.instantiate_from("practitioner-example-f001-evdb.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Practitioner instance")
+        self.implPractitioner1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Practitioner", js["resourceType"])
+        inst2 = practitioner.Practitioner(js)
+        self.implPractitioner1(inst2)
+    
+    def implPractitioner1(self, inst):
+        self.assertEqual(inst.address[0].city, "Den Burg")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Galapagosweg 91")
+        self.assertEqual(inst.address[0].postalCode, "9105 PZ")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1975-12-07").date)
+        self.assertEqual(inst.birthDate.as_json(), "1975-12-07")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "f001")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1.1007.3.1")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "938273695")
+        self.assertEqual(inst.identifier[1].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[1].use, "usual")
+        self.assertEqual(inst.identifier[1].value, "129IDH4OP733")
+        self.assertEqual(inst.name[0].family, "van den broek")
+        self.assertEqual(inst.name[0].given[0], "Eric")
+        self.assertEqual(inst.name[0].suffix[0], "MD")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "0205568263")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "E.M.vandenbroek at bmc.nl")
+        self.assertEqual(inst.telecom[2].system, "fax")
+        self.assertEqual(inst.telecom[2].use, "work")
+        self.assertEqual(inst.telecom[2].value, "0205664440")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPractitioner2(self):
+        inst = self.instantiate_from("practitioner-example-f002-pv.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Practitioner instance")
+        self.implPractitioner2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Practitioner", js["resourceType"])
+        inst2 = practitioner.Practitioner(js)
+        self.implPractitioner2(inst2)
+    
+    def implPractitioner2(self, inst):
+        self.assertEqual(inst.address[0].city, "Den Burg")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Galapagosweg 91")
+        self.assertEqual(inst.address[0].postalCode, "9105 PZ")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1979-04-29").date)
+        self.assertEqual(inst.birthDate.as_json(), "1979-04-29")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "f002")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1.1007.3.1")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "730291637")
+        self.assertEqual(inst.identifier[1].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[1].use, "usual")
+        self.assertEqual(inst.identifier[1].value, "174BIP3JH438")
+        self.assertEqual(inst.name[0].family, "Voigt")
+        self.assertEqual(inst.name[0].given[0], "Pieter")
+        self.assertEqual(inst.name[0].suffix[0], "MD")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "0205569336")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "p.voigt at bmc.nl")
+        self.assertEqual(inst.telecom[2].system, "fax")
+        self.assertEqual(inst.telecom[2].use, "work")
+        self.assertEqual(inst.telecom[2].value, "0205669382")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPractitioner3(self):
+        inst = self.instantiate_from("practitioner-example-f003-mv.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Practitioner instance")
+        self.implPractitioner3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Practitioner", js["resourceType"])
+        inst2 = practitioner.Practitioner(js)
+        self.implPractitioner3(inst2)
+    
+    def implPractitioner3(self, inst):
+        self.assertEqual(inst.address[0].city, "Amsterdam")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Galapagosweg 91")
+        self.assertEqual(inst.address[0].postalCode, "1105 AZ")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1963-07-01").date)
+        self.assertEqual(inst.birthDate.as_json(), "1963-07-01")
+        self.assertEqual(inst.communication[0].coding[0].code, "nl")
+        self.assertEqual(inst.communication[0].coding[0].display, "Dutch")
+        self.assertEqual(inst.communication[0].coding[0].system, "urn:oid:2.16.840.1.113883.6.121")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "f003")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1.1007.3.1")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "846100293")
+        self.assertEqual(inst.identifier[1].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[1].use, "usual")
+        self.assertEqual(inst.identifier[1].value, "243HID3RT938")
+        self.assertEqual(inst.name[0].family, "Versteegh")
+        self.assertEqual(inst.name[0].given[0], "Marc")
+        self.assertEqual(inst.name[0].suffix[0], "MD")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "0205562431")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "m.versteegh at bmc.nl")
+        self.assertEqual(inst.telecom[2].system, "fax")
+        self.assertEqual(inst.telecom[2].use, "work")
+        self.assertEqual(inst.telecom[2].value, "0205662948")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPractitioner4(self):
+        inst = self.instantiate_from("practitioner-example-f004-rb.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Practitioner instance")
+        self.implPractitioner4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Practitioner", js["resourceType"])
+        inst2 = practitioner.Practitioner(js)
+        self.implPractitioner4(inst2)
+    
+    def implPractitioner4(self, inst):
+        self.assertEqual(inst.address[0].city, "Amsterdam")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Galapagosweg 91")
+        self.assertEqual(inst.address[0].postalCode, "1105 AZ")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1980-02-04").date)
+        self.assertEqual(inst.birthDate.as_json(), "1980-02-04")
+        self.assertEqual(inst.communication[0].coding[0].code, "nl")
+        self.assertEqual(inst.communication[0].coding[0].display, "Netherlands")
+        self.assertEqual(inst.communication[0].coding[0].system, "urn:oid:2.16.840.1.113883.6.121")
+        self.assertEqual(inst.communication[0].text, "Language")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "f004")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1.1007.3.1")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "118265112")
+        self.assertEqual(inst.identifier[1].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[1].use, "usual")
+        self.assertEqual(inst.identifier[1].value, "523ASA1LK927")
+        self.assertEqual(inst.name[0].family, "Briet")
+        self.assertEqual(inst.name[0].given[0], "Ronald")
+        self.assertEqual(inst.name[0].suffix[0], "MD")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "0205569273")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "r.briet at bmc.nl")
+        self.assertEqual(inst.telecom[2].system, "fax")
+        self.assertEqual(inst.telecom[2].use, "work")
+        self.assertEqual(inst.telecom[2].value, "0205664440")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPractitioner5(self):
+        inst = self.instantiate_from("practitioner-example-f005-al.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Practitioner instance")
+        self.implPractitioner5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Practitioner", js["resourceType"])
+        inst2 = practitioner.Practitioner(js)
+        self.implPractitioner5(inst2)
+    
+    def implPractitioner5(self, inst):
+        self.assertEqual(inst.address[0].city, "Amsterdam")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Galapagosweg 9")
+        self.assertEqual(inst.address[0].postalCode, "1105 AZ")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1959-03-11").date)
+        self.assertEqual(inst.birthDate.as_json(), "1959-03-11")
+        self.assertEqual(inst.communication[0].coding[0].code, "fr")
+        self.assertEqual(inst.communication[0].coding[0].display, "France")
+        self.assertEqual(inst.communication[0].coding[0].system, "urn:oid:2.16.840.1.113883.6.121")
+        self.assertEqual(inst.gender, "female")
+        self.assertEqual(inst.id, "f005")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1.1007.3.1")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "118265112")
+        self.assertEqual(inst.identifier[1].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[1].use, "usual")
+        self.assertEqual(inst.identifier[1].value, "191REW8WE916")
+        self.assertEqual(inst.name[0].family, "Anne")
+        self.assertEqual(inst.name[0].given[0], "Langeveld")
+        self.assertEqual(inst.name[0].suffix[0], "MD")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.photo[0].contentType, "image/jpeg")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "0205563847")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "a.langeveld at bmc.nl")
+        self.assertEqual(inst.telecom[2].system, "fax")
+        self.assertEqual(inst.telecom[2].use, "work")
+        self.assertEqual(inst.telecom[2].value, "0205668916")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPractitioner6(self):
+        inst = self.instantiate_from("practitioner-example-f006-rvdb.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Practitioner instance")
+        self.implPractitioner6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Practitioner", js["resourceType"])
+        inst2 = practitioner.Practitioner(js)
+        self.implPractitioner6(inst2)
+    
+    def implPractitioner6(self, inst):
+        self.assertEqual(inst.address[0].city, "Den Burg")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Galapagosweg 91")
+        self.assertEqual(inst.address[0].postalCode, "9105 PZ")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1975-12-07").date)
+        self.assertEqual(inst.birthDate.as_json(), "1975-12-07")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "f006")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1.1007.3.1")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "937223645")
+        self.assertEqual(inst.identifier[1].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[1].use, "usual")
+        self.assertEqual(inst.identifier[1].value, "134IDY41W988")
+        self.assertEqual(inst.name[0].family, "van den Berk")
+        self.assertEqual(inst.name[0].given[0], "Rob")
+        self.assertEqual(inst.name[0].suffix[0], "MD")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "0205569288")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "R.A.vandenberk at bmc.nl")
+        self.assertEqual(inst.telecom[2].system, "fax")
+        self.assertEqual(inst.telecom[2].use, "work")
+        self.assertEqual(inst.telecom[2].value, "0205664987")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPractitioner7(self):
+        inst = self.instantiate_from("practitioner-example-f007-sh.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Practitioner instance")
+        self.implPractitioner7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Practitioner", js["resourceType"])
+        inst2 = practitioner.Practitioner(js)
+        self.implPractitioner7(inst2)
+    
+    def implPractitioner7(self, inst):
+        self.assertEqual(inst.address[0].city, "Den Burg")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Galapagosweg 91")
+        self.assertEqual(inst.address[0].postalCode, "9105 PZ")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1971-11-07").date)
+        self.assertEqual(inst.birthDate.as_json(), "1971-11-07")
+        self.assertEqual(inst.gender, "female")
+        self.assertEqual(inst.id, "f007")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1.1007.3.1")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "874635264")
+        self.assertEqual(inst.identifier[1].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[1].use, "usual")
+        self.assertEqual(inst.identifier[1].value, "567IUI51C154")
+        self.assertEqual(inst.name[0].family, "Heps")
+        self.assertEqual(inst.name[0].given[0], "Simone")
+        self.assertEqual(inst.name[0].suffix[0], "MD")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "020556936")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "S.M.Heps at bmc.nl")
+        self.assertEqual(inst.telecom[2].system, "fax")
+        self.assertEqual(inst.telecom[2].use, "work")
+        self.assertEqual(inst.telecom[2].value, "0205669283")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPractitioner8(self):
+        inst = self.instantiate_from("practitioner-example-f201-ab.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Practitioner instance")
+        self.implPractitioner8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Practitioner", js["resourceType"])
+        inst2 = practitioner.Practitioner(js)
+        self.implPractitioner8(inst2)
+    
+    def implPractitioner8(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].city, "Den helder")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Walvisbaai 3")
+        self.assertEqual(inst.address[0].line[1], "C4 - Automatisering")
+        self.assertEqual(inst.address[0].postalCode, "2333ZA")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1956-12-24").date)
+        self.assertEqual(inst.birthDate.as_json(), "1956-12-24")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1.1007.3.1")
+        self.assertEqual(inst.identifier[0].type.text, "UZI-nummer")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "12345678901")
+        self.assertEqual(inst.name[0].family, "Bronsig")
+        self.assertEqual(inst.name[0].given[0], "Arend")
+        self.assertEqual(inst.name[0].prefix[0], "Dr.")
+        self.assertEqual(inst.name[0].text, "Dokter Bronsig")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.qualification[0].code.coding[0].code, "41672002")
+        self.assertEqual(inst.qualification[0].code.coding[0].display, "Pulmonologist")
+        self.assertEqual(inst.qualification[0].code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "+31715269111")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPractitioner9(self):
+        inst = self.instantiate_from("practitioner-example-f202-lm.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Practitioner instance")
+        self.implPractitioner9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Practitioner", js["resourceType"])
+        inst2 = practitioner.Practitioner(js)
+        self.implPractitioner9(inst2)
+    
+    def implPractitioner9(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].city, "Den helder")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Walvisbaai 3")
+        self.assertEqual(inst.address[0].line[1], "C4 - Automatisering")
+        self.assertEqual(inst.address[0].postalCode, "2333ZA")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1960-06-12").date)
+        self.assertEqual(inst.birthDate.as_json(), "1960-06-12")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "f202")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1.1007.3.1")
+        self.assertEqual(inst.identifier[0].type.text, "UZI-nummer")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "12345678902")
+        self.assertEqual(inst.identifier[1].system, "https://www.bigregister.nl/")
+        self.assertEqual(inst.identifier[1].type.text, "BIG-nummer")
+        self.assertEqual(inst.identifier[1].use, "official")
+        self.assertEqual(inst.identifier[1].value, "12345678902")
+        self.assertEqual(inst.name[0].family, "Maas")
+        self.assertEqual(inst.name[0].given[0], "Luigi")
+        self.assertEqual(inst.name[0].prefix[0], "Dr.")
+        self.assertEqual(inst.name[0].text, "Luigi Maas")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "+31715269111")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testPractitioner10(self):
+        inst = self.instantiate_from("practitioner-example-f203-jvg.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Practitioner instance")
+        self.implPractitioner10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Practitioner", js["resourceType"])
+        inst2 = practitioner.Practitioner(js)
+        self.implPractitioner10(inst2)
+    
+    def implPractitioner10(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].city, "Den helder")
+        self.assertEqual(inst.address[0].country, "NLD")
+        self.assertEqual(inst.address[0].line[0], "Walvisbaai 3")
+        self.assertEqual(inst.address[0].postalCode, "2333ZA")
+        self.assertEqual(inst.address[0].use, "work")
+        self.assertEqual(inst.birthDate.date, FHIRDate("1983-04-20").date)
+        self.assertEqual(inst.birthDate.as_json(), "1983-04-20")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "f203")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.528.1.1007.3.1")
+        self.assertEqual(inst.identifier[0].type.text, "UZI-nummer")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "12345678903")
+        self.assertEqual(inst.identifier[1].system, "https://www.bigregister.nl/")
+        self.assertEqual(inst.identifier[1].type.text, "BIG-nummer")
+        self.assertEqual(inst.identifier[1].use, "official")
+        self.assertEqual(inst.identifier[1].value, "12345678903")
+        self.assertEqual(inst.name[0].text, "Juri van Gelder")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "+31715269111")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/practitionerrole.py b/fhirclient/models/practitionerrole.py
new file mode 100644
index 0000000..c8102d8
--- /dev/null
+++ b/fhirclient/models/practitionerrole.py
@@ -0,0 +1,217 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/PractitionerRole) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class PractitionerRole(domainresource.DomainResource):
+    """ Roles/organizations the practitioner is associated with.
+    
+    A specific set of Roles/Locations/specialties/services that a practitioner
+    may perform at an organization for a period of time.
+    """
+    
+    resource_type = "PractitionerRole"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Whether this practitioner's record is in active use.
+        Type `bool`. """
+        
+        self.availabilityExceptions = None
+        """ Description of availability exceptions.
+        Type `str`. """
+        
+        self.availableTime = None
+        """ Times the Service Site is available.
+        List of `PractitionerRoleAvailableTime` items (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Roles which this practitioner may perform.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.endpoint = None
+        """ Technical endpoints providing access to services operated for the
+        practitioner with this role.
+        List of `FHIRReference` items referencing `Endpoint` (represented as `dict` in JSON). """
+        
+        self.healthcareService = None
+        """ The list of healthcare services that this worker provides for this
+        role's Organization/Location(s).
+        List of `FHIRReference` items referencing `HealthcareService` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifiers that are specific to a role/location.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.location = None
+        """ The location(s) at which this practitioner provides care.
+        List of `FHIRReference` items referencing `Location` (represented as `dict` in JSON). """
+        
+        self.notAvailable = None
+        """ Not available during this time due to provided reason.
+        List of `PractitionerRoleNotAvailable` items (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Organization where the roles are available.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ The period during which the practitioner is authorized to perform
+        in these role(s).
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.practitioner = None
+        """ Practitioner that is able to provide the defined services for the
+        organation.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.specialty = None
+        """ Specific specialty of the practitioner.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.telecom = None
+        """ Contact details that are specific to the role/location/service.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        super(PractitionerRole, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PractitionerRole, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("availabilityExceptions", "availabilityExceptions", str, False, None, False),
+            ("availableTime", "availableTime", PractitionerRoleAvailableTime, True, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, True, None, False),
+            ("endpoint", "endpoint", fhirreference.FHIRReference, True, None, False),
+            ("healthcareService", "healthcareService", fhirreference.FHIRReference, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("location", "location", fhirreference.FHIRReference, True, None, False),
+            ("notAvailable", "notAvailable", PractitionerRoleNotAvailable, True, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("practitioner", "practitioner", fhirreference.FHIRReference, False, None, False),
+            ("specialty", "specialty", codeableconcept.CodeableConcept, True, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class PractitionerRoleAvailableTime(backboneelement.BackboneElement):
+    """ Times the Service Site is available.
+    
+    A collection of times that the Service Site is available.
+    """
+    
+    resource_type = "PractitionerRoleAvailableTime"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.allDay = None
+        """ Always available? e.g. 24 hour service.
+        Type `bool`. """
+        
+        self.availableEndTime = None
+        """ Closing time of day (ignored if allDay = true).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.availableStartTime = None
+        """ Opening time of day (ignored if allDay = true).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.daysOfWeek = None
+        """ mon | tue | wed | thu | fri | sat | sun.
+        List of `str` items. """
+        
+        super(PractitionerRoleAvailableTime, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PractitionerRoleAvailableTime, self).elementProperties()
+        js.extend([
+            ("allDay", "allDay", bool, False, None, False),
+            ("availableEndTime", "availableEndTime", fhirdate.FHIRDate, False, None, False),
+            ("availableStartTime", "availableStartTime", fhirdate.FHIRDate, False, None, False),
+            ("daysOfWeek", "daysOfWeek", str, True, None, False),
+        ])
+        return js
+
+
+class PractitionerRoleNotAvailable(backboneelement.BackboneElement):
+    """ Not available during this time due to provided reason.
+    
+    The HealthcareService is not available during this period of time due to
+    the provided reason.
+    """
+    
+    resource_type = "PractitionerRoleNotAvailable"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Reason presented to the user explaining why time not available.
+        Type `str`. """
+        
+        self.during = None
+        """ Service not availablefrom this date.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(PractitionerRoleNotAvailable, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(PractitionerRoleNotAvailable, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, True),
+            ("during", "during", period.Period, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/practitionerrole_tests.py b/fhirclient/models/practitionerrole_tests.py
new file mode 100644
index 0000000..00acd98
--- /dev/null
+++ b/fhirclient/models/practitionerrole_tests.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import practitionerrole
+from .fhirdate import FHIRDate
+
+
+class PractitionerRoleTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("PractitionerRole", js["resourceType"])
+        return practitionerrole.PractitionerRole(js)
+    
+    def testPractitionerRole1(self):
+        inst = self.instantiate_from("practitionerrole-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a PractitionerRole instance")
+        self.implPractitionerRole1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("PractitionerRole", js["resourceType"])
+        inst2 = practitionerrole.PractitionerRole(js)
+        self.implPractitionerRole1(inst2)
+    
+    def implPractitionerRole1(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.availabilityExceptions, "Adam is generally unavailable on public holidays and during the Christmas/New Year break")
+        self.assertEqual(inst.availableTime[0].availableEndTime.date, FHIRDate("16:30:00").date)
+        self.assertEqual(inst.availableTime[0].availableEndTime.as_json(), "16:30:00")
+        self.assertEqual(inst.availableTime[0].availableStartTime.date, FHIRDate("09:00:00").date)
+        self.assertEqual(inst.availableTime[0].availableStartTime.as_json(), "09:00:00")
+        self.assertEqual(inst.availableTime[0].daysOfWeek[0], "mon")
+        self.assertEqual(inst.availableTime[0].daysOfWeek[1], "tue")
+        self.assertEqual(inst.availableTime[0].daysOfWeek[2], "wed")
+        self.assertEqual(inst.availableTime[1].availableEndTime.date, FHIRDate("12:00:00").date)
+        self.assertEqual(inst.availableTime[1].availableEndTime.as_json(), "12:00:00")
+        self.assertEqual(inst.availableTime[1].availableStartTime.date, FHIRDate("09:00:00").date)
+        self.assertEqual(inst.availableTime[1].availableStartTime.as_json(), "09:00:00")
+        self.assertEqual(inst.availableTime[1].daysOfWeek[0], "thu")
+        self.assertEqual(inst.availableTime[1].daysOfWeek[1], "fri")
+        self.assertEqual(inst.code[0].coding[0].code, "RP")
+        self.assertEqual(inst.code[0].coding[0].system, "http://hl7.org/fhir/v2/0286")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http://www.acme.org/practitioners")
+        self.assertEqual(inst.identifier[0].value, "23")
+        self.assertEqual(inst.notAvailable[0].description, "Adam will be on extended leave during May 2017")
+        self.assertEqual(inst.notAvailable[0].during.end.date, FHIRDate("2017-05-20").date)
+        self.assertEqual(inst.notAvailable[0].during.end.as_json(), "2017-05-20")
+        self.assertEqual(inst.notAvailable[0].during.start.date, FHIRDate("2017-05-01").date)
+        self.assertEqual(inst.notAvailable[0].during.start.as_json(), "2017-05-01")
+        self.assertEqual(inst.period.end.date, FHIRDate("2012-03-31").date)
+        self.assertEqual(inst.period.end.as_json(), "2012-03-31")
+        self.assertEqual(inst.period.start.date, FHIRDate("2012-01-01").date)
+        self.assertEqual(inst.period.start.as_json(), "2012-01-01")
+        self.assertEqual(inst.specialty[0].coding[0].code, "408443003")
+        self.assertEqual(inst.specialty[0].coding[0].display, "General medical practice")
+        self.assertEqual(inst.specialty[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "(03) 5555 6473")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "work")
+        self.assertEqual(inst.telecom[1].value, "adam.southern at example.org")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/procedure.py b/fhirclient/models/procedure.py
new file mode 100644
index 0000000..d6be5c6
--- /dev/null
+++ b/fhirclient/models/procedure.py
@@ -0,0 +1,276 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Procedure) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Procedure(domainresource.DomainResource):
+    """ An action that is being or was performed on a patient.
+    
+    An action that is or was performed on a patient. This can be a physical
+    intervention like an operation, or less invasive like counseling or
+    hypnotherapy.
+    """
+    
+    resource_type = "Procedure"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.basedOn = None
+        """ A request for this procedure.
+        List of `FHIRReference` items referencing `CarePlan, ProcedureRequest, ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.bodySite = None
+        """ Target body sites.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Classification of the procedure.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Identification of the procedure.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.complication = None
+        """ Complication following the procedure.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.complicationDetail = None
+        """ A condition that is a result of the procedure.
+        List of `FHIRReference` items referencing `Condition` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or episode associated with the procedure.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Instantiates protocol or definition.
+        List of `FHIRReference` items referencing `PlanDefinition, ActivityDefinition, HealthcareService` (represented as `dict` in JSON). """
+        
+        self.focalDevice = None
+        """ Device changed in procedure.
+        List of `ProcedureFocalDevice` items (represented as `dict` in JSON). """
+        
+        self.followUp = None
+        """ Instructions for follow up.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External Identifiers for this procedure.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.location = None
+        """ Where the procedure happened.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.notDone = None
+        """ True if procedure was not performed as scheduled.
+        Type `bool`. """
+        
+        self.notDoneReason = None
+        """ Reason procedure was not performed.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Additional information about the procedure.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.outcome = None
+        """ The result of procedure.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Part of referenced event.
+        List of `FHIRReference` items referencing `Procedure, Observation, MedicationAdministration` (represented as `dict` in JSON). """
+        
+        self.performedDateTime = None
+        """ Date/Period the procedure was performed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.performedPeriod = None
+        """ Date/Period the procedure was performed.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.performer = None
+        """ The people who performed the procedure.
+        List of `ProcedurePerformer` items (represented as `dict` in JSON). """
+        
+        self.reasonCode = None
+        """ Coded reason procedure performed.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Condition that is the reason the procedure performed.
+        List of `FHIRReference` items referencing `Condition, Observation` (represented as `dict` in JSON). """
+        
+        self.report = None
+        """ Any report resulting from the procedure.
+        List of `FHIRReference` items referencing `DiagnosticReport` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ preparation | in-progress | suspended | aborted | completed |
+        entered-in-error | unknown.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who the procedure was performed on.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.usedCode = None
+        """ Coded items used during the procedure.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.usedReference = None
+        """ Items used during procedure.
+        List of `FHIRReference` items referencing `Device, Medication, Substance` (represented as `dict` in JSON). """
+        
+        super(Procedure, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Procedure, self).elementProperties()
+        js.extend([
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("bodySite", "bodySite", codeableconcept.CodeableConcept, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("complication", "complication", codeableconcept.CodeableConcept, True, None, False),
+            ("complicationDetail", "complicationDetail", fhirreference.FHIRReference, True, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, True, None, False),
+            ("focalDevice", "focalDevice", ProcedureFocalDevice, True, None, False),
+            ("followUp", "followUp", codeableconcept.CodeableConcept, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("location", "location", fhirreference.FHIRReference, False, None, False),
+            ("notDone", "notDone", bool, False, None, False),
+            ("notDoneReason", "notDoneReason", codeableconcept.CodeableConcept, False, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("outcome", "outcome", codeableconcept.CodeableConcept, False, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, True, None, False),
+            ("performedDateTime", "performedDateTime", fhirdate.FHIRDate, False, "performed", False),
+            ("performedPeriod", "performedPeriod", period.Period, False, "performed", False),
+            ("performer", "performer", ProcedurePerformer, True, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("report", "report", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("usedCode", "usedCode", codeableconcept.CodeableConcept, True, None, False),
+            ("usedReference", "usedReference", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ProcedureFocalDevice(backboneelement.BackboneElement):
+    """ Device changed in procedure.
+    
+    A device that is implanted, removed or otherwise manipulated (calibration,
+    battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as
+    a focal portion of the Procedure.
+    """
+    
+    resource_type = "ProcedureFocalDevice"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ Kind of change to device.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.manipulated = None
+        """ Device that was changed.
+        Type `FHIRReference` referencing `Device` (represented as `dict` in JSON). """
+        
+        super(ProcedureFocalDevice, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ProcedureFocalDevice, self).elementProperties()
+        js.extend([
+            ("action", "action", codeableconcept.CodeableConcept, False, None, False),
+            ("manipulated", "manipulated", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+class ProcedurePerformer(backboneelement.BackboneElement):
+    """ The people who performed the procedure.
+    
+    Limited to 'real' people rather than equipment.
+    """
+    
+    resource_type = "ProcedurePerformer"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actor = None
+        """ The reference to the practitioner.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, RelatedPerson, Device` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization the device or practitioner was acting for.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ The role the actor was in.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ProcedurePerformer, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ProcedurePerformer, self).elementProperties()
+        js.extend([
+            ("actor", "actor", fhirreference.FHIRReference, False, None, True),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+            ("role", "role", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/procedure_tests.py b/fhirclient/models/procedure_tests.py
new file mode 100644
index 0000000..93e1ed5
--- /dev/null
+++ b/fhirclient/models/procedure_tests.py
@@ -0,0 +1,305 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import procedure
+from .fhirdate import FHIRDate
+
+
+class ProcedureTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Procedure", js["resourceType"])
+        return procedure.Procedure(js)
+    
+    def testProcedure1(self):
+        inst = self.instantiate_from("procedure-example-ambulation.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Procedure instance")
+        self.implProcedure1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Procedure", js["resourceType"])
+        inst2 = procedure.Procedure(js)
+        self.implProcedure1(inst2)
+    
+    def implProcedure1(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "62013009")
+        self.assertEqual(inst.code.coding[0].display, "Ambulating patient (procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Ambulation")
+        self.assertEqual(inst.id, "ambulation")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertTrue(inst.notDone)
+        self.assertEqual(inst.notDoneReason.coding[0].code, "398254007")
+        self.assertEqual(inst.notDoneReason.coding[0].display, "  Pre-eclampsia (disorder)")
+        self.assertEqual(inst.notDoneReason.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.notDoneReason.text, "Pre-eclampsia")
+        self.assertEqual(inst.status, "suspended")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ambulation procedure was not done</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedure2(self):
+        inst = self.instantiate_from("procedure-example-appendectomy-narrative.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Procedure instance")
+        self.implProcedure2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Procedure", js["resourceType"])
+        inst2 = procedure.Procedure(js)
+        self.implProcedure2(inst2)
+    
+    def implProcedure2(self, inst):
+        self.assertEqual(inst.id, "appendectomy-narrative")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Routine Appendectomy in April 2013 performed by Dr Cecil Surgeon</div>")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testProcedure3(self):
+        inst = self.instantiate_from("procedure-example-biopsy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Procedure instance")
+        self.implProcedure3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Procedure", js["resourceType"])
+        inst2 = procedure.Procedure(js)
+        self.implProcedure3(inst2)
+    
+    def implProcedure3(self, inst):
+        self.assertEqual(inst.bodySite[0].coding[0].code, "368225008")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Entire Left Forearm")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.bodySite[0].text, "Left forearm")
+        self.assertEqual(inst.category.coding[0].code, "103693007")
+        self.assertEqual(inst.category.coding[0].display, "Diagnostic procedure (procedure)")
+        self.assertEqual(inst.category.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category.text, "Diagnostic procedure")
+        self.assertEqual(inst.code.coding[0].code, "90105005")
+        self.assertEqual(inst.code.coding[0].display, "Biopsy of soft tissue of forearm (Procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Biopsy of suspected melanoma L) arm")
+        self.assertEqual(inst.complication[0].coding[0].code, "67750007")
+        self.assertEqual(inst.complication[0].coding[0].display, "Ineffective airway clearance (finding)")
+        self.assertEqual(inst.complication[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.complication[0].text, "Ineffective airway clearance")
+        self.assertEqual(inst.followUp[0].text, "Review in clinic")
+        self.assertEqual(inst.id, "biopsy")
+        self.assertEqual(inst.note[0].text, "Standard Biopsy")
+        self.assertEqual(inst.performedDateTime.date, FHIRDate("2014-02-03").date)
+        self.assertEqual(inst.performedDateTime.as_json(), "2014-02-03")
+        self.assertEqual(inst.reasonCode[0].text, "Dark lesion l) forearm. getting darker last 3 months.")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Biopsy of suspected melanoma L) arm</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.usedCode[0].coding[0].code, "79068005")
+        self.assertEqual(inst.usedCode[0].coding[0].display, "Needle, device (physical object)")
+        self.assertEqual(inst.usedCode[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.usedCode[0].text, "30-guage needle")
+    
+    def testProcedure4(self):
+        inst = self.instantiate_from("procedure-example-colon-biopsy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Procedure instance")
+        self.implProcedure4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Procedure", js["resourceType"])
+        inst2 = procedure.Procedure(js)
+        self.implProcedure4(inst2)
+    
+    def implProcedure4(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "76164006")
+        self.assertEqual(inst.code.coding[0].display, "Biopsy of colon (procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Biopsy of colon")
+        self.assertEqual(inst.id, "colon-biopsy")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertFalse(inst.notDone)
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Biopsy of colon, which was part of colonoscopy</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedure5(self):
+        inst = self.instantiate_from("procedure-example-colonoscopy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Procedure instance")
+        self.implProcedure5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Procedure", js["resourceType"])
+        inst2 = procedure.Procedure(js)
+        self.implProcedure5(inst2)
+    
+    def implProcedure5(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "73761001")
+        self.assertEqual(inst.code.coding[0].display, "Colonoscopy (procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Colonoscopy")
+        self.assertEqual(inst.id, "colonoscopy")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertFalse(inst.notDone)
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Colonoscopy with complication</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedure6(self):
+        inst = self.instantiate_from("procedure-example-education.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Procedure instance")
+        self.implProcedure6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Procedure", js["resourceType"])
+        inst2 = procedure.Procedure(js)
+        self.implProcedure6(inst2)
+    
+    def implProcedure6(self, inst):
+        self.assertEqual(inst.category.coding[0].code, "311401005")
+        self.assertEqual(inst.category.coding[0].display, "Patient education (procedure)")
+        self.assertEqual(inst.category.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category.text, "Education")
+        self.assertEqual(inst.code.coding[0].code, "48023004")
+        self.assertEqual(inst.code.coding[0].display, "Breast self-examination technique education (procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Health education - breast examination")
+        self.assertEqual(inst.id, "education")
+        self.assertEqual(inst.performedDateTime.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.performedDateTime.as_json(), "2014-08-16")
+        self.assertEqual(inst.reasonCode[0].text, "early detection of breast mass")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Health education - breast examination for early detection of breast mass</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedure7(self):
+        inst = self.instantiate_from("procedure-example-f001-heart.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Procedure instance")
+        self.implProcedure7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Procedure", js["resourceType"])
+        inst2 = procedure.Procedure(js)
+        self.implProcedure7(inst2)
+    
+    def implProcedure7(self, inst):
+        self.assertEqual(inst.bodySite[0].coding[0].code, "17401000")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Heart valve structure")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.coding[0].code, "34068001")
+        self.assertEqual(inst.code.coding[0].display, "Heart valve replacement")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.followUp[0].text, "described in care plan")
+        self.assertEqual(inst.id, "f001")
+        self.assertEqual(inst.outcome.text, "improved blood circulation")
+        self.assertEqual(inst.performedPeriod.end.date, FHIRDate("2011-06-27").date)
+        self.assertEqual(inst.performedPeriod.end.as_json(), "2011-06-27")
+        self.assertEqual(inst.performedPeriod.start.date, FHIRDate("2011-06-26").date)
+        self.assertEqual(inst.performedPeriod.start.as_json(), "2011-06-26")
+        self.assertEqual(inst.performer[0].role.coding[0].code, "01.000")
+        self.assertEqual(inst.performer[0].role.coding[0].display, "Arts")
+        self.assertEqual(inst.performer[0].role.coding[0].system, "urn:oid:2.16.840.1.113883.2.4.15.111")
+        self.assertEqual(inst.performer[0].role.text, "Care role")
+        self.assertEqual(inst.reasonCode[0].text, "Heart valve disorder")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedure8(self):
+        inst = self.instantiate_from("procedure-example-f002-lung.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Procedure instance")
+        self.implProcedure8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Procedure", js["resourceType"])
+        inst2 = procedure.Procedure(js)
+        self.implProcedure8(inst2)
+    
+    def implProcedure8(self, inst):
+        self.assertEqual(inst.bodySite[0].coding[0].code, "39607008")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Lung structure")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.coding[0].code, "359615001")
+        self.assertEqual(inst.code.coding[0].display, "Partial lobectomy of lung")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.followUp[0].text, "described in care plan")
+        self.assertEqual(inst.id, "f002")
+        self.assertEqual(inst.outcome.text, "improved blood circulation")
+        self.assertEqual(inst.performedPeriod.end.date, FHIRDate("2013-03-08T09:30:10+01:00").date)
+        self.assertEqual(inst.performedPeriod.end.as_json(), "2013-03-08T09:30:10+01:00")
+        self.assertEqual(inst.performedPeriod.start.date, FHIRDate("2013-03-08T09:00:10+01:00").date)
+        self.assertEqual(inst.performedPeriod.start.as_json(), "2013-03-08T09:00:10+01:00")
+        self.assertEqual(inst.performer[0].role.coding[0].code, "01.000")
+        self.assertEqual(inst.performer[0].role.coding[0].display, "Arts")
+        self.assertEqual(inst.performer[0].role.coding[0].system, "urn:oid:2.16.840.1.113883.2.4.15.111")
+        self.assertEqual(inst.performer[0].role.text, "Care role")
+        self.assertEqual(inst.reasonCode[0].text, "Malignant tumor of lung")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedure9(self):
+        inst = self.instantiate_from("procedure-example-f003-abscess.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Procedure instance")
+        self.implProcedure9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Procedure", js["resourceType"])
+        inst2 = procedure.Procedure(js)
+        self.implProcedure9(inst2)
+    
+    def implProcedure9(self, inst):
+        self.assertEqual(inst.bodySite[0].coding[0].code, "83030008")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Retropharyngeal area")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.coding[0].code, "172960003")
+        self.assertEqual(inst.code.coding[0].display, "Incision of retropharyngeal abscess")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.followUp[0].text, "described in care plan")
+        self.assertEqual(inst.id, "f003")
+        self.assertEqual(inst.outcome.text, "removal of the retropharyngeal abscess")
+        self.assertEqual(inst.performedPeriod.end.date, FHIRDate("2013-03-24T10:30:10+01:00").date)
+        self.assertEqual(inst.performedPeriod.end.as_json(), "2013-03-24T10:30:10+01:00")
+        self.assertEqual(inst.performedPeriod.start.date, FHIRDate("2013-03-24T09:30:10+01:00").date)
+        self.assertEqual(inst.performedPeriod.start.as_json(), "2013-03-24T09:30:10+01:00")
+        self.assertEqual(inst.performer[0].role.coding[0].code, "01.000")
+        self.assertEqual(inst.performer[0].role.coding[0].display, "Arts")
+        self.assertEqual(inst.performer[0].role.coding[0].system, "urn:oid:2.16.840.1.113883.2.4.15.111")
+        self.assertEqual(inst.performer[0].role.text, "Care role")
+        self.assertEqual(inst.reasonCode[0].text, "abcess in retropharyngeal area")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedure10(self):
+        inst = self.instantiate_from("procedure-example-f004-tracheotomy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Procedure instance")
+        self.implProcedure10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Procedure", js["resourceType"])
+        inst2 = procedure.Procedure(js)
+        self.implProcedure10(inst2)
+    
+    def implProcedure10(self, inst):
+        self.assertEqual(inst.bodySite[0].coding[0].code, "83030008")
+        self.assertEqual(inst.bodySite[0].coding[0].display, "Retropharyngeal area")
+        self.assertEqual(inst.bodySite[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.coding[0].code, "48387007")
+        self.assertEqual(inst.code.coding[0].display, "Tracheotomy")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.followUp[0].text, "described in care plan")
+        self.assertEqual(inst.id, "f004")
+        self.assertEqual(inst.outcome.text, "removal of the retropharyngeal abscess")
+        self.assertEqual(inst.performedPeriod.end.date, FHIRDate("2013-03-22T10:30:10+01:00").date)
+        self.assertEqual(inst.performedPeriod.end.as_json(), "2013-03-22T10:30:10+01:00")
+        self.assertEqual(inst.performedPeriod.start.date, FHIRDate("2013-03-22T09:30:10+01:00").date)
+        self.assertEqual(inst.performedPeriod.start.as_json(), "2013-03-22T09:30:10+01:00")
+        self.assertEqual(inst.performer[0].role.coding[0].code, "01.000")
+        self.assertEqual(inst.performer[0].role.coding[0].display, "Arts")
+        self.assertEqual(inst.performer[0].role.coding[0].system, "urn:oid:2.16.840.1.113883.2.4.15.111")
+        self.assertEqual(inst.performer[0].role.text, "Care role")
+        self.assertEqual(inst.reasonCode[0].text, "ensure breathing during surgery")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/procedurerequest.py b/fhirclient/models/procedurerequest.py
new file mode 100644
index 0000000..f0ce0df
--- /dev/null
+++ b/fhirclient/models/procedurerequest.py
@@ -0,0 +1,248 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ProcedureRequest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ProcedureRequest(domainresource.DomainResource):
+    """ A request for a procedure or diagnostic to be performed.
+    
+    A record of a request for diagnostic investigations, treatments, or
+    operations to be performed.
+    """
+    
+    resource_type = "ProcedureRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.asNeededBoolean = None
+        """ Preconditions for procedure or diagnostic.
+        Type `bool`. """
+        
+        self.asNeededCodeableConcept = None
+        """ Preconditions for procedure or diagnostic.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.authoredOn = None
+        """ Date request signed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.basedOn = None
+        """ What request fulfills.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.bodySite = None
+        """ Location on Body.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Classification of procedure.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ What is being requested/ordered.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or Episode during which request was created.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Protocol or definition.
+        List of `FHIRReference` items referencing `ActivityDefinition, PlanDefinition` (represented as `dict` in JSON). """
+        
+        self.doNotPerform = None
+        """ True if procedure should not be performed.
+        Type `bool`. """
+        
+        self.identifier = None
+        """ Identifiers assigned to this order.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.intent = None
+        """ proposal | plan | order +.
+        Type `str`. """
+        
+        self.note = None
+        """ Comments.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.occurrenceDateTime = None
+        """ When procedure should occur.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.occurrencePeriod = None
+        """ When procedure should occur.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.occurrenceTiming = None
+        """ When procedure should occur.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.performer = None
+        """ Requested perfomer.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, Device, RelatedPerson, HealthcareService` (represented as `dict` in JSON). """
+        
+        self.performerType = None
+        """ Performer role.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ routine | urgent | asap | stat.
+        Type `str`. """
+        
+        self.reasonCode = None
+        """ Explanation/Justification for test.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Explanation/Justification for test.
+        List of `FHIRReference` items referencing `Condition, Observation` (represented as `dict` in JSON). """
+        
+        self.relevantHistory = None
+        """ Request provenance.
+        List of `FHIRReference` items referencing `Provenance` (represented as `dict` in JSON). """
+        
+        self.replaces = None
+        """ What request replaces.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.requester = None
+        """ Who/what is requesting procedure or diagnostic.
+        Type `ProcedureRequestRequester` (represented as `dict` in JSON). """
+        
+        self.requisition = None
+        """ Composite Request ID.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.specimen = None
+        """ Procedure Samples.
+        List of `FHIRReference` items referencing `Specimen` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | suspended | completed | entered-in-error |
+        cancelled.
+        Type `str`. """
+        
+        self.subject = None
+        """ Individual the service is ordered for.
+        Type `FHIRReference` referencing `Patient, Group, Location, Device` (represented as `dict` in JSON). """
+        
+        self.supportingInfo = None
+        """ Additional clinical information.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(ProcedureRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ProcedureRequest, self).elementProperties()
+        js.extend([
+            ("asNeededBoolean", "asNeededBoolean", bool, False, "asNeeded", False),
+            ("asNeededCodeableConcept", "asNeededCodeableConcept", codeableconcept.CodeableConcept, False, "asNeeded", False),
+            ("authoredOn", "authoredOn", fhirdate.FHIRDate, False, None, False),
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("bodySite", "bodySite", codeableconcept.CodeableConcept, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, True, None, False),
+            ("doNotPerform", "doNotPerform", bool, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("intent", "intent", str, False, None, True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("occurrenceDateTime", "occurrenceDateTime", fhirdate.FHIRDate, False, "occurrence", False),
+            ("occurrencePeriod", "occurrencePeriod", period.Period, False, "occurrence", False),
+            ("occurrenceTiming", "occurrenceTiming", timing.Timing, False, "occurrence", False),
+            ("performer", "performer", fhirreference.FHIRReference, False, None, False),
+            ("performerType", "performerType", codeableconcept.CodeableConcept, False, None, False),
+            ("priority", "priority", str, False, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("relevantHistory", "relevantHistory", fhirreference.FHIRReference, True, None, False),
+            ("replaces", "replaces", fhirreference.FHIRReference, True, None, False),
+            ("requester", "requester", ProcedureRequestRequester, False, None, False),
+            ("requisition", "requisition", identifier.Identifier, False, None, False),
+            ("specimen", "specimen", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("supportingInfo", "supportingInfo", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ProcedureRequestRequester(backboneelement.BackboneElement):
+    """ Who/what is requesting procedure or diagnostic.
+    
+    The individual who initiated the request and has responsibility for its
+    activation.
+    """
+    
+    resource_type = "ProcedureRequestRequester"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.agent = None
+        """ Individual making the request.
+        Type `FHIRReference` referencing `Device, Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization agent is acting for.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(ProcedureRequestRequester, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ProcedureRequestRequester, self).elementProperties()
+        js.extend([
+            ("agent", "agent", fhirreference.FHIRReference, False, None, True),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/procedurerequest_tests.py b/fhirclient/models/procedurerequest_tests.py
new file mode 100644
index 0000000..905b4c6
--- /dev/null
+++ b/fhirclient/models/procedurerequest_tests.py
@@ -0,0 +1,267 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import procedurerequest
+from .fhirdate import FHIRDate
+
+
+class ProcedureRequestTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ProcedureRequest", js["resourceType"])
+        return procedurerequest.ProcedureRequest(js)
+    
+    def testProcedureRequest1(self):
+        inst = self.instantiate_from("procedurerequest-example-ambulation.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcedureRequest instance")
+        self.implProcedureRequest1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcedureRequest", js["resourceType"])
+        inst2 = procedurerequest.ProcedureRequest(js)
+        self.implProcedureRequest1(inst2)
+    
+    def implProcedureRequest1(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2017-03-05").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2017-03-05")
+        self.assertEqual(inst.code.coding[0].code, "62013009")
+        self.assertEqual(inst.code.coding[0].display, "Ambulating patient (procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Ambulation")
+        self.assertEqual(inst.id, "ambulation")
+        self.assertEqual(inst.identifier[0].value, "45678")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedureRequest2(self):
+        inst = self.instantiate_from("procedurerequest-example-appendectomy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcedureRequest instance")
+        self.implProcedureRequest2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcedureRequest", js["resourceType"])
+        inst2 = procedurerequest.ProcedureRequest(js)
+        self.implProcedureRequest2(inst2)
+    
+    def implProcedureRequest2(self, inst):
+        self.assertEqual(inst.code.text, "Appendectomy")
+        self.assertEqual(inst.id, "appendectomy-narrative")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testProcedureRequest3(self):
+        inst = self.instantiate_from("procedurerequest-example-colonoscopy-bx.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcedureRequest instance")
+        self.implProcedureRequest3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcedureRequest", js["resourceType"])
+        inst2 = procedurerequest.ProcedureRequest(js)
+        self.implProcedureRequest3(inst2)
+    
+    def implProcedureRequest3(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2017-03-05").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2017-03-05")
+        self.assertEqual(inst.code.coding[0].code, "76164006")
+        self.assertEqual(inst.code.coding[0].display, "Biopsy of colon (procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Biopsy of colon")
+        self.assertEqual(inst.id, "colon-biopsy")
+        self.assertEqual(inst.identifier[0].value, "12345")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.requisition.system, "http://bumc.org/requisitions")
+        self.assertEqual(inst.requisition.value, "req12345")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedureRequest4(self):
+        inst = self.instantiate_from("procedurerequest-example-colonoscopy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcedureRequest instance")
+        self.implProcedureRequest4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcedureRequest", js["resourceType"])
+        inst2 = procedurerequest.ProcedureRequest(js)
+        self.implProcedureRequest4(inst2)
+    
+    def implProcedureRequest4(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2017-03-05").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2017-03-05")
+        self.assertEqual(inst.code.coding[0].code, "73761001")
+        self.assertEqual(inst.code.coding[0].display, "Colonoscopy (procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Colonoscopy")
+        self.assertEqual(inst.id, "colonoscopy")
+        self.assertEqual(inst.identifier[0].value, "45678")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.requisition.system, "http://bumc.org/requisitions")
+        self.assertEqual(inst.requisition.value, "req12345")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedureRequest5(self):
+        inst = self.instantiate_from("procedurerequest-example-di.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcedureRequest instance")
+        self.implProcedureRequest5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcedureRequest", js["resourceType"])
+        inst2 = procedurerequest.ProcedureRequest(js)
+        self.implProcedureRequest5(inst2)
+    
+    def implProcedureRequest5(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "24627-2")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "Chest CT")
+        self.assertEqual(inst.id, "di")
+        self.assertEqual(inst.intent, "original-order")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2013-05-08T09:33:27+07:00").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2013-05-08T09:33:27+07:00")
+        self.assertEqual(inst.reasonCode[0].text, "Check for metastatic disease")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedureRequest6(self):
+        inst = self.instantiate_from("procedurerequest-example-edu.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcedureRequest instance")
+        self.implProcedureRequest6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcedureRequest", js["resourceType"])
+        inst2 = procedurerequest.ProcedureRequest(js)
+        self.implProcedureRequest6(inst2)
+    
+    def implProcedureRequest6(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2016-08-16").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2016-08-16")
+        self.assertEqual(inst.category[0].coding[0].code, "311401005")
+        self.assertEqual(inst.category[0].coding[0].display, "Patient education (procedure)")
+        self.assertEqual(inst.category[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].text, "Education")
+        self.assertEqual(inst.code.coding[0].code, "48023004")
+        self.assertEqual(inst.code.coding[0].display, "Breast self-examination technique education (procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Health education - breast examination")
+        self.assertEqual(inst.id, "education")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2014-08-16")
+        self.assertEqual(inst.reasonCode[0].text, "early detection of breast mass")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedureRequest7(self):
+        inst = self.instantiate_from("procedurerequest-example-ft4.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcedureRequest instance")
+        self.implProcedureRequest7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcedureRequest", js["resourceType"])
+        inst2 = procedurerequest.ProcedureRequest(js)
+        self.implProcedureRequest7(inst2)
+    
+    def implProcedureRequest7(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "3024-7")
+        self.assertEqual(inst.code.coding[0].system, "http://loinc.org")
+        self.assertEqual(inst.code.text, "Free T4")
+        self.assertEqual(inst.id, "ft4")
+        self.assertEqual(inst.intent, "reflex-order")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2015-08-27T09:33:27+07:00").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2015-08-27T09:33:27+07:00")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedureRequest8(self):
+        inst = self.instantiate_from("procedurerequest-example-implant.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcedureRequest instance")
+        self.implProcedureRequest8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcedureRequest", js["resourceType"])
+        inst2 = procedurerequest.ProcedureRequest(js)
+        self.implProcedureRequest8(inst2)
+    
+    def implProcedureRequest8(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2015-03-30").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2015-03-30")
+        self.assertEqual(inst.code.coding[0].code, "25267002")
+        self.assertEqual(inst.code.coding[0].display, "Insertion of intracardiac pacemaker (procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Implant Pacemaker")
+        self.assertEqual(inst.id, "example-implant")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.reasonCode[0].text, "Bradycardia")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedureRequest9(self):
+        inst = self.instantiate_from("procedurerequest-example-lipid.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcedureRequest instance")
+        self.implProcedureRequest9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcedureRequest", js["resourceType"])
+        inst2 = procedurerequest.ProcedureRequest(js)
+        self.implProcedureRequest9(inst2)
+    
+    def implProcedureRequest9(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "LIPID")
+        self.assertEqual(inst.code.coding[0].system, "http://acme.org/tests")
+        self.assertEqual(inst.code.text, "Lipid Panel")
+        self.assertEqual(inst.contained[0].id, "fasting")
+        self.assertEqual(inst.contained[1].id, "serum")
+        self.assertEqual(inst.id, "lipid")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:1.3.4.5.6.7")
+        self.assertEqual(inst.identifier[0].type.coding[0].code, "PLAC")
+        self.assertEqual(inst.identifier[0].type.coding[0].system, "http://hl7.org/fhir/identifier-type")
+        self.assertEqual(inst.identifier[0].type.text, "Placer")
+        self.assertEqual(inst.identifier[0].value, "2345234234234")
+        self.assertEqual(inst.intent, "original-order")
+        self.assertEqual(inst.note[0].text, "patient is afraid of needles")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2013-05-02T16:16:00-07:00").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2013-05-02T16:16:00-07:00")
+        self.assertEqual(inst.reasonCode[0].coding[0].code, "V173")
+        self.assertEqual(inst.reasonCode[0].coding[0].display, "Fam hx-ischem heart dis")
+        self.assertEqual(inst.reasonCode[0].coding[0].system, "http://hl7.org/fhir/sid/icd-9")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcedureRequest10(self):
+        inst = self.instantiate_from("procedurerequest-example-ob.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcedureRequest instance")
+        self.implProcedureRequest10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcedureRequest", js["resourceType"])
+        inst2 = procedurerequest.ProcedureRequest(js)
+        self.implProcedureRequest10(inst2)
+    
+    def implProcedureRequest10(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "386637004")
+        self.assertEqual(inst.category[0].coding[0].display, "Obstetric procedure (procedure)")
+        self.assertEqual(inst.category[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.category[0].text, "OB")
+        self.assertEqual(inst.code.coding[0].code, "22633006")
+        self.assertEqual(inst.code.coding[0].display, "Vaginal delivery, medical personnel present (procedure)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.code.text, "Vaginal delivery")
+        self.assertEqual(inst.id, "ob")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2012-06-02").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2012-06-02")
+        self.assertEqual(inst.reasonCode[0].text, "term pregnancy, active labor")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/processrequest.py b/fhirclient/models/processrequest.py
new file mode 100644
index 0000000..5cd48f8
--- /dev/null
+++ b/fhirclient/models/processrequest.py
@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ProcessRequest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ProcessRequest(domainresource.DomainResource):
+    """ Request to perform some action on or in regards to an existing resource.
+    
+    This resource provides the target, request and response, and action details
+    for an action to be performed by the target on or about existing resources.
+    """
+    
+    resource_type = "ProcessRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ cancel | poll | reprocess | status.
+        Type `str`. """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.exclude = None
+        """ Resource type(s) to exclude.
+        List of `str` items. """
+        
+        self.identifier = None
+        """ Business Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.include = None
+        """ Resource type(s) to include.
+        List of `str` items. """
+        
+        self.item = None
+        """ Items to re-adjudicate.
+        List of `ProcessRequestItem` items (represented as `dict` in JSON). """
+        
+        self.nullify = None
+        """ Remove history.
+        Type `bool`. """
+        
+        self.organization = None
+        """ Responsible organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Selection period.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.provider = None
+        """ Responsible practitioner.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.reference = None
+        """ Reference number/string.
+        Type `str`. """
+        
+        self.request = None
+        """ Reference to the Request resource.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.response = None
+        """ Reference to the Response resource.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        self.target = None
+        """ Party which is the target of the request.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(ProcessRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ProcessRequest, self).elementProperties()
+        js.extend([
+            ("action", "action", str, False, None, False),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("exclude", "exclude", str, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("include", "include", str, True, None, False),
+            ("item", "item", ProcessRequestItem, True, None, False),
+            ("nullify", "nullify", bool, False, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("provider", "provider", fhirreference.FHIRReference, False, None, False),
+            ("reference", "reference", str, False, None, False),
+            ("request", "request", fhirreference.FHIRReference, False, None, False),
+            ("response", "response", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("target", "target", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ProcessRequestItem(backboneelement.BackboneElement):
+    """ Items to re-adjudicate.
+    
+    List of top level items to be re-adjudicated, if none specified then the
+    entire submission is re-adjudicated.
+    """
+    
+    resource_type = "ProcessRequestItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.sequenceLinkId = None
+        """ Service instance.
+        Type `int`. """
+        
+        super(ProcessRequestItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ProcessRequestItem, self).elementProperties()
+        js.extend([
+            ("sequenceLinkId", "sequenceLinkId", int, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/processrequest_tests.py b/fhirclient/models/processrequest_tests.py
new file mode 100644
index 0000000..cd68a92
--- /dev/null
+++ b/fhirclient/models/processrequest_tests.py
@@ -0,0 +1,224 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import processrequest
+from .fhirdate import FHIRDate
+
+
+class ProcessRequestTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ProcessRequest", js["resourceType"])
+        return processrequest.ProcessRequest(js)
+    
+    def testProcessRequest1(self):
+        inst = self.instantiate_from("processrequest-example-poll-eob.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessRequest instance")
+        self.implProcessRequest1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessRequest", js["resourceType"])
+        inst2 = processrequest.ProcessRequest(js)
+        self.implProcessRequest1(inst2)
+    
+    def implProcessRequest1(self, inst):
+        self.assertEqual(inst.action, "poll")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "1115")
+        self.assertEqual(inst.identifier[0].system, "http://www.phr.com/patient/12345/processrequest")
+        self.assertEqual(inst.identifier[0].value, "115")
+        self.assertEqual(inst.include[0], "ExplanationOfBenefit")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Poll ProcessRequest</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcessRequest2(self):
+        inst = self.instantiate_from("processrequest-example-poll-exclusive.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessRequest instance")
+        self.implProcessRequest2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessRequest", js["resourceType"])
+        inst2 = processrequest.ProcessRequest(js)
+        self.implProcessRequest2(inst2)
+    
+    def implProcessRequest2(self, inst):
+        self.assertEqual(inst.action, "poll")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.exclude[0], "Communication")
+        self.assertEqual(inst.exclude[1], "PaymentReconciliation")
+        self.assertEqual(inst.id, "1113")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/processrequest")
+        self.assertEqual(inst.identifier[0].value, "113")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Poll ProcessRequest</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcessRequest3(self):
+        inst = self.instantiate_from("processrequest-example-poll-inclusive.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessRequest instance")
+        self.implProcessRequest3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessRequest", js["resourceType"])
+        inst2 = processrequest.ProcessRequest(js)
+        self.implProcessRequest3(inst2)
+    
+    def implProcessRequest3(self, inst):
+        self.assertEqual(inst.action, "poll")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "1112")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/processrequest")
+        self.assertEqual(inst.identifier[0].value, "112")
+        self.assertEqual(inst.include[0], "PaymentReconciliation")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Poll ProcessRequest</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcessRequest4(self):
+        inst = self.instantiate_from("processrequest-example-poll-payrec.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessRequest instance")
+        self.implProcessRequest4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessRequest", js["resourceType"])
+        inst2 = processrequest.ProcessRequest(js)
+        self.implProcessRequest4(inst2)
+    
+    def implProcessRequest4(self, inst):
+        self.assertEqual(inst.action, "poll")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "1114")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/processrequest")
+        self.assertEqual(inst.identifier[0].value, "114")
+        self.assertEqual(inst.include[0], "PaymentReconciliation")
+        self.assertEqual(inst.period.end.date, FHIRDate("2014-08-20").date)
+        self.assertEqual(inst.period.end.as_json(), "2014-08-20")
+        self.assertEqual(inst.period.start.date, FHIRDate("2014-08-10").date)
+        self.assertEqual(inst.period.start.as_json(), "2014-08-10")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Poll ProcessRequest</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcessRequest5(self):
+        inst = self.instantiate_from("processrequest-example-poll-specific.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessRequest instance")
+        self.implProcessRequest5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessRequest", js["resourceType"])
+        inst2 = processrequest.ProcessRequest(js)
+        self.implProcessRequest5(inst2)
+    
+    def implProcessRequest5(self, inst):
+        self.assertEqual(inst.action, "poll")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "1111")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/processrequest")
+        self.assertEqual(inst.identifier[0].value, "111")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Poll ProcessRequest</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcessRequest6(self):
+        inst = self.instantiate_from("processrequest-example-reprocess.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessRequest instance")
+        self.implProcessRequest6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessRequest", js["resourceType"])
+        inst2 = processrequest.ProcessRequest(js)
+        self.implProcessRequest6(inst2)
+    
+    def implProcessRequest6(self, inst):
+        self.assertEqual(inst.action, "reprocess")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "44654")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/processrequest")
+        self.assertEqual(inst.identifier[0].value, "44543")
+        self.assertEqual(inst.item[0].sequenceLinkId, 1)
+        self.assertEqual(inst.reference, "ABC12345G")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the ReProcess ProcessRequest resource.</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcessRequest7(self):
+        inst = self.instantiate_from("processrequest-example-reverse.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessRequest instance")
+        self.implProcessRequest7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessRequest", js["resourceType"])
+        inst2 = processrequest.ProcessRequest(js)
+        self.implProcessRequest7(inst2)
+    
+    def implProcessRequest7(self, inst):
+        self.assertEqual(inst.action, "cancel")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "87654")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/processrequest")
+        self.assertEqual(inst.identifier[0].value, "76543")
+        self.assertFalse(inst.nullify)
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Reversal ProcessRequest</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcessRequest8(self):
+        inst = self.instantiate_from("processrequest-example-status.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessRequest instance")
+        self.implProcessRequest8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessRequest", js["resourceType"])
+        inst2 = processrequest.ProcessRequest(js)
+        self.implProcessRequest8(inst2)
+    
+    def implProcessRequest8(self, inst):
+        self.assertEqual(inst.action, "status")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "87655")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/processrequest")
+        self.assertEqual(inst.identifier[0].value, "1776543")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Status ProcessRequest</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcessRequest9(self):
+        inst = self.instantiate_from("processrequest-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessRequest instance")
+        self.implProcessRequest9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessRequest", js["resourceType"])
+        inst2 = processrequest.ProcessRequest(js)
+        self.implProcessRequest9(inst2)
+    
+    def implProcessRequest9(self, inst):
+        self.assertEqual(inst.action, "poll")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.id, "1110")
+        self.assertEqual(inst.identifier[0].system, "http://happyvalley.com/processrequest")
+        self.assertEqual(inst.identifier[0].value, "110")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the Poll ProcessRequest</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/processresponse.py b/fhirclient/models/processresponse.py
new file mode 100644
index 0000000..6f20bcc
--- /dev/null
+++ b/fhirclient/models/processresponse.py
@@ -0,0 +1,155 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ProcessResponse) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ProcessResponse(domainresource.DomainResource):
+    """ ProcessResponse resource.
+    
+    This resource provides processing status, errors and notes from the
+    processing of a resource.
+    """
+    
+    resource_type = "ProcessResponse"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.communicationRequest = None
+        """ Request for additional information.
+        List of `FHIRReference` items referencing `CommunicationRequest` (represented as `dict` in JSON). """
+        
+        self.created = None
+        """ Creation date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.disposition = None
+        """ Disposition Message.
+        Type `str`. """
+        
+        self.error = None
+        """ Error code.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.form = None
+        """ Printed Form Identifier.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.organization = None
+        """ Authoring Organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.outcome = None
+        """ Processing outcome.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.processNote = None
+        """ Processing comments or additional requirements.
+        List of `ProcessResponseProcessNote` items (represented as `dict` in JSON). """
+        
+        self.request = None
+        """ Request reference.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.requestOrganization = None
+        """ Responsible organization.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.requestProvider = None
+        """ Responsible Practitioner.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        super(ProcessResponse, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ProcessResponse, self).elementProperties()
+        js.extend([
+            ("communicationRequest", "communicationRequest", fhirreference.FHIRReference, True, None, False),
+            ("created", "created", fhirdate.FHIRDate, False, None, False),
+            ("disposition", "disposition", str, False, None, False),
+            ("error", "error", codeableconcept.CodeableConcept, True, None, False),
+            ("form", "form", codeableconcept.CodeableConcept, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("organization", "organization", fhirreference.FHIRReference, False, None, False),
+            ("outcome", "outcome", codeableconcept.CodeableConcept, False, None, False),
+            ("processNote", "processNote", ProcessResponseProcessNote, True, None, False),
+            ("request", "request", fhirreference.FHIRReference, False, None, False),
+            ("requestOrganization", "requestOrganization", fhirreference.FHIRReference, False, None, False),
+            ("requestProvider", "requestProvider", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ProcessResponseProcessNote(backboneelement.BackboneElement):
+    """ Processing comments or additional requirements.
+    
+    Suite of processing notes or additional requirements if the processing has
+    been held.
+    """
+    
+    resource_type = "ProcessResponseProcessNote"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.text = None
+        """ Comment on the processing.
+        Type `str`. """
+        
+        self.type = None
+        """ display | print | printoper.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ProcessResponseProcessNote, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ProcessResponseProcessNote, self).elementProperties()
+        js.extend([
+            ("text", "text", str, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/processresponse_tests.py b/fhirclient/models/processresponse_tests.py
new file mode 100644
index 0000000..3c97180
--- /dev/null
+++ b/fhirclient/models/processresponse_tests.py
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import processresponse
+from .fhirdate import FHIRDate
+
+
+class ProcessResponseTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ProcessResponse", js["resourceType"])
+        return processresponse.ProcessResponse(js)
+    
+    def testProcessResponse1(self):
+        inst = self.instantiate_from("processresponse-example-error.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessResponse instance")
+        self.implProcessResponse1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessResponse", js["resourceType"])
+        inst2 = processresponse.ProcessResponse(js)
+        self.implProcessResponse1(inst2)
+    
+    def implProcessResponse1(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-07-14").date)
+        self.assertEqual(inst.created.as_json(), "2014-07-14")
+        self.assertEqual(inst.disposition, "Referred to claim not found on system.")
+        self.assertEqual(inst.error[0].coding[0].code, "a001")
+        self.assertEqual(inst.error[0].coding[0].system, "http://hl7.org/fhir/adjudication-error")
+        self.assertEqual(inst.form.coding[0].code, "PRRESP/2016/01")
+        self.assertEqual(inst.form.coding[0].system, "http://ncforms.org/formid")
+        self.assertEqual(inst.id, "SR2349")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/processresponse")
+        self.assertEqual(inst.identifier[0].value, "ER987634")
+        self.assertEqual(inst.outcome.coding[0].code, "error")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/processoutcomecodes")
+        self.assertEqual(inst.processNote[0].text, "Please check the submitted payor identification and local claim number.")
+        self.assertEqual(inst.processNote[0].type.coding[0].code, "print")
+        self.assertEqual(inst.processNote[0].type.coding[0].system, "http://hl7.org/fhir/note-type")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the ProcessResponse</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcessResponse2(self):
+        inst = self.instantiate_from("processresponse-example-pended.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessResponse instance")
+        self.implProcessResponse2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessResponse", js["resourceType"])
+        inst2 = processresponse.ProcessResponse(js)
+        self.implProcessResponse2(inst2)
+    
+    def implProcessResponse2(self, inst):
+        self.assertEqual(inst.contained[0].id, "comreq-1")
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.disposition, "Additional information required.")
+        self.assertEqual(inst.id, "SR2499")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/processresponse")
+        self.assertEqual(inst.identifier[0].value, "881222")
+        self.assertEqual(inst.outcome.coding[0].code, "pended")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/processoutcomecodes")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A ProcessResponse indicating pended status with a request for additional information.</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProcessResponse3(self):
+        inst = self.instantiate_from("processresponse-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ProcessResponse instance")
+        self.implProcessResponse3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ProcessResponse", js["resourceType"])
+        inst2 = processresponse.ProcessResponse(js)
+        self.implProcessResponse3(inst2)
+    
+    def implProcessResponse3(self, inst):
+        self.assertEqual(inst.created.date, FHIRDate("2014-08-16").date)
+        self.assertEqual(inst.created.as_json(), "2014-08-16")
+        self.assertEqual(inst.disposition, "Adjudication processing completed, ClaimResponse and EOB ready for retrieval.")
+        self.assertEqual(inst.id, "SR2500")
+        self.assertEqual(inst.identifier[0].system, "http://www.BenefitsInc.com/fhir/processresponse")
+        self.assertEqual(inst.identifier[0].value, "881234")
+        self.assertEqual(inst.outcome.coding[0].code, "complete")
+        self.assertEqual(inst.outcome.coding[0].system, "http://hl7.org/fhir/processoutcomecodes")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">A human-readable rendering of the ProcessResponse</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/provenance.py b/fhirclient/models/provenance.py
new file mode 100644
index 0000000..f15aa81
--- /dev/null
+++ b/fhirclient/models/provenance.py
@@ -0,0 +1,228 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Provenance) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Provenance(domainresource.DomainResource):
+    """ Who, What, When for a set of resources.
+    
+    Provenance of a resource is a record that describes entities and processes
+    involved in producing and delivering or otherwise influencing that
+    resource. Provenance provides a critical foundation for assessing
+    authenticity, enabling trust, and allowing reproducibility. Provenance
+    assertions are a form of contextual metadata and can themselves become
+    important records with their own provenance. Provenance statement indicates
+    clinical significance in terms of confidence in authenticity, reliability,
+    and trustworthiness, integrity, and stage in lifecycle (e.g. Document
+    Completion - has the artifact been legally authenticated), all of which may
+    impact security, privacy, and trust policies.
+    """
+    
+    resource_type = "Provenance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.activity = None
+        """ Activity that occurred.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.agent = None
+        """ Actor involved.
+        List of `ProvenanceAgent` items (represented as `dict` in JSON). """
+        
+        self.entity = None
+        """ An entity used in this activity.
+        List of `ProvenanceEntity` items (represented as `dict` in JSON). """
+        
+        self.location = None
+        """ Where the activity occurred, if relevant.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ When the activity occurred.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.policy = None
+        """ Policy or plan the activity was defined by.
+        List of `str` items. """
+        
+        self.reason = None
+        """ Reason the activity is occurring.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.recorded = None
+        """ When the activity was recorded / updated.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.signature = None
+        """ Signature on target.
+        List of `Signature` items (represented as `dict` in JSON). """
+        
+        self.target = None
+        """ Target Reference(s) (usually version specific).
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(Provenance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Provenance, self).elementProperties()
+        js.extend([
+            ("activity", "activity", coding.Coding, False, None, False),
+            ("agent", "agent", ProvenanceAgent, True, None, True),
+            ("entity", "entity", ProvenanceEntity, True, None, False),
+            ("location", "location", fhirreference.FHIRReference, False, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("policy", "policy", str, True, None, False),
+            ("reason", "reason", coding.Coding, True, None, False),
+            ("recorded", "recorded", fhirdate.FHIRDate, False, None, True),
+            ("signature", "signature", signature.Signature, True, None, False),
+            ("target", "target", fhirreference.FHIRReference, True, None, True),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ProvenanceAgent(backboneelement.BackboneElement):
+    """ Actor involved.
+    
+    An actor taking a role in an activity  for which it can be assigned some
+    degree of responsibility for the activity taking place.
+    """
+    
+    resource_type = "ProvenanceAgent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.onBehalfOfReference = None
+        """ Who the agent is representing.
+        Type `FHIRReference` referencing `Practitioner, RelatedPerson, Patient, Device, Organization` (represented as `dict` in JSON). """
+        
+        self.onBehalfOfUri = None
+        """ Who the agent is representing.
+        Type `str`. """
+        
+        self.relatedAgentType = None
+        """ Type of relationship between agents.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ What the agents role was.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.whoReference = None
+        """ Who participated.
+        Type `FHIRReference` referencing `Practitioner, RelatedPerson, Patient, Device, Organization` (represented as `dict` in JSON). """
+        
+        self.whoUri = None
+        """ Who participated.
+        Type `str`. """
+        
+        super(ProvenanceAgent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ProvenanceAgent, self).elementProperties()
+        js.extend([
+            ("onBehalfOfReference", "onBehalfOfReference", fhirreference.FHIRReference, False, "onBehalfOf", False),
+            ("onBehalfOfUri", "onBehalfOfUri", str, False, "onBehalfOf", False),
+            ("relatedAgentType", "relatedAgentType", codeableconcept.CodeableConcept, False, None, False),
+            ("role", "role", codeableconcept.CodeableConcept, True, None, False),
+            ("whoReference", "whoReference", fhirreference.FHIRReference, False, "who", True),
+            ("whoUri", "whoUri", str, False, "who", True),
+        ])
+        return js
+
+
+class ProvenanceEntity(backboneelement.BackboneElement):
+    """ An entity used in this activity.
+    """
+    
+    resource_type = "ProvenanceEntity"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.agent = None
+        """ Entity is attributed to this agent.
+        List of `ProvenanceAgent` items (represented as `dict` in JSON). """
+        
+        self.role = None
+        """ derivation | revision | quotation | source | removal.
+        Type `str`. """
+        
+        self.whatIdentifier = None
+        """ Identity of entity.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.whatReference = None
+        """ Identity of entity.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.whatUri = None
+        """ Identity of entity.
+        Type `str`. """
+        
+        super(ProvenanceEntity, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ProvenanceEntity, self).elementProperties()
+        js.extend([
+            ("agent", "agent", ProvenanceAgent, True, None, False),
+            ("role", "role", str, False, None, True),
+            ("whatIdentifier", "whatIdentifier", identifier.Identifier, False, "what", True),
+            ("whatReference", "whatReference", fhirreference.FHIRReference, False, "what", True),
+            ("whatUri", "whatUri", str, False, "what", True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import signature
+except ImportError:
+    signature = sys.modules[__package__ + '.signature']
diff --git a/fhirclient/models/provenance_tests.py b/fhirclient/models/provenance_tests.py
new file mode 100644
index 0000000..5b5ec97
--- /dev/null
+++ b/fhirclient/models/provenance_tests.py
@@ -0,0 +1,141 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import provenance
+from .fhirdate import FHIRDate
+
+
+class ProvenanceTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Provenance", js["resourceType"])
+        return provenance.Provenance(js)
+    
+    def testProvenance1(self):
+        inst = self.instantiate_from("provenance-example-biocompute-object.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Provenance instance")
+        self.implProvenance1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Provenance", js["resourceType"])
+        inst2 = provenance.Provenance(js)
+        self.implProvenance1(inst2)
+    
+    def implProvenance1(self, inst):
+        self.assertEqual(inst.agent[0].role[0].coding[0].code, "AUT")
+        self.assertEqual(inst.agent[0].role[0].coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.entity[0].role, "source")
+        self.assertEqual(inst.entity[0].whatIdentifier.type.coding[0].code, "biocompute")
+        self.assertEqual(inst.entity[0].whatIdentifier.type.coding[0].display, "obj.1001")
+        self.assertEqual(inst.entity[0].whatIdentifier.type.coding[0].system, "https://hive.biochemistry.gwu.edu")
+        self.assertEqual(inst.entity[0].whatIdentifier.value, "https://hive.biochemistry.gwu.edu/cgi-bin/prd/htscsrs/servlet.cgi?pageid=bcoexample_1")
+        self.assertEqual(inst.id, "example-biocompute-object")
+        self.assertEqual(inst.period.start.date, FHIRDate("2017-06-06").date)
+        self.assertEqual(inst.period.start.as_json(), "2017-06-06")
+        self.assertEqual(inst.reason[0].display, "antiviral resistance detection")
+        self.assertEqual(inst.recorded.date, FHIRDate("2016-06-09T08:12:14+10:00").date)
+        self.assertEqual(inst.recorded.as_json(), "2016-06-09T08:12:14+10:00")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProvenance2(self):
+        inst = self.instantiate_from("provenance-example-cwl.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Provenance instance")
+        self.implProvenance2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Provenance", js["resourceType"])
+        inst2 = provenance.Provenance(js)
+        self.implProvenance2(inst2)
+    
+    def implProvenance2(self, inst):
+        self.assertEqual(inst.agent[0].role[0].coding[0].code, "AUT")
+        self.assertEqual(inst.agent[0].role[0].coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.entity[0].role, "source")
+        self.assertEqual(inst.entity[0].whatIdentifier.type.coding[0].code, "CWL")
+        self.assertEqual(inst.entity[0].whatIdentifier.type.coding[0].display, "lobSTR")
+        self.assertEqual(inst.entity[0].whatIdentifier.type.coding[0].system, "https://github.com/common-workflow-language/workflows")
+        self.assertEqual(inst.entity[0].whatIdentifier.value, "https://github.com/common-workflow-language/workflows/blob/master/workflows/lobSTR/lobSTR-workflow.cwl")
+        self.assertEqual(inst.id, "example-cwl")
+        self.assertEqual(inst.period.start.date, FHIRDate("2016-11-30").date)
+        self.assertEqual(inst.period.start.as_json(), "2016-11-30")
+        self.assertEqual(inst.reason[0].display, "profiling Short Tandem Repeats (STRs) from high throughput sequencing data.")
+        self.assertEqual(inst.recorded.date, FHIRDate("2016-12-01T08:12:14+10:00").date)
+        self.assertEqual(inst.recorded.as_json(), "2016-12-01T08:12:14+10:00")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProvenance3(self):
+        inst = self.instantiate_from("provenance-example-sig.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Provenance instance")
+        self.implProvenance3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Provenance", js["resourceType"])
+        inst2 = provenance.Provenance(js)
+        self.implProvenance3(inst2)
+    
+    def implProvenance3(self, inst):
+        self.assertEqual(inst.activity.code, "AU")
+        self.assertEqual(inst.activity.display, "authenticated")
+        self.assertEqual(inst.activity.system, "http://hl7.org/fhir/v3/DocumentCompletion")
+        self.assertEqual(inst.agent[0].role[0].coding[0].code, "VERF")
+        self.assertEqual(inst.agent[0].role[0].coding[0].system, "http://www.hl7.org/fhir/contractsignertypecodes")
+        self.assertEqual(inst.agent[0].whoUri, "mailto://hhd@ssa.gov")
+        self.assertEqual(inst.id, "signature")
+        self.assertEqual(inst.reason[0].code, "TREAT")
+        self.assertEqual(inst.reason[0].display, "treatment")
+        self.assertEqual(inst.reason[0].system, "http://hl7.org/fhir/v3/ActReason")
+        self.assertEqual(inst.recorded.date, FHIRDate("2015-08-27T08:39:24+10:00").date)
+        self.assertEqual(inst.recorded.as_json(), "2015-08-27T08:39:24+10:00")
+        self.assertEqual(inst.signature[0].blob, "Li4u")
+        self.assertEqual(inst.signature[0].contentType, "application/signature+xml")
+        self.assertEqual(inst.signature[0].type[0].code, "1.2.840.10065.1.12.1.5")
+        self.assertEqual(inst.signature[0].type[0].display, "Verification Signature")
+        self.assertEqual(inst.signature[0].type[0].system, "urn:iso-astm:E1762-95:2013")
+        self.assertEqual(inst.signature[0].when.date, FHIRDate("2015-08-27T08:39:24+10:00").date)
+        self.assertEqual(inst.signature[0].when.as_json(), "2015-08-27T08:39:24+10:00")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">procedure record authored on 27-June 2015 by Harold Hippocrates, MD Content extracted from Referral received 26-June</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testProvenance4(self):
+        inst = self.instantiate_from("provenance-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Provenance instance")
+        self.implProvenance4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Provenance", js["resourceType"])
+        inst2 = provenance.Provenance(js)
+        self.implProvenance4(inst2)
+    
+    def implProvenance4(self, inst):
+        self.assertEqual(inst.agent[0].onBehalfOfUri, "#a1")
+        self.assertEqual(inst.agent[0].relatedAgentType.text, "used")
+        self.assertEqual(inst.agent[0].role[0].coding[0].code, "AUT")
+        self.assertEqual(inst.agent[0].role[0].coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.agent[1].id, "a1")
+        self.assertEqual(inst.agent[1].role[0].coding[0].code, "DEV")
+        self.assertEqual(inst.agent[1].role[0].coding[0].system, "http://hl7.org/fhir/v3/ParticipationType")
+        self.assertEqual(inst.entity[0].role, "source")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.period.end.date, FHIRDate("2015-06-28").date)
+        self.assertEqual(inst.period.end.as_json(), "2015-06-28")
+        self.assertEqual(inst.period.start.date, FHIRDate("2015-06-27").date)
+        self.assertEqual(inst.period.start.as_json(), "2015-06-27")
+        self.assertEqual(inst.policy[0], "http://acme.com/fhir/Consent/25")
+        self.assertEqual(inst.reason[0].code, "3457005")
+        self.assertEqual(inst.reason[0].display, "Referral")
+        self.assertEqual(inst.reason[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.recorded.date, FHIRDate("2015-06-27T08:39:24+10:00").date)
+        self.assertEqual(inst.recorded.as_json(), "2015-06-27T08:39:24+10:00")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">procedure record authored on 27-June 2015 by Harold Hippocrates, MD Content extracted from XDS managed CDA Referral received 26-June</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/quantity.py b/fhirclient/models/quantity.py
new file mode 100644
index 0000000..0a8349d
--- /dev/null
+++ b/fhirclient/models/quantity.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Quantity) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Quantity(element.Element):
+    """ A measured or measurable amount.
+    
+    A measured amount (or an amount that can potentially be measured). Note
+    that measured amounts include amounts that are not precisely quantified,
+    including amounts involving arbitrary units and floating currencies.
+    """
+    
+    resource_type = "Quantity"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Coded form of the unit.
+        Type `str`. """
+        
+        self.comparator = None
+        """ < | <= | >= | > - how to understand the value.
+        Type `str`. """
+        
+        self.system = None
+        """ System that defines coded unit form.
+        Type `str`. """
+        
+        self.unit = None
+        """ Unit representation.
+        Type `str`. """
+        
+        self.value = None
+        """ Numerical value (with implicit precision).
+        Type `float`. """
+        
+        super(Quantity, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Quantity, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, False),
+            ("comparator", "comparator", str, False, None, False),
+            ("system", "system", str, False, None, False),
+            ("unit", "unit", str, False, None, False),
+            ("value", "value", float, False, None, False),
+        ])
+        return js
+
+
diff --git a/fhirclient/models/questionnaire.py b/fhirclient/models/questionnaire.py
new file mode 100644
index 0000000..d8df7f1
--- /dev/null
+++ b/fhirclient/models/questionnaire.py
@@ -0,0 +1,488 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Questionnaire) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Questionnaire(domainresource.DomainResource):
+    """ A structured set of questions.
+    
+    A structured set of questions intended to guide the collection of answers
+    from end-users. Questionnaires provide detailed control over order,
+    presentation, phraseology and grouping to allow coherent, consistent data
+    collection.
+    """
+    
+    resource_type = "Questionnaire"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.approvalDate = None
+        """ When the questionnaire was approved by publisher.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.code = None
+        """ Concept that represents the overall questionnaire.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the questionnaire.
+        Type `str`. """
+        
+        self.effectivePeriod = None
+        """ When the questionnaire is expected to be used.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.identifier = None
+        """ Additional identifier for the questionnaire.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.item = None
+        """ Questions and sections within the Questionnaire.
+        List of `QuestionnaireItem` items (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for questionnaire (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.lastReviewDate = None
+        """ When the questionnaire was last reviewed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.name = None
+        """ Name for this questionnaire (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this questionnaire is defined.
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.subjectType = None
+        """ Resource that can be subject of QuestionnaireResponse.
+        List of `str` items. """
+        
+        self.title = None
+        """ Name for this questionnaire (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this questionnaire (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the questionnaire.
+        Type `str`. """
+        
+        super(Questionnaire, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Questionnaire, self).elementProperties()
+        js.extend([
+            ("approvalDate", "approvalDate", fhirdate.FHIRDate, False, None, False),
+            ("code", "code", coding.Coding, True, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("item", "item", QuestionnaireItem, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("lastReviewDate", "lastReviewDate", fhirdate.FHIRDate, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subjectType", "subjectType", str, True, None, False),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class QuestionnaireItem(backboneelement.BackboneElement):
+    """ Questions and sections within the Questionnaire.
+    
+    A particular question, question grouping or display text that is part of
+    the questionnaire.
+    """
+    
+    resource_type = "QuestionnaireItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Corresponding concept for this item in a terminology.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ ElementDefinition - details for the item.
+        Type `str`. """
+        
+        self.enableWhen = None
+        """ Only allow data when.
+        List of `QuestionnaireItemEnableWhen` items (represented as `dict` in JSON). """
+        
+        self.initialAttachment = None
+        """ Default value when item is first rendered.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.initialBoolean = None
+        """ Default value when item is first rendered.
+        Type `bool`. """
+        
+        self.initialCoding = None
+        """ Default value when item is first rendered.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.initialDate = None
+        """ Default value when item is first rendered.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.initialDateTime = None
+        """ Default value when item is first rendered.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.initialDecimal = None
+        """ Default value when item is first rendered.
+        Type `float`. """
+        
+        self.initialInteger = None
+        """ Default value when item is first rendered.
+        Type `int`. """
+        
+        self.initialQuantity = None
+        """ Default value when item is first rendered.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.initialReference = None
+        """ Default value when item is first rendered.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.initialString = None
+        """ Default value when item is first rendered.
+        Type `str`. """
+        
+        self.initialTime = None
+        """ Default value when item is first rendered.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.initialUri = None
+        """ Default value when item is first rendered.
+        Type `str`. """
+        
+        self.item = None
+        """ Nested questionnaire items.
+        List of `QuestionnaireItem` items (represented as `dict` in JSON). """
+        
+        self.linkId = None
+        """ Unique id for item in questionnaire.
+        Type `str`. """
+        
+        self.maxLength = None
+        """ No more than this many characters.
+        Type `int`. """
+        
+        self.option = None
+        """ Permitted answer.
+        List of `QuestionnaireItemOption` items (represented as `dict` in JSON). """
+        
+        self.options = None
+        """ Valueset containing permitted answers.
+        Type `FHIRReference` referencing `ValueSet` (represented as `dict` in JSON). """
+        
+        self.prefix = None
+        """ E.g. "1(a)", "2.5.3".
+        Type `str`. """
+        
+        self.readOnly = None
+        """ Don't allow human editing.
+        Type `bool`. """
+        
+        self.repeats = None
+        """ Whether the item may repeat.
+        Type `bool`. """
+        
+        self.required = None
+        """ Whether the item must be included in data results.
+        Type `bool`. """
+        
+        self.text = None
+        """ Primary text for the item.
+        Type `str`. """
+        
+        self.type = None
+        """ group | display | boolean | decimal | integer | date | dateTime +.
+        Type `str`. """
+        
+        super(QuestionnaireItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(QuestionnaireItem, self).elementProperties()
+        js.extend([
+            ("code", "code", coding.Coding, True, None, False),
+            ("definition", "definition", str, False, None, False),
+            ("enableWhen", "enableWhen", QuestionnaireItemEnableWhen, True, None, False),
+            ("initialAttachment", "initialAttachment", attachment.Attachment, False, "initial", False),
+            ("initialBoolean", "initialBoolean", bool, False, "initial", False),
+            ("initialCoding", "initialCoding", coding.Coding, False, "initial", False),
+            ("initialDate", "initialDate", fhirdate.FHIRDate, False, "initial", False),
+            ("initialDateTime", "initialDateTime", fhirdate.FHIRDate, False, "initial", False),
+            ("initialDecimal", "initialDecimal", float, False, "initial", False),
+            ("initialInteger", "initialInteger", int, False, "initial", False),
+            ("initialQuantity", "initialQuantity", quantity.Quantity, False, "initial", False),
+            ("initialReference", "initialReference", fhirreference.FHIRReference, False, "initial", False),
+            ("initialString", "initialString", str, False, "initial", False),
+            ("initialTime", "initialTime", fhirdate.FHIRDate, False, "initial", False),
+            ("initialUri", "initialUri", str, False, "initial", False),
+            ("item", "item", QuestionnaireItem, True, None, False),
+            ("linkId", "linkId", str, False, None, True),
+            ("maxLength", "maxLength", int, False, None, False),
+            ("option", "option", QuestionnaireItemOption, True, None, False),
+            ("options", "options", fhirreference.FHIRReference, False, None, False),
+            ("prefix", "prefix", str, False, None, False),
+            ("readOnly", "readOnly", bool, False, None, False),
+            ("repeats", "repeats", bool, False, None, False),
+            ("required", "required", bool, False, None, False),
+            ("text", "text", str, False, None, False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+class QuestionnaireItemEnableWhen(backboneelement.BackboneElement):
+    """ Only allow data when.
+    
+    A constraint indicating that this item should only be enabled
+    (displayed/allow answers to be captured) when the specified condition is
+    true.
+    """
+    
+    resource_type = "QuestionnaireItemEnableWhen"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.answerAttachment = None
+        """ Value question must have.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.answerBoolean = None
+        """ Value question must have.
+        Type `bool`. """
+        
+        self.answerCoding = None
+        """ Value question must have.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.answerDate = None
+        """ Value question must have.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.answerDateTime = None
+        """ Value question must have.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.answerDecimal = None
+        """ Value question must have.
+        Type `float`. """
+        
+        self.answerInteger = None
+        """ Value question must have.
+        Type `int`. """
+        
+        self.answerQuantity = None
+        """ Value question must have.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.answerReference = None
+        """ Value question must have.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.answerString = None
+        """ Value question must have.
+        Type `str`. """
+        
+        self.answerTime = None
+        """ Value question must have.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.answerUri = None
+        """ Value question must have.
+        Type `str`. """
+        
+        self.hasAnswer = None
+        """ Enable when answered or not.
+        Type `bool`. """
+        
+        self.question = None
+        """ Question that determines whether item is enabled.
+        Type `str`. """
+        
+        super(QuestionnaireItemEnableWhen, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(QuestionnaireItemEnableWhen, self).elementProperties()
+        js.extend([
+            ("answerAttachment", "answerAttachment", attachment.Attachment, False, "answer", False),
+            ("answerBoolean", "answerBoolean", bool, False, "answer", False),
+            ("answerCoding", "answerCoding", coding.Coding, False, "answer", False),
+            ("answerDate", "answerDate", fhirdate.FHIRDate, False, "answer", False),
+            ("answerDateTime", "answerDateTime", fhirdate.FHIRDate, False, "answer", False),
+            ("answerDecimal", "answerDecimal", float, False, "answer", False),
+            ("answerInteger", "answerInteger", int, False, "answer", False),
+            ("answerQuantity", "answerQuantity", quantity.Quantity, False, "answer", False),
+            ("answerReference", "answerReference", fhirreference.FHIRReference, False, "answer", False),
+            ("answerString", "answerString", str, False, "answer", False),
+            ("answerTime", "answerTime", fhirdate.FHIRDate, False, "answer", False),
+            ("answerUri", "answerUri", str, False, "answer", False),
+            ("hasAnswer", "hasAnswer", bool, False, None, False),
+            ("question", "question", str, False, None, True),
+        ])
+        return js
+
+
+class QuestionnaireItemOption(backboneelement.BackboneElement):
+    """ Permitted answer.
+    
+    One of the permitted answers for a "choice" or "open-choice" question.
+    """
+    
+    resource_type = "QuestionnaireItemOption"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.valueCoding = None
+        """ Answer value.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.valueDate = None
+        """ Answer value.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueInteger = None
+        """ Answer value.
+        Type `int`. """
+        
+        self.valueString = None
+        """ Answer value.
+        Type `str`. """
+        
+        self.valueTime = None
+        """ Answer value.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(QuestionnaireItemOption, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(QuestionnaireItemOption, self).elementProperties()
+        js.extend([
+            ("valueCoding", "valueCoding", coding.Coding, False, "value", True),
+            ("valueDate", "valueDate", fhirdate.FHIRDate, False, "value", True),
+            ("valueInteger", "valueInteger", int, False, "value", True),
+            ("valueString", "valueString", str, False, "value", True),
+            ("valueTime", "valueTime", fhirdate.FHIRDate, False, "value", True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/questionnaire_tests.py b/fhirclient/models/questionnaire_tests.py
new file mode 100644
index 0000000..9cecede
--- /dev/null
+++ b/fhirclient/models/questionnaire_tests.py
@@ -0,0 +1,254 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import questionnaire
+from .fhirdate import FHIRDate
+
+
+class QuestionnaireTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Questionnaire", js["resourceType"])
+        return questionnaire.Questionnaire(js)
+    
+    def testQuestionnaire1(self):
+        inst = self.instantiate_from("questionnaire-example-bluebook.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Questionnaire instance")
+        self.implQuestionnaire1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Questionnaire", js["resourceType"])
+        inst2 = questionnaire.Questionnaire(js)
+        self.implQuestionnaire1(inst2)
+    
+    def implQuestionnaire1(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2013-02-19").date)
+        self.assertEqual(inst.date.as_json(), "2013-02-19")
+        self.assertEqual(inst.id, "bb")
+        self.assertEqual(inst.item[0].item[0].item[0].linkId, "nameOfChild")
+        self.assertEqual(inst.item[0].item[0].item[0].text, "Name of child")
+        self.assertEqual(inst.item[0].item[0].item[0].type, "string")
+        self.assertEqual(inst.item[0].item[0].item[1].linkId, "sex")
+        self.assertEqual(inst.item[0].item[0].item[1].option[0].valueCoding.code, "F")
+        self.assertEqual(inst.item[0].item[0].item[1].option[1].valueCoding.code, "M")
+        self.assertEqual(inst.item[0].item[0].item[1].text, "Sex")
+        self.assertEqual(inst.item[0].item[0].item[1].type, "choice")
+        self.assertEqual(inst.item[0].item[0].linkId, "group")
+        self.assertEqual(inst.item[0].item[0].type, "group")
+        self.assertEqual(inst.item[0].item[1].item[0].linkId, "birthWeight")
+        self.assertEqual(inst.item[0].item[1].item[0].text, "Birth weight (kg)")
+        self.assertEqual(inst.item[0].item[1].item[0].type, "decimal")
+        self.assertEqual(inst.item[0].item[1].item[1].linkId, "birthLength")
+        self.assertEqual(inst.item[0].item[1].item[1].text, "Birth length (cm)")
+        self.assertEqual(inst.item[0].item[1].item[1].type, "decimal")
+        self.assertTrue(inst.item[0].item[1].item[2].item[0].enableWhen[0].hasAnswer)
+        self.assertEqual(inst.item[0].item[1].item[2].item[0].enableWhen[0].question, "vitaminKgiven")
+        self.assertEqual(inst.item[0].item[1].item[2].item[0].item[0].linkId, "vitaminiKDose1")
+        self.assertEqual(inst.item[0].item[1].item[2].item[0].item[0].text, "1st dose")
+        self.assertEqual(inst.item[0].item[1].item[2].item[0].item[0].type, "dateTime")
+        self.assertEqual(inst.item[0].item[1].item[2].item[0].item[1].linkId, "vitaminiKDose2")
+        self.assertEqual(inst.item[0].item[1].item[2].item[0].item[1].text, "2nd dose")
+        self.assertEqual(inst.item[0].item[1].item[2].item[0].item[1].type, "dateTime")
+        self.assertEqual(inst.item[0].item[1].item[2].item[0].linkId, "vitaminKgivenDoses")
+        self.assertEqual(inst.item[0].item[1].item[2].item[0].type, "group")
+        self.assertEqual(inst.item[0].item[1].item[2].linkId, "vitaminKgiven")
+        self.assertEqual(inst.item[0].item[1].item[2].option[0].valueCoding.code, "INJECTION")
+        self.assertEqual(inst.item[0].item[1].item[2].option[1].valueCoding.code, "INTRAVENOUS")
+        self.assertEqual(inst.item[0].item[1].item[2].option[2].valueCoding.code, "ORAL")
+        self.assertEqual(inst.item[0].item[1].item[2].text, "Vitamin K given")
+        self.assertEqual(inst.item[0].item[1].item[2].type, "choice")
+        self.assertEqual(inst.item[0].item[1].item[3].item[0].linkId, "hepBgivenDate")
+        self.assertEqual(inst.item[0].item[1].item[3].item[0].text, "Date given")
+        self.assertEqual(inst.item[0].item[1].item[3].item[0].type, "date")
+        self.assertEqual(inst.item[0].item[1].item[3].linkId, "hepBgiven")
+        self.assertEqual(inst.item[0].item[1].item[3].text, "Hep B given y / n")
+        self.assertEqual(inst.item[0].item[1].item[3].type, "boolean")
+        self.assertEqual(inst.item[0].item[1].item[4].linkId, "abnormalitiesAtBirth")
+        self.assertEqual(inst.item[0].item[1].item[4].text, "Abnormalities noted at birth")
+        self.assertEqual(inst.item[0].item[1].item[4].type, "string")
+        self.assertEqual(inst.item[0].item[1].linkId, "neonatalInformation")
+        self.assertEqual(inst.item[0].item[1].text, "Neonatal Information")
+        self.assertEqual(inst.item[0].item[1].type, "group")
+        self.assertEqual(inst.item[0].linkId, "birthDetails")
+        self.assertEqual(inst.item[0].text, "Birth details - To be completed by health professional")
+        self.assertEqual(inst.item[0].type, "group")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "AU")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.publisher, "New South Wales Department of Health")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.subjectType[0], "Patient")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "NSW Government My Personal Health Record")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/Questionnaire/bb")
+    
+    def testQuestionnaire2(self):
+        inst = self.instantiate_from("questionnaire-example-f201-lifelines.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Questionnaire instance")
+        self.implQuestionnaire2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Questionnaire", js["resourceType"])
+        inst2 = questionnaire.Questionnaire(js)
+        self.implQuestionnaire2(inst2)
+    
+    def implQuestionnaire2(self, inst):
+        self.assertEqual(inst.code[0].code, "VL 1-1, 18-65_1.2.2")
+        self.assertEqual(inst.code[0].display, "Lifelines Questionnaire 1 part 1")
+        self.assertEqual(inst.code[0].system, "http://example.org/system/code/lifelines/nl")
+        self.assertEqual(inst.date.date, FHIRDate("2010").date)
+        self.assertEqual(inst.date.as_json(), "2010")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.item[0].linkId, "1")
+        self.assertEqual(inst.item[0].text, "Do you have allergies?")
+        self.assertEqual(inst.item[0].type, "boolean")
+        self.assertEqual(inst.item[1].item[0].linkId, "2.1")
+        self.assertEqual(inst.item[1].item[0].text, "What is your gender?")
+        self.assertEqual(inst.item[1].item[0].type, "string")
+        self.assertEqual(inst.item[1].item[1].linkId, "2.2")
+        self.assertEqual(inst.item[1].item[1].text, "What is your date of birth?")
+        self.assertEqual(inst.item[1].item[1].type, "date")
+        self.assertEqual(inst.item[1].item[2].linkId, "2.3")
+        self.assertEqual(inst.item[1].item[2].text, "What is your country of birth?")
+        self.assertEqual(inst.item[1].item[2].type, "string")
+        self.assertEqual(inst.item[1].item[3].linkId, "2.4")
+        self.assertEqual(inst.item[1].item[3].text, "What is your marital status?")
+        self.assertEqual(inst.item[1].item[3].type, "string")
+        self.assertEqual(inst.item[1].linkId, "2")
+        self.assertEqual(inst.item[1].text, "General questions")
+        self.assertEqual(inst.item[1].type, "group")
+        self.assertEqual(inst.item[2].item[0].linkId, "3.1")
+        self.assertEqual(inst.item[2].item[0].text, "Do you smoke?")
+        self.assertEqual(inst.item[2].item[0].type, "boolean")
+        self.assertEqual(inst.item[2].item[1].linkId, "3.2")
+        self.assertEqual(inst.item[2].item[1].text, "Do you drink alchohol?")
+        self.assertEqual(inst.item[2].item[1].type, "boolean")
+        self.assertEqual(inst.item[2].linkId, "3")
+        self.assertEqual(inst.item[2].text, "Intoxications")
+        self.assertEqual(inst.item[2].type, "group")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.subjectType[0], "Patient")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/Questionnaire/f201")
+    
+    def testQuestionnaire3(self):
+        inst = self.instantiate_from("questionnaire-example-gcs.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Questionnaire instance")
+        self.implQuestionnaire3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Questionnaire", js["resourceType"])
+        inst2 = questionnaire.Questionnaire(js)
+        self.implQuestionnaire3(inst2)
+    
+    def implQuestionnaire3(self, inst):
+        self.assertEqual(inst.code[0].code, "9269-2")
+        self.assertEqual(inst.code[0].system, "http://loinc.org")
+        self.assertEqual(inst.contained[0].id, "motor")
+        self.assertEqual(inst.contained[1].id, "verbal")
+        self.assertEqual(inst.contained[2].id, "eye")
+        self.assertEqual(inst.date.date, FHIRDate("2015-08-03").date)
+        self.assertEqual(inst.date.as_json(), "2015-08-03")
+        self.assertEqual(inst.id, "gcs")
+        self.assertEqual(inst.item[0].code[0].code, "9270-0")
+        self.assertEqual(inst.item[0].code[0].system, "http://loinc.org")
+        self.assertEqual(inst.item[0].linkId, "1.1")
+        self.assertEqual(inst.item[0].type, "choice")
+        self.assertEqual(inst.item[1].code[0].code, "9268-4")
+        self.assertEqual(inst.item[1].code[0].system, "http://loinc.org")
+        self.assertEqual(inst.item[1].linkId, "1.2")
+        self.assertEqual(inst.item[1].type, "choice")
+        self.assertEqual(inst.item[2].code[0].code, "9267-6")
+        self.assertEqual(inst.item[2].code[0].system, "http://loinc.org")
+        self.assertEqual(inst.item[2].linkId, "1.3")
+        self.assertEqual(inst.item[2].type, "choice")
+        self.assertEqual(inst.publisher, "FHIR Project team")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.subjectType[0], "Patient")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Glasgow Coma Score")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/Questionnaire/gcs")
+    
+    def testQuestionnaire4(self):
+        inst = self.instantiate_from("questionnaire-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Questionnaire instance")
+        self.implQuestionnaire4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Questionnaire", js["resourceType"])
+        inst2 = questionnaire.Questionnaire(js)
+        self.implQuestionnaire4(inst2)
+    
+    def implQuestionnaire4(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2012-01").date)
+        self.assertEqual(inst.date.as_json(), "2012-01")
+        self.assertEqual(inst.id, "3141")
+        self.assertEqual(inst.item[0].code[0].code, "COMORBIDITY")
+        self.assertEqual(inst.item[0].code[0].system, "http://example.org/system/code/sections")
+        self.assertEqual(inst.item[0].item[0].code[0].code, "COMORB")
+        self.assertEqual(inst.item[0].item[0].code[0].system, "http://example.org/system/code/questions")
+        self.assertEqual(inst.item[0].item[0].item[0].code[0].code, "CARDIAL")
+        self.assertEqual(inst.item[0].item[0].item[0].code[0].system, "http://example.org/system/code/sections")
+        self.assertEqual(inst.item[0].item[0].item[0].enableWhen[0].answerCoding.code, "Y")
+        self.assertEqual(inst.item[0].item[0].item[0].enableWhen[0].answerCoding.system, "http://hl7.org/fhir/v2/0136")
+        self.assertEqual(inst.item[0].item[0].item[0].enableWhen[0].question, "1.1")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].code[0].code, "COMORBCAR")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].code[0].system, "http://example.org/system/code/questions")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[0].code[0].code, "COMCAR00")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[0].code[0].display, "Angina Pectoris")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[0].code[0].system, "http://example.org/system/code/questions")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[0].code[1].code, "194828000")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[0].code[1].display, "Angina (disorder)")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[0].code[1].system, "http://snomed.info/sct")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[0].linkId, "1.1.1.1.1")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[0].prefix, "1.1.1")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[0].type, "choice")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[1].code[0].code, "22298006")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[1].code[0].display, "Myocardial infarction (disorder)")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[1].code[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[1].linkId, "1.1.1.1.2")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[1].prefix, "1.1.2")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].item[1].type, "choice")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].linkId, "1.1.1.1")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].prefix, "1.1")
+        self.assertEqual(inst.item[0].item[0].item[0].item[0].type, "choice")
+        self.assertEqual(inst.item[0].item[0].item[0].item[1].code[0].code, "COMORBVAS")
+        self.assertEqual(inst.item[0].item[0].item[0].item[1].code[0].system, "http://example.org/system/code/questions")
+        self.assertEqual(inst.item[0].item[0].item[0].item[1].linkId, "1.1.1.2")
+        self.assertEqual(inst.item[0].item[0].item[0].item[1].prefix, "1.2")
+        self.assertEqual(inst.item[0].item[0].item[0].item[1].type, "choice")
+        self.assertEqual(inst.item[0].item[0].item[0].linkId, "1.1.1")
+        self.assertEqual(inst.item[0].item[0].item[0].type, "group")
+        self.assertEqual(inst.item[0].item[0].linkId, "1.1")
+        self.assertEqual(inst.item[0].item[0].prefix, "1")
+        self.assertEqual(inst.item[0].item[0].type, "choice")
+        self.assertEqual(inst.item[0].linkId, "1")
+        self.assertEqual(inst.item[0].type, "group")
+        self.assertEqual(inst.item[1].code[0].code, "HISTOPATHOLOGY")
+        self.assertEqual(inst.item[1].code[0].system, "http://example.org/system/code/sections")
+        self.assertEqual(inst.item[1].item[0].code[0].code, "ABDOMINAL")
+        self.assertEqual(inst.item[1].item[0].code[0].system, "http://example.org/system/code/sections")
+        self.assertEqual(inst.item[1].item[0].item[0].code[0].code, "STADPT")
+        self.assertEqual(inst.item[1].item[0].item[0].code[0].display, "pT category")
+        self.assertEqual(inst.item[1].item[0].item[0].code[0].system, "http://example.org/system/code/questions")
+        self.assertEqual(inst.item[1].item[0].item[0].linkId, "2.1.2")
+        self.assertEqual(inst.item[1].item[0].item[0].type, "choice")
+        self.assertEqual(inst.item[1].item[0].linkId, "2.1")
+        self.assertEqual(inst.item[1].item[0].type, "group")
+        self.assertEqual(inst.item[1].linkId, "2")
+        self.assertEqual(inst.item[1].type, "group")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.subjectType[0], "Patient")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Cancer Quality Forum Questionnaire 2012")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/Questionnaire/3141")
+
diff --git a/fhirclient/models/questionnaireresponse.py b/fhirclient/models/questionnaireresponse.py
new file mode 100644
index 0000000..19131e9
--- /dev/null
+++ b/fhirclient/models/questionnaireresponse.py
@@ -0,0 +1,264 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class QuestionnaireResponse(domainresource.DomainResource):
+    """ A structured set of questions and their answers.
+    
+    A structured set of questions and their answers. The questions are ordered
+    and grouped into coherent subsets, corresponding to the structure of the
+    grouping of the questionnaire being responded to.
+    """
+    
+    resource_type = "QuestionnaireResponse"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.author = None
+        """ Person who received and recorded the answers.
+        Type `FHIRReference` referencing `Device, Practitioner, Patient, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.authored = None
+        """ Date the answers were gathered.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.basedOn = None
+        """ Request fulfilled by this QuestionnaireResponse.
+        List of `FHIRReference` items referencing `ReferralRequest, CarePlan, ProcedureRequest` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or Episode during which questionnaire was completed.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Unique id for this set of answers.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.item = None
+        """ Groups and questions.
+        List of `QuestionnaireResponseItem` items (represented as `dict` in JSON). """
+        
+        self.parent = None
+        """ Part of this action.
+        List of `FHIRReference` items referencing `Observation, Procedure` (represented as `dict` in JSON). """
+        
+        self.questionnaire = None
+        """ Form being answered.
+        Type `FHIRReference` referencing `Questionnaire` (represented as `dict` in JSON). """
+        
+        self.source = None
+        """ The person who answered the questions.
+        Type `FHIRReference` referencing `Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ in-progress | completed | amended | entered-in-error | stopped.
+        Type `str`. """
+        
+        self.subject = None
+        """ The subject of the questions.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(QuestionnaireResponse, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(QuestionnaireResponse, self).elementProperties()
+        js.extend([
+            ("author", "author", fhirreference.FHIRReference, False, None, False),
+            ("authored", "authored", fhirdate.FHIRDate, False, None, False),
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("item", "item", QuestionnaireResponseItem, True, None, False),
+            ("parent", "parent", fhirreference.FHIRReference, True, None, False),
+            ("questionnaire", "questionnaire", fhirreference.FHIRReference, False, None, False),
+            ("source", "source", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class QuestionnaireResponseItem(backboneelement.BackboneElement):
+    """ Groups and questions.
+    
+    A group or question item from the original questionnaire for which answers
+    are provided.
+    """
+    
+    resource_type = "QuestionnaireResponseItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.answer = None
+        """ The response(s) to the question.
+        List of `QuestionnaireResponseItemAnswer` items (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ ElementDefinition - details for the item.
+        Type `str`. """
+        
+        self.item = None
+        """ Nested questionnaire response items.
+        List of `QuestionnaireResponseItem` items (represented as `dict` in JSON). """
+        
+        self.linkId = None
+        """ Pointer to specific item from Questionnaire.
+        Type `str`. """
+        
+        self.subject = None
+        """ The subject this group's answers are about.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.text = None
+        """ Name for group or question text.
+        Type `str`. """
+        
+        super(QuestionnaireResponseItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(QuestionnaireResponseItem, self).elementProperties()
+        js.extend([
+            ("answer", "answer", QuestionnaireResponseItemAnswer, True, None, False),
+            ("definition", "definition", str, False, None, False),
+            ("item", "item", QuestionnaireResponseItem, True, None, False),
+            ("linkId", "linkId", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+            ("text", "text", str, False, None, False),
+        ])
+        return js
+
+
+class QuestionnaireResponseItemAnswer(backboneelement.BackboneElement):
+    """ The response(s) to the question.
+    
+    The respondent's answer(s) to the question.
+    """
+    
+    resource_type = "QuestionnaireResponseItemAnswer"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.item = None
+        """ Nested groups and questions.
+        List of `QuestionnaireResponseItem` items (represented as `dict` in JSON). """
+        
+        self.valueAttachment = None
+        """ Single-valued answer to the question.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.valueBoolean = None
+        """ Single-valued answer to the question.
+        Type `bool`. """
+        
+        self.valueCoding = None
+        """ Single-valued answer to the question.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.valueDate = None
+        """ Single-valued answer to the question.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDateTime = None
+        """ Single-valued answer to the question.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDecimal = None
+        """ Single-valued answer to the question.
+        Type `float`. """
+        
+        self.valueInteger = None
+        """ Single-valued answer to the question.
+        Type `int`. """
+        
+        self.valueQuantity = None
+        """ Single-valued answer to the question.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueReference = None
+        """ Single-valued answer to the question.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.valueString = None
+        """ Single-valued answer to the question.
+        Type `str`. """
+        
+        self.valueTime = None
+        """ Single-valued answer to the question.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueUri = None
+        """ Single-valued answer to the question.
+        Type `str`. """
+        
+        super(QuestionnaireResponseItemAnswer, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(QuestionnaireResponseItemAnswer, self).elementProperties()
+        js.extend([
+            ("item", "item", QuestionnaireResponseItem, True, None, False),
+            ("valueAttachment", "valueAttachment", attachment.Attachment, False, "value", False),
+            ("valueBoolean", "valueBoolean", bool, False, "value", False),
+            ("valueCoding", "valueCoding", coding.Coding, False, "value", False),
+            ("valueDate", "valueDate", fhirdate.FHIRDate, False, "value", False),
+            ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", False),
+            ("valueDecimal", "valueDecimal", float, False, "value", False),
+            ("valueInteger", "valueInteger", int, False, "value", False),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", False),
+            ("valueReference", "valueReference", fhirreference.FHIRReference, False, "value", False),
+            ("valueString", "valueString", str, False, "value", False),
+            ("valueTime", "valueTime", fhirdate.FHIRDate, False, "value", False),
+            ("valueUri", "valueUri", str, False, "value", False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/questionnaireresponse_tests.py b/fhirclient/models/questionnaireresponse_tests.py
new file mode 100644
index 0000000..a327eb1
--- /dev/null
+++ b/fhirclient/models/questionnaireresponse_tests.py
@@ -0,0 +1,759 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import questionnaireresponse
+from .fhirdate import FHIRDate
+
+
+class QuestionnaireResponseTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("QuestionnaireResponse", js["resourceType"])
+        return questionnaireresponse.QuestionnaireResponse(js)
+    
+    def testQuestionnaireResponse1(self):
+        inst = self.instantiate_from("questionnaireresponse-example-bluebook.json")
+        self.assertIsNotNone(inst, "Must have instantiated a QuestionnaireResponse instance")
+        self.implQuestionnaireResponse1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("QuestionnaireResponse", js["resourceType"])
+        inst2 = questionnaireresponse.QuestionnaireResponse(js)
+        self.implQuestionnaireResponse1(inst2)
+    
+    def implQuestionnaireResponse1(self, inst):
+        self.assertEqual(inst.authored.date, FHIRDate("2013-02-19T14:15:00+10:00").date)
+        self.assertEqual(inst.authored.as_json(), "2013-02-19T14:15:00+10:00")
+        self.assertEqual(inst.id, "bb")
+        self.assertEqual(inst.item[0].item[0].item[0].answer[0].valueString, "Cathy Jones")
+        self.assertEqual(inst.item[0].item[0].item[0].linkId, "nameOfChild")
+        self.assertEqual(inst.item[0].item[0].item[0].text, "Name of child")
+        self.assertEqual(inst.item[0].item[0].item[1].answer[0].valueCoding.code, "f")
+        self.assertEqual(inst.item[0].item[0].item[1].linkId, "sex")
+        self.assertEqual(inst.item[0].item[0].item[1].text, "Sex")
+        self.assertEqual(inst.item[0].item[0].linkId, "group")
+        self.assertEqual(inst.item[0].item[1].item[0].answer[0].valueDecimal, 3.25)
+        self.assertEqual(inst.item[0].item[1].item[0].linkId, "birthWeight")
+        self.assertEqual(inst.item[0].item[1].item[0].text, "Birth weight (kg)")
+        self.assertEqual(inst.item[0].item[1].item[1].answer[0].valueDecimal, 44.3)
+        self.assertEqual(inst.item[0].item[1].item[1].linkId, "birthLength")
+        self.assertEqual(inst.item[0].item[1].item[1].text, "Birth length (cm)")
+        self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[0].answer[0].valueDate.date, FHIRDate("1972-11-30").date)
+        self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[0].answer[0].valueDate.as_json(), "1972-11-30")
+        self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[0].linkId, "vitaminKDose1")
+        self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[0].text, "1st dose")
+        self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[1].answer[0].valueDate.date, FHIRDate("1972-12-11").date)
+        self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[1].answer[0].valueDate.as_json(), "1972-12-11")
+        self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[1].linkId, "vitaminKDose2")
+        self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].item[1].text, "2nd dose")
+        self.assertEqual(inst.item[0].item[1].item[2].answer[0].item[0].linkId, "vitaminKgivenDoses")
+        self.assertEqual(inst.item[0].item[1].item[2].answer[0].valueCoding.code, "INJECTION")
+        self.assertEqual(inst.item[0].item[1].item[2].linkId, "vitaminKgiven")
+        self.assertEqual(inst.item[0].item[1].item[2].text, "Vitamin K given")
+        self.assertEqual(inst.item[0].item[1].item[3].answer[0].item[0].answer[0].valueDate.date, FHIRDate("1972-12-04").date)
+        self.assertEqual(inst.item[0].item[1].item[3].answer[0].item[0].answer[0].valueDate.as_json(), "1972-12-04")
+        self.assertEqual(inst.item[0].item[1].item[3].answer[0].item[0].linkId, "hepBgivenDate")
+        self.assertEqual(inst.item[0].item[1].item[3].answer[0].item[0].text, "Date given")
+        self.assertTrue(inst.item[0].item[1].item[3].answer[0].valueBoolean)
+        self.assertEqual(inst.item[0].item[1].item[3].linkId, "hepBgiven")
+        self.assertEqual(inst.item[0].item[1].item[3].text, "Hep B given y / n")
+        self.assertEqual(inst.item[0].item[1].item[4].answer[0].valueString, "Already able to speak Chinese")
+        self.assertEqual(inst.item[0].item[1].item[4].linkId, "abnormalitiesAtBirth")
+        self.assertEqual(inst.item[0].item[1].item[4].text, "Abnormalities noted at birth")
+        self.assertEqual(inst.item[0].item[1].linkId, "neonatalInformation")
+        self.assertEqual(inst.item[0].item[1].text, "Neonatal Information")
+        self.assertEqual(inst.item[0].linkId, "birthDetails")
+        self.assertEqual(inst.item[0].text, "Birth details - To be completed by health professional")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testQuestionnaireResponse2(self):
+        inst = self.instantiate_from("questionnaireresponse-example-f201-lifelines.json")
+        self.assertIsNotNone(inst, "Must have instantiated a QuestionnaireResponse instance")
+        self.implQuestionnaireResponse2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("QuestionnaireResponse", js["resourceType"])
+        inst2 = questionnaireresponse.QuestionnaireResponse(js)
+        self.implQuestionnaireResponse2(inst2)
+    
+    def implQuestionnaireResponse2(self, inst):
+        self.assertEqual(inst.authored.date, FHIRDate("2013-06-18T00:00:00+01:00").date)
+        self.assertEqual(inst.authored.as_json(), "2013-06-18T00:00:00+01:00")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.item[0].item[0].answer[0].valueString, "I am allergic to house dust")
+        self.assertEqual(inst.item[0].item[0].linkId, "1.1")
+        self.assertEqual(inst.item[0].item[0].text, "Do you have allergies?")
+        self.assertEqual(inst.item[0].linkId, "1")
+        self.assertEqual(inst.item[1].item[0].answer[0].valueString, "Male")
+        self.assertEqual(inst.item[1].item[0].linkId, "2.1")
+        self.assertEqual(inst.item[1].item[0].text, "What is your gender?")
+        self.assertEqual(inst.item[1].item[1].answer[0].valueDate.date, FHIRDate("1960-03-13").date)
+        self.assertEqual(inst.item[1].item[1].answer[0].valueDate.as_json(), "1960-03-13")
+        self.assertEqual(inst.item[1].item[1].linkId, "2.2")
+        self.assertEqual(inst.item[1].item[1].text, "What is your date of birth?")
+        self.assertEqual(inst.item[1].item[2].answer[0].valueString, "The Netherlands")
+        self.assertEqual(inst.item[1].item[2].linkId, "2.3")
+        self.assertEqual(inst.item[1].item[2].text, "What is your country of birth?")
+        self.assertEqual(inst.item[1].item[3].answer[0].valueString, "married")
+        self.assertEqual(inst.item[1].item[3].linkId, "2.4")
+        self.assertEqual(inst.item[1].item[3].text, "What is your marital status?")
+        self.assertEqual(inst.item[1].linkId, "2")
+        self.assertEqual(inst.item[1].text, "General questions")
+        self.assertEqual(inst.item[2].item[0].answer[0].valueString, "No")
+        self.assertEqual(inst.item[2].item[0].linkId, "3.1")
+        self.assertEqual(inst.item[2].item[0].text, "Do you smoke?")
+        self.assertEqual(inst.item[2].item[1].answer[0].valueString, "No, but I used to drink")
+        self.assertEqual(inst.item[2].item[1].linkId, "3.2")
+        self.assertEqual(inst.item[2].item[1].text, "Do you drink alchohol?")
+        self.assertEqual(inst.item[2].linkId, "3")
+        self.assertEqual(inst.item[2].text, "Intoxications")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testQuestionnaireResponse3(self):
+        inst = self.instantiate_from("questionnaireresponse-example-gcs.json")
+        self.assertIsNotNone(inst, "Must have instantiated a QuestionnaireResponse instance")
+        self.implQuestionnaireResponse3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("QuestionnaireResponse", js["resourceType"])
+        inst2 = questionnaireresponse.QuestionnaireResponse(js)
+        self.implQuestionnaireResponse3(inst2)
+    
+    def implQuestionnaireResponse3(self, inst):
+        self.assertEqual(inst.authored.date, FHIRDate("2014-12-11T04:44:16Z").date)
+        self.assertEqual(inst.authored.as_json(), "2014-12-11T04:44:16Z")
+        self.assertEqual(inst.id, "gcs")
+        self.assertEqual(inst.item[0].answer[0].valueCoding.code, "LA6560-2")
+        self.assertEqual(inst.item[0].answer[0].valueCoding.display, "Confused")
+        self.assertEqual(inst.item[0].answer[0].valueCoding.extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.item[0].answer[0].valueCoding.extension[0].valueDecimal, 4)
+        self.assertEqual(inst.item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[0].linkId, "1.1")
+        self.assertEqual(inst.item[1].answer[0].valueCoding.code, "LA6566-9")
+        self.assertEqual(inst.item[1].answer[0].valueCoding.display, "Localizing pain")
+        self.assertEqual(inst.item[1].answer[0].valueCoding.extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.item[1].answer[0].valueCoding.extension[0].valueDecimal, 5)
+        self.assertEqual(inst.item[1].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[1].linkId, "1.2")
+        self.assertEqual(inst.item[2].answer[0].valueCoding.code, "LA6556-0")
+        self.assertEqual(inst.item[2].answer[0].valueCoding.display, "Eyes open spontaneously")
+        self.assertEqual(inst.item[2].answer[0].valueCoding.extension[0].url, "http://hl7.org/fhir/StructureDefinition/iso21090-CO-value")
+        self.assertEqual(inst.item[2].answer[0].valueCoding.extension[0].valueDecimal, 4)
+        self.assertEqual(inst.item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].linkId, "1.3")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testQuestionnaireResponse4(self):
+        inst = self.instantiate_from("questionnaireresponse-example-ussg-fht-answers.json")
+        self.assertIsNotNone(inst, "Must have instantiated a QuestionnaireResponse instance")
+        self.implQuestionnaireResponse4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("QuestionnaireResponse", js["resourceType"])
+        inst2 = questionnaireresponse.QuestionnaireResponse(js)
+        self.implQuestionnaireResponse4(inst2)
+    
+    def implQuestionnaireResponse4(self, inst):
+        self.assertEqual(inst.authored.date, FHIRDate("2008-01-17").date)
+        self.assertEqual(inst.authored.as_json(), "2008-01-17")
+        self.assertEqual(inst.id, "ussg-fht-answers")
+        self.assertEqual(inst.item[0].item[0].answer[0].valueDate.date, FHIRDate("2008-01-17").date)
+        self.assertEqual(inst.item[0].item[0].answer[0].valueDate.as_json(), "2008-01-17")
+        self.assertEqual(inst.item[0].item[0].linkId, "0.1")
+        self.assertEqual(inst.item[0].item[0].text, "Date Done")
+        self.assertEqual(inst.item[0].linkId, "0")
+        self.assertEqual(inst.item[1].definition, "http://loinc.org/fhir/DataElement/54126-8")
+        self.assertEqual(inst.item[1].item[0].item[0].answer[0].valueString, "Annie Proband")
+        self.assertEqual(inst.item[1].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54125-0")
+        self.assertEqual(inst.item[1].item[0].item[0].linkId, "1.1.1")
+        self.assertEqual(inst.item[1].item[0].item[0].text, "Name")
+        self.assertEqual(inst.item[1].item[0].item[1].answer[0].valueCoding.code, "LA3-6")
+        self.assertEqual(inst.item[1].item[0].item[1].answer[0].valueCoding.display, "Female")
+        self.assertEqual(inst.item[1].item[0].item[1].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[1].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54131-8")
+        self.assertEqual(inst.item[1].item[0].item[1].linkId, "1.1.2")
+        self.assertEqual(inst.item[1].item[0].item[1].text, "Gender")
+        self.assertEqual(inst.item[1].item[0].item[2].answer[0].valueDate.date, FHIRDate("1966-04-04").date)
+        self.assertEqual(inst.item[1].item[0].item[2].answer[0].valueDate.as_json(), "1966-04-04")
+        self.assertEqual(inst.item[1].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/21112-8")
+        self.assertEqual(inst.item[1].item[0].item[2].linkId, "1.1.3")
+        self.assertEqual(inst.item[1].item[0].item[2].text, "Date of Birth")
+        self.assertEqual(inst.item[1].item[0].item[3].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[1].item[0].item[3].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[1].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[1].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54132-6")
+        self.assertEqual(inst.item[1].item[0].item[3].linkId, "1.1.4")
+        self.assertEqual(inst.item[1].item[0].item[3].text, "Were you born a twin?")
+        self.assertEqual(inst.item[1].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[1].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[1].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[1].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54128-4")
+        self.assertEqual(inst.item[1].item[0].item[4].linkId, "1.1.5")
+        self.assertEqual(inst.item[1].item[0].item[4].text, "Were you adopted?")
+        self.assertEqual(inst.item[1].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[1].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[1].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[1].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54135-9")
+        self.assertEqual(inst.item[1].item[0].item[5].linkId, "1.1.6")
+        self.assertEqual(inst.item[1].item[0].item[5].text, "Are your parents related to each other in any way other than marriage?")
+        self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].item[0].answer[0].valueCoding.code, "[in_i]")
+        self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].item[0].answer[0].valueCoding.display, "inches")
+        self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].item[0].answer[0].valueCoding.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].item[0].linkId, "1.1.7.1.1")
+        self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].item[0].text, "Units")
+        self.assertEqual(inst.item[1].item[0].item[6].answer[0].item[0].linkId, "1.1.7.1")
+        self.assertEqual(inst.item[1].item[0].item[6].answer[0].valueDecimal, 63)
+        self.assertEqual(inst.item[1].item[0].item[6].definition, "http://loinc.org/fhir/DataElement/8302-2")
+        self.assertEqual(inst.item[1].item[0].item[6].linkId, "1.1.7")
+        self.assertEqual(inst.item[1].item[0].item[6].text, "Height")
+        self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].item[0].answer[0].valueCoding.code, "lb")
+        self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].item[0].answer[0].valueCoding.display, "pounds")
+        self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].item[0].answer[0].valueCoding.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].item[0].linkId, "1.1.8.1.1")
+        self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].item[0].text, "Units")
+        self.assertEqual(inst.item[1].item[0].item[7].answer[0].item[0].linkId, "1.1.8.1")
+        self.assertEqual(inst.item[1].item[0].item[7].answer[0].valueDecimal, 127)
+        self.assertEqual(inst.item[1].item[0].item[7].definition, "http://loinc.org/fhir/DataElement/29463-7")
+        self.assertEqual(inst.item[1].item[0].item[7].linkId, "1.1.8")
+        self.assertEqual(inst.item[1].item[0].item[7].text, "Weight")
+        self.assertEqual(inst.item[1].item[0].item[8].answer[0].valueDecimal, 22.5)
+        self.assertEqual(inst.item[1].item[0].item[8].definition, "http://loinc.org/fhir/DataElement/39156-5")
+        self.assertEqual(inst.item[1].item[0].item[8].linkId, "1.1.9")
+        self.assertEqual(inst.item[1].item[0].item[8].text, "Body mass index (BMI) [Ratio]")
+        self.assertEqual(inst.item[1].item[0].item[9].answer[0].valueCoding.code, "LA4457-3")
+        self.assertEqual(inst.item[1].item[0].item[9].answer[0].valueCoding.display, "White")
+        self.assertEqual(inst.item[1].item[0].item[9].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[1].item[0].item[9].definition, "http://loinc.org/fhir/DataElement/54134-2")
+        self.assertEqual(inst.item[1].item[0].item[9].linkId, "1.1.10")
+        self.assertEqual(inst.item[1].item[0].item[9].text, "Race")
+        self.assertEqual(inst.item[1].item[0].linkId, "1.1")
+        self.assertEqual(inst.item[1].linkId, "1")
+        self.assertEqual(inst.item[1].text, "Your health information")
+        self.assertEqual(inst.item[2].definition, "http://loinc.org/fhir/DataElement/54114-4")
+        self.assertEqual(inst.item[2].item[0].item[0].item[0].answer[0].valueCoding.code, "LA10405-1")
+        self.assertEqual(inst.item[2].item[0].item[0].item[0].answer[0].valueCoding.display, "Daughter")
+        self.assertEqual(inst.item[2].item[0].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
+        self.assertEqual(inst.item[2].item[0].item[0].item[0].linkId, "2.1.1.1")
+        self.assertEqual(inst.item[2].item[0].item[0].item[0].text, "Relationship to you")
+        self.assertEqual(inst.item[2].item[0].item[0].item[1].answer[0].valueString, "Susan")
+        self.assertEqual(inst.item[2].item[0].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
+        self.assertEqual(inst.item[2].item[0].item[0].item[1].linkId, "2.1.1.2")
+        self.assertEqual(inst.item[2].item[0].item[0].item[1].text, "Name")
+        self.assertEqual(inst.item[2].item[0].item[0].item[2].answer[0].valueCoding.code, "LA3-6")
+        self.assertEqual(inst.item[2].item[0].item[0].item[2].answer[0].valueCoding.display, "Female")
+        self.assertEqual(inst.item[2].item[0].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[0].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
+        self.assertEqual(inst.item[2].item[0].item[0].item[2].linkId, "2.1.1.3")
+        self.assertEqual(inst.item[2].item[0].item[0].item[2].text, "Gender")
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 17)
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].item[0].item[0].text, "Age")
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].valueCoding.display, "Yes")
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].linkId, "2.1.1.4")
+        self.assertEqual(inst.item[2].item[0].item[0].item[3].text, "Living?")
+        self.assertEqual(inst.item[2].item[0].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[0].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[0].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[0].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
+        self.assertEqual(inst.item[2].item[0].item[0].item[4].linkId, "2.1.1.5")
+        self.assertEqual(inst.item[2].item[0].item[0].item[4].text, "Was this person born a twin?")
+        self.assertEqual(inst.item[2].item[0].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[0].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[0].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[0].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
+        self.assertEqual(inst.item[2].item[0].item[0].item[5].linkId, "2.1.1.6")
+        self.assertEqual(inst.item[2].item[0].item[0].item[5].text, "Was this person adopted?")
+        self.assertEqual(inst.item[2].item[0].item[0].linkId, "2.1.1")
+        self.assertEqual(inst.item[2].item[0].linkId, "2.1")
+        self.assertEqual(inst.item[2].item[1].item[0].item[0].answer[0].valueCoding.code, "LA10415-0")
+        self.assertEqual(inst.item[2].item[1].item[0].item[0].answer[0].valueCoding.display, "Brother")
+        self.assertEqual(inst.item[2].item[1].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[1].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
+        self.assertEqual(inst.item[2].item[1].item[0].item[0].linkId, "2.1.1.1")
+        self.assertEqual(inst.item[2].item[1].item[0].item[0].text, "Relationship to you")
+        self.assertEqual(inst.item[2].item[1].item[0].item[1].answer[0].valueString, "Brian")
+        self.assertEqual(inst.item[2].item[1].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
+        self.assertEqual(inst.item[2].item[1].item[0].item[1].linkId, "2.1.1.2")
+        self.assertEqual(inst.item[2].item[1].item[0].item[1].text, "Name")
+        self.assertEqual(inst.item[2].item[1].item[0].item[2].answer[0].valueCoding.code, "LA2-8")
+        self.assertEqual(inst.item[2].item[1].item[0].item[2].answer[0].valueCoding.display, "Male")
+        self.assertEqual(inst.item[2].item[1].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[1].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
+        self.assertEqual(inst.item[2].item[1].item[0].item[2].linkId, "2.1.1.3")
+        self.assertEqual(inst.item[2].item[1].item[0].item[2].text, "Gender")
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 32)
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].item[0].item[0].text, "Age")
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].valueCoding.display, "Yes")
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].linkId, "2.1.1.4")
+        self.assertEqual(inst.item[2].item[1].item[0].item[3].text, "Living?")
+        self.assertEqual(inst.item[2].item[1].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[1].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[1].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[1].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
+        self.assertEqual(inst.item[2].item[1].item[0].item[4].linkId, "2.1.1.5")
+        self.assertEqual(inst.item[2].item[1].item[0].item[4].text, "Was this person born a twin?")
+        self.assertEqual(inst.item[2].item[1].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[1].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[1].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[1].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
+        self.assertEqual(inst.item[2].item[1].item[0].item[5].linkId, "2.1.1.6")
+        self.assertEqual(inst.item[2].item[1].item[0].item[5].text, "Was this person adopted?")
+        self.assertEqual(inst.item[2].item[1].item[0].linkId, "2.1.1")
+        self.assertEqual(inst.item[2].item[1].item[1].item[0].answer[0].valueCoding.code, "LA10550-4")
+        self.assertEqual(inst.item[2].item[1].item[1].item[0].answer[0].valueCoding.display, "-- Other Cancer")
+        self.assertEqual(inst.item[2].item[1].item[1].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[1].item[1].item[0].linkId, "2.1.2.1")
+        self.assertEqual(inst.item[2].item[1].item[1].item[0].text, "Disease or Condition")
+        self.assertEqual(inst.item[2].item[1].item[1].item[1].answer[0].valueCoding.code, "LA10397-0")
+        self.assertEqual(inst.item[2].item[1].item[1].item[1].answer[0].valueCoding.display, "30-39")
+        self.assertEqual(inst.item[2].item[1].item[1].item[1].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[1].item[1].item[1].linkId, "2.1.2.2")
+        self.assertEqual(inst.item[2].item[1].item[1].item[1].text, "Age at Diagnosis")
+        self.assertEqual(inst.item[2].item[1].item[1].linkId, "2.1.2")
+        self.assertEqual(inst.item[2].item[1].item[1].text, "This family member's history of disease")
+        self.assertEqual(inst.item[2].item[1].linkId, "2.1")
+        self.assertEqual(inst.item[2].item[2].item[0].item[0].answer[0].valueCoding.code, "LA10418-4")
+        self.assertEqual(inst.item[2].item[2].item[0].item[0].answer[0].valueCoding.display, "Sister")
+        self.assertEqual(inst.item[2].item[2].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[2].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
+        self.assertEqual(inst.item[2].item[2].item[0].item[0].linkId, "2.1.1.1")
+        self.assertEqual(inst.item[2].item[2].item[0].item[0].text, "Relationship to you")
+        self.assertEqual(inst.item[2].item[2].item[0].item[1].answer[0].valueString, "Janet")
+        self.assertEqual(inst.item[2].item[2].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
+        self.assertEqual(inst.item[2].item[2].item[0].item[1].linkId, "2.1.1.2")
+        self.assertEqual(inst.item[2].item[2].item[0].item[1].text, "Name")
+        self.assertEqual(inst.item[2].item[2].item[0].item[2].answer[0].valueCoding.code, "LA3-6")
+        self.assertEqual(inst.item[2].item[2].item[0].item[2].answer[0].valueCoding.display, "Female")
+        self.assertEqual(inst.item[2].item[2].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[2].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
+        self.assertEqual(inst.item[2].item[2].item[0].item[2].linkId, "2.1.1.3")
+        self.assertEqual(inst.item[2].item[2].item[0].item[2].text, "Gender")
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 36)
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].item[0].item[0].text, "Age")
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].valueCoding.display, "Yes")
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].linkId, "2.1.1.4")
+        self.assertEqual(inst.item[2].item[2].item[0].item[3].text, "Living?")
+        self.assertEqual(inst.item[2].item[2].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[2].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[2].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[2].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
+        self.assertEqual(inst.item[2].item[2].item[0].item[4].linkId, "2.1.1.5")
+        self.assertEqual(inst.item[2].item[2].item[0].item[4].text, "Was this person born a twin?")
+        self.assertEqual(inst.item[2].item[2].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[2].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[2].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[2].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
+        self.assertEqual(inst.item[2].item[2].item[0].item[5].linkId, "2.1.1.6")
+        self.assertEqual(inst.item[2].item[2].item[0].item[5].text, "Was this person adopted?")
+        self.assertEqual(inst.item[2].item[2].item[0].linkId, "2.1.1")
+        self.assertEqual(inst.item[2].item[2].item[1].item[0].answer[0].valueCoding.code, "LA10536-3")
+        self.assertEqual(inst.item[2].item[2].item[1].item[0].answer[0].valueCoding.display, "-- Breast Cancer")
+        self.assertEqual(inst.item[2].item[2].item[1].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[2].item[1].item[0].linkId, "2.1.2.1")
+        self.assertEqual(inst.item[2].item[2].item[1].item[0].text, "Disease or Condition")
+        self.assertEqual(inst.item[2].item[2].item[1].item[1].answer[0].valueCoding.code, "LA10397-0")
+        self.assertEqual(inst.item[2].item[2].item[1].item[1].answer[0].valueCoding.display, "30-39")
+        self.assertEqual(inst.item[2].item[2].item[1].item[1].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[2].item[1].item[1].linkId, "2.1.2.2")
+        self.assertEqual(inst.item[2].item[2].item[1].item[1].text, "Age at Diagnosis")
+        self.assertEqual(inst.item[2].item[2].item[1].linkId, "2.1.2")
+        self.assertEqual(inst.item[2].item[2].item[1].text, "This family member's history of disease")
+        self.assertEqual(inst.item[2].item[2].linkId, "2.1")
+        self.assertEqual(inst.item[2].item[3].item[0].item[0].answer[0].valueCoding.code, "LA10419-2")
+        self.assertEqual(inst.item[2].item[3].item[0].item[0].answer[0].valueCoding.display, "Nephew")
+        self.assertEqual(inst.item[2].item[3].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[3].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
+        self.assertEqual(inst.item[2].item[3].item[0].item[0].linkId, "2.1.1.1")
+        self.assertEqual(inst.item[2].item[3].item[0].item[0].text, "Relationship to you")
+        self.assertEqual(inst.item[2].item[3].item[0].item[1].answer[0].valueString, "Ian")
+        self.assertEqual(inst.item[2].item[3].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
+        self.assertEqual(inst.item[2].item[3].item[0].item[1].linkId, "2.1.1.2")
+        self.assertEqual(inst.item[2].item[3].item[0].item[1].text, "Name")
+        self.assertEqual(inst.item[2].item[3].item[0].item[2].answer[0].valueCoding.code, "LA2-8")
+        self.assertEqual(inst.item[2].item[3].item[0].item[2].answer[0].valueCoding.display, "Male")
+        self.assertEqual(inst.item[2].item[3].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[3].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
+        self.assertEqual(inst.item[2].item[3].item[0].item[2].linkId, "2.1.1.3")
+        self.assertEqual(inst.item[2].item[3].item[0].item[2].text, "Gender")
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 16)
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].item[0].item[0].text, "Age")
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].valueCoding.display, "Yes")
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].linkId, "2.1.1.4")
+        self.assertEqual(inst.item[2].item[3].item[0].item[3].text, "Living?")
+        self.assertEqual(inst.item[2].item[3].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[3].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[3].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[3].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
+        self.assertEqual(inst.item[2].item[3].item[0].item[4].linkId, "2.1.1.5")
+        self.assertEqual(inst.item[2].item[3].item[0].item[4].text, "Was this person born a twin?")
+        self.assertEqual(inst.item[2].item[3].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[3].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[3].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[3].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
+        self.assertEqual(inst.item[2].item[3].item[0].item[5].linkId, "2.1.1.6")
+        self.assertEqual(inst.item[2].item[3].item[0].item[5].text, "Was this person adopted?")
+        self.assertEqual(inst.item[2].item[3].item[0].linkId, "2.1.1")
+        self.assertEqual(inst.item[2].item[3].linkId, "2.1")
+        self.assertEqual(inst.item[2].item[4].item[0].item[0].answer[0].valueCoding.code, "LA10420-0")
+        self.assertEqual(inst.item[2].item[4].item[0].item[0].answer[0].valueCoding.display, "Niece")
+        self.assertEqual(inst.item[2].item[4].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[4].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
+        self.assertEqual(inst.item[2].item[4].item[0].item[0].linkId, "2.1.1.1")
+        self.assertEqual(inst.item[2].item[4].item[0].item[0].text, "Relationship to you")
+        self.assertEqual(inst.item[2].item[4].item[0].item[1].answer[0].valueString, "Helen")
+        self.assertEqual(inst.item[2].item[4].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
+        self.assertEqual(inst.item[2].item[4].item[0].item[1].linkId, "2.1.1.2")
+        self.assertEqual(inst.item[2].item[4].item[0].item[1].text, "Name")
+        self.assertEqual(inst.item[2].item[4].item[0].item[2].answer[0].valueCoding.code, "LA3-6")
+        self.assertEqual(inst.item[2].item[4].item[0].item[2].answer[0].valueCoding.display, "Female")
+        self.assertEqual(inst.item[2].item[4].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[4].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
+        self.assertEqual(inst.item[2].item[4].item[0].item[2].linkId, "2.1.1.3")
+        self.assertEqual(inst.item[2].item[4].item[0].item[2].text, "Gender")
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 15)
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].item[0].item[0].text, "Age")
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].valueCoding.display, "Yes")
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].linkId, "2.1.1.4")
+        self.assertEqual(inst.item[2].item[4].item[0].item[3].text, "Living?")
+        self.assertEqual(inst.item[2].item[4].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[4].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[4].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[4].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
+        self.assertEqual(inst.item[2].item[4].item[0].item[4].linkId, "2.1.1.5")
+        self.assertEqual(inst.item[2].item[4].item[0].item[4].text, "Was this person born a twin?")
+        self.assertEqual(inst.item[2].item[4].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[4].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[4].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[4].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
+        self.assertEqual(inst.item[2].item[4].item[0].item[5].linkId, "2.1.1.6")
+        self.assertEqual(inst.item[2].item[4].item[0].item[5].text, "Was this person adopted?")
+        self.assertEqual(inst.item[2].item[4].item[0].linkId, "2.1.1")
+        self.assertEqual(inst.item[2].item[4].linkId, "2.1")
+        self.assertEqual(inst.item[2].item[5].item[0].item[0].answer[0].valueCoding.code, "LA10416-8")
+        self.assertEqual(inst.item[2].item[5].item[0].item[0].answer[0].valueCoding.display, "Father")
+        self.assertEqual(inst.item[2].item[5].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[5].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
+        self.assertEqual(inst.item[2].item[5].item[0].item[0].linkId, "2.1.1.1")
+        self.assertEqual(inst.item[2].item[5].item[0].item[0].text, "Relationship to you")
+        self.assertEqual(inst.item[2].item[5].item[0].item[1].answer[0].valueString, "Donald")
+        self.assertEqual(inst.item[2].item[5].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
+        self.assertEqual(inst.item[2].item[5].item[0].item[1].linkId, "2.1.1.2")
+        self.assertEqual(inst.item[2].item[5].item[0].item[1].text, "Name")
+        self.assertEqual(inst.item[2].item[5].item[0].item[2].answer[0].valueCoding.code, "LA2-8")
+        self.assertEqual(inst.item[2].item[5].item[0].item[2].answer[0].valueCoding.display, "Male")
+        self.assertEqual(inst.item[2].item[5].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[5].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
+        self.assertEqual(inst.item[2].item[5].item[0].item[2].linkId, "2.1.1.3")
+        self.assertEqual(inst.item[2].item[5].item[0].item[2].text, "Gender")
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 52)
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].item[0].item[0].text, "Age")
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].valueCoding.display, "Yes")
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].linkId, "2.1.1.4")
+        self.assertEqual(inst.item[2].item[5].item[0].item[3].text, "Living?")
+        self.assertEqual(inst.item[2].item[5].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[5].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[5].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[5].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
+        self.assertEqual(inst.item[2].item[5].item[0].item[4].linkId, "2.1.1.5")
+        self.assertEqual(inst.item[2].item[5].item[0].item[4].text, "Was this person born a twin?")
+        self.assertEqual(inst.item[2].item[5].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[5].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[5].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[5].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
+        self.assertEqual(inst.item[2].item[5].item[0].item[5].linkId, "2.1.1.6")
+        self.assertEqual(inst.item[2].item[5].item[0].item[5].text, "Was this person adopted?")
+        self.assertEqual(inst.item[2].item[5].item[0].linkId, "2.1.1")
+        self.assertEqual(inst.item[2].item[5].linkId, "2.1")
+        self.assertEqual(inst.item[2].item[6].item[0].item[0].answer[0].valueCoding.code, "LA10425-9")
+        self.assertEqual(inst.item[2].item[6].item[0].item[0].answer[0].valueCoding.display, "Paternal Uncle")
+        self.assertEqual(inst.item[2].item[6].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[6].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
+        self.assertEqual(inst.item[2].item[6].item[0].item[0].linkId, "2.1.1.1")
+        self.assertEqual(inst.item[2].item[6].item[0].item[0].text, "Relationship to you")
+        self.assertEqual(inst.item[2].item[6].item[0].item[1].answer[0].valueString, "Eric")
+        self.assertEqual(inst.item[2].item[6].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
+        self.assertEqual(inst.item[2].item[6].item[0].item[1].linkId, "2.1.1.2")
+        self.assertEqual(inst.item[2].item[6].item[0].item[1].text, "Name")
+        self.assertEqual(inst.item[2].item[6].item[0].item[2].answer[0].valueCoding.code, "LA2-8")
+        self.assertEqual(inst.item[2].item[6].item[0].item[2].answer[0].valueCoding.display, "Male")
+        self.assertEqual(inst.item[2].item[6].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[6].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
+        self.assertEqual(inst.item[2].item[6].item[0].item[2].linkId, "2.1.1.3")
+        self.assertEqual(inst.item[2].item[6].item[0].item[2].text, "Gender")
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 56)
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].item[0].item[0].text, "Age")
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].valueCoding.display, "Yes")
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].linkId, "2.1.1.4")
+        self.assertEqual(inst.item[2].item[6].item[0].item[3].text, "Living?")
+        self.assertEqual(inst.item[2].item[6].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[6].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[6].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[6].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
+        self.assertEqual(inst.item[2].item[6].item[0].item[4].linkId, "2.1.1.5")
+        self.assertEqual(inst.item[2].item[6].item[0].item[4].text, "Was this person born a twin?")
+        self.assertEqual(inst.item[2].item[6].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[6].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[6].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[6].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
+        self.assertEqual(inst.item[2].item[6].item[0].item[5].linkId, "2.1.1.6")
+        self.assertEqual(inst.item[2].item[6].item[0].item[5].text, "Was this person adopted?")
+        self.assertEqual(inst.item[2].item[6].item[0].linkId, "2.1.1")
+        self.assertEqual(inst.item[2].item[6].linkId, "2.1")
+        self.assertEqual(inst.item[2].item[7].item[0].item[0].answer[0].valueCoding.code, "LA10421-8")
+        self.assertEqual(inst.item[2].item[7].item[0].item[0].answer[0].valueCoding.display, "Paternal Aunt")
+        self.assertEqual(inst.item[2].item[7].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[7].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
+        self.assertEqual(inst.item[2].item[7].item[0].item[0].linkId, "2.1.1.1")
+        self.assertEqual(inst.item[2].item[7].item[0].item[0].text, "Relationship to you")
+        self.assertEqual(inst.item[2].item[7].item[0].item[1].answer[0].valueString, "Fiona")
+        self.assertEqual(inst.item[2].item[7].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
+        self.assertEqual(inst.item[2].item[7].item[0].item[1].linkId, "2.1.1.2")
+        self.assertEqual(inst.item[2].item[7].item[0].item[1].text, "Name")
+        self.assertEqual(inst.item[2].item[7].item[0].item[2].answer[0].valueCoding.code, "LA3-6")
+        self.assertEqual(inst.item[2].item[7].item[0].item[2].answer[0].valueCoding.display, "Female")
+        self.assertEqual(inst.item[2].item[7].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[7].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
+        self.assertEqual(inst.item[2].item[7].item[0].item[2].linkId, "2.1.1.3")
+        self.assertEqual(inst.item[2].item[7].item[0].item[2].text, "Gender")
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].item[0].item[0].answer[0].valueDecimal, 57)
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54141-7")
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.2.2")
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].item[0].item[0].text, "Age")
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.2")
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].valueCoding.code, "LA33-6")
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].valueCoding.display, "Yes")
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].linkId, "2.1.1.4")
+        self.assertEqual(inst.item[2].item[7].item[0].item[3].text, "Living?")
+        self.assertEqual(inst.item[2].item[7].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[7].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[7].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[7].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
+        self.assertEqual(inst.item[2].item[7].item[0].item[4].linkId, "2.1.1.5")
+        self.assertEqual(inst.item[2].item[7].item[0].item[4].text, "Was this person born a twin?")
+        self.assertEqual(inst.item[2].item[7].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[7].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[7].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[7].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
+        self.assertEqual(inst.item[2].item[7].item[0].item[5].linkId, "2.1.1.6")
+        self.assertEqual(inst.item[2].item[7].item[0].item[5].text, "Was this person adopted?")
+        self.assertEqual(inst.item[2].item[7].item[0].linkId, "2.1.1")
+        self.assertEqual(inst.item[2].item[7].item[1].item[0].answer[0].valueCoding.code, "LA10543-9")
+        self.assertEqual(inst.item[2].item[7].item[1].item[0].answer[0].valueCoding.display, "-- Skin Cancer")
+        self.assertEqual(inst.item[2].item[7].item[1].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[7].item[1].item[0].linkId, "2.1.2.1")
+        self.assertEqual(inst.item[2].item[7].item[1].item[0].text, "Disease or Condition")
+        self.assertEqual(inst.item[2].item[7].item[1].linkId, "2.1.2")
+        self.assertEqual(inst.item[2].item[7].item[1].text, "This family member's history of disease")
+        self.assertEqual(inst.item[2].item[7].linkId, "2.1")
+        self.assertEqual(inst.item[2].item[8].item[0].item[0].answer[0].valueCoding.code, "LA10423-4")
+        self.assertEqual(inst.item[2].item[8].item[0].item[0].answer[0].valueCoding.display, "Paternal Grandfather")
+        self.assertEqual(inst.item[2].item[8].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[8].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
+        self.assertEqual(inst.item[2].item[8].item[0].item[0].linkId, "2.1.1.1")
+        self.assertEqual(inst.item[2].item[8].item[0].item[0].text, "Relationship to you")
+        self.assertEqual(inst.item[2].item[8].item[0].item[1].answer[0].valueString, "Bob")
+        self.assertEqual(inst.item[2].item[8].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
+        self.assertEqual(inst.item[2].item[8].item[0].item[1].linkId, "2.1.1.2")
+        self.assertEqual(inst.item[2].item[8].item[0].item[1].text, "Name")
+        self.assertEqual(inst.item[2].item[8].item[0].item[2].answer[0].valueCoding.code, "LA2-8")
+        self.assertEqual(inst.item[2].item[8].item[0].item[2].answer[0].valueCoding.display, "Male")
+        self.assertEqual(inst.item[2].item[8].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[8].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
+        self.assertEqual(inst.item[2].item[8].item[0].item[2].linkId, "2.1.1.3")
+        self.assertEqual(inst.item[2].item[8].item[0].item[2].text, "Gender")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.code, "LA10537-1")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.display, "-- Colon Cancer")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54112-8")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.1.1")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[0].text, "Cause of Death")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.code, "LA10400-2")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.display, "OVER 60")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54113-6")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].linkId, "2.1.1.4.1.2")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].item[1].text, "Age at Death")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.1")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].linkId, "2.1.1.4")
+        self.assertEqual(inst.item[2].item[8].item[0].item[3].text, "Living?")
+        self.assertEqual(inst.item[2].item[8].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[8].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[8].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[8].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
+        self.assertEqual(inst.item[2].item[8].item[0].item[4].linkId, "2.1.1.5")
+        self.assertEqual(inst.item[2].item[8].item[0].item[4].text, "Was this person born a twin?")
+        self.assertEqual(inst.item[2].item[8].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[8].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[8].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[8].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
+        self.assertEqual(inst.item[2].item[8].item[0].item[5].linkId, "2.1.1.6")
+        self.assertEqual(inst.item[2].item[8].item[0].item[5].text, "Was this person adopted?")
+        self.assertEqual(inst.item[2].item[8].item[0].linkId, "2.1.1")
+        self.assertEqual(inst.item[2].item[8].item[1].item[0].answer[0].valueCoding.code, "LA10537-1")
+        self.assertEqual(inst.item[2].item[8].item[1].item[0].answer[0].valueCoding.display, "-- Colon Cancer")
+        self.assertEqual(inst.item[2].item[8].item[1].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[8].item[1].item[0].linkId, "2.1.2.1")
+        self.assertEqual(inst.item[2].item[8].item[1].item[0].text, "Disease or Condition")
+        self.assertEqual(inst.item[2].item[8].item[1].item[1].answer[0].valueCoding.code, "LA10400-2")
+        self.assertEqual(inst.item[2].item[8].item[1].item[1].answer[0].valueCoding.display, "OVER 60")
+        self.assertEqual(inst.item[2].item[8].item[1].item[1].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[8].item[1].item[1].linkId, "2.1.2.2")
+        self.assertEqual(inst.item[2].item[8].item[1].item[1].text, "Age at Diagnosis")
+        self.assertEqual(inst.item[2].item[8].item[1].linkId, "2.1.2")
+        self.assertEqual(inst.item[2].item[8].item[1].text, "This family member's history of disease")
+        self.assertEqual(inst.item[2].item[8].linkId, "2.1")
+        self.assertEqual(inst.item[2].item[9].item[0].item[0].answer[0].valueCoding.code, "LA10424-2")
+        self.assertEqual(inst.item[2].item[9].item[0].item[0].answer[0].valueCoding.display, "Paternal Grandmother")
+        self.assertEqual(inst.item[2].item[9].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[9].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54136-7")
+        self.assertEqual(inst.item[2].item[9].item[0].item[0].linkId, "2.1.1.1")
+        self.assertEqual(inst.item[2].item[9].item[0].item[0].text, "Relationship to you")
+        self.assertEqual(inst.item[2].item[9].item[0].item[1].answer[0].valueString, "Claire")
+        self.assertEqual(inst.item[2].item[9].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54138-3")
+        self.assertEqual(inst.item[2].item[9].item[0].item[1].linkId, "2.1.1.2")
+        self.assertEqual(inst.item[2].item[9].item[0].item[1].text, "Name")
+        self.assertEqual(inst.item[2].item[9].item[0].item[2].answer[0].valueCoding.code, "LA3-6")
+        self.assertEqual(inst.item[2].item[9].item[0].item[2].answer[0].valueCoding.display, "Female")
+        self.assertEqual(inst.item[2].item[9].item[0].item[2].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[9].item[0].item[2].definition, "http://loinc.org/fhir/DataElement/54123-5")
+        self.assertEqual(inst.item[2].item[9].item[0].item[2].linkId, "2.1.1.3")
+        self.assertEqual(inst.item[2].item[9].item[0].item[2].text, "Gender")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].item[0].answer[0].valueString, "Lou Gehrigs")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].item[0].linkId, "2.1.1.4.1.1.1")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].item[0].text, "Please specify")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.code, "LA10589-2")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.display, "-- Other/Unexpected")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].definition, "http://loinc.org/fhir/DataElement/54112-8")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].linkId, "2.1.1.4.1.1")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[0].text, "Cause of Death")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.code, "LA10400-2")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.display, "OVER 60")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].definition, "http://loinc.org/fhir/DataElement/54113-6")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].linkId, "2.1.1.4.1.2")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].item[1].text, "Age at Death")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].item[0].linkId, "2.1.1.4.1")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].definition, "http://loinc.org/fhir/DataElement/54139-1")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].linkId, "2.1.1.4")
+        self.assertEqual(inst.item[2].item[9].item[0].item[3].text, "Living?")
+        self.assertEqual(inst.item[2].item[9].item[0].item[4].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[9].item[0].item[4].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[9].item[0].item[4].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[9].item[0].item[4].definition, "http://loinc.org/fhir/DataElement/54121-9")
+        self.assertEqual(inst.item[2].item[9].item[0].item[4].linkId, "2.1.1.5")
+        self.assertEqual(inst.item[2].item[9].item[0].item[4].text, "Was this person born a twin?")
+        self.assertEqual(inst.item[2].item[9].item[0].item[5].answer[0].valueCoding.code, "LA32-8")
+        self.assertEqual(inst.item[2].item[9].item[0].item[5].answer[0].valueCoding.display, "No")
+        self.assertEqual(inst.item[2].item[9].item[0].item[5].answer[0].valueCoding.system, "http://loinc.org")
+        self.assertEqual(inst.item[2].item[9].item[0].item[5].definition, "http://loinc.org/fhir/DataElement/54122-7")
+        self.assertEqual(inst.item[2].item[9].item[0].item[5].linkId, "2.1.1.6")
+        self.assertEqual(inst.item[2].item[9].item[0].item[5].text, "Was this person adopted?")
+        self.assertEqual(inst.item[2].item[9].item[0].linkId, "2.1.1")
+        self.assertEqual(inst.item[2].item[9].linkId, "2.1")
+        self.assertEqual(inst.item[2].linkId, "2")
+        self.assertEqual(inst.item[2].text, "Family member health information")
+        self.assertEqual(inst.status, "in-progress")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testQuestionnaireResponse5(self):
+        inst = self.instantiate_from("questionnaireresponse-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a QuestionnaireResponse instance")
+        self.implQuestionnaireResponse5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("QuestionnaireResponse", js["resourceType"])
+        inst2 = questionnaireresponse.QuestionnaireResponse(js)
+        self.implQuestionnaireResponse5(inst2)
+    
+    def implQuestionnaireResponse5(self, inst):
+        self.assertEqual(inst.authored.date, FHIRDate("2013-02-19T14:15:00-05:00").date)
+        self.assertEqual(inst.authored.as_json(), "2013-02-19T14:15:00-05:00")
+        self.assertEqual(inst.contained[0].id, "patsub")
+        self.assertEqual(inst.contained[1].id, "order")
+        self.assertEqual(inst.contained[2].id, "questauth")
+        self.assertEqual(inst.id, "3141")
+        self.assertEqual(inst.identifier.system, "http://example.org/fhir/NamingSystem/questionnaire-ids")
+        self.assertEqual(inst.identifier.value, "Q12349876")
+        self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[0].answer[0].valueCoding.code, "1")
+        self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[0].answer[0].valueCoding.system, "http://cancer.questionnaire.org/system/code/yesno")
+        self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[0].linkId, "1.1.1.1")
+        self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[1].answer[0].valueCoding.code, "1")
+        self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[1].answer[0].valueCoding.system, "http://cancer.questionnaire.org/system/code/yesno")
+        self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[1].linkId, "1.1.1.2")
+        self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[2].answer[0].valueCoding.code, "0")
+        self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[2].answer[0].valueCoding.system, "http://cancer.questionnaire.org/system/code/yesno")
+        self.assertEqual(inst.item[0].item[0].answer[0].item[0].item[2].linkId, "1.1.1.3")
+        self.assertEqual(inst.item[0].item[0].answer[0].item[0].linkId, "1.1.1")
+        self.assertEqual(inst.item[0].item[0].answer[0].valueCoding.code, "1")
+        self.assertEqual(inst.item[0].item[0].answer[0].valueCoding.display, "Yes")
+        self.assertEqual(inst.item[0].item[0].answer[0].valueCoding.system, "http://cancer.questionnaire.org/system/code/yesno")
+        self.assertEqual(inst.item[0].item[0].linkId, "1.1")
+        self.assertEqual(inst.item[0].linkId, "1")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/range.py b/fhirclient/models/range.py
new file mode 100644
index 0000000..901d5c5
--- /dev/null
+++ b/fhirclient/models/range.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Range) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Range(element.Element):
+    """ Set of values bounded by low and high.
+    
+    A set of ordered Quantities defined by a low and high limit.
+    """
+    
+    resource_type = "Range"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.high = None
+        """ High limit.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.low = None
+        """ Low limit.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        super(Range, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Range, self).elementProperties()
+        js.extend([
+            ("high", "high", quantity.Quantity, False, None, False),
+            ("low", "low", quantity.Quantity, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/ratio.py b/fhirclient/models/ratio.py
new file mode 100644
index 0000000..efd83c2
--- /dev/null
+++ b/fhirclient/models/ratio.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Ratio) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Ratio(element.Element):
+    """ A ratio of two Quantity values - a numerator and a denominator.
+    
+    A relationship of two Quantity values - expressed as a numerator and a
+    denominator.
+    """
+    
+    resource_type = "Ratio"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.denominator = None
+        """ Denominator value.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.numerator = None
+        """ Numerator value.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        super(Ratio, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Ratio, self).elementProperties()
+        js.extend([
+            ("denominator", "denominator", quantity.Quantity, False, None, False),
+            ("numerator", "numerator", quantity.Quantity, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/reference.py b/fhirclient/models/reference.py
new file mode 100644
index 0000000..08b82c9
--- /dev/null
+++ b/fhirclient/models/reference.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Reference) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Reference(element.Element):
+    """ A reference from one resource to another.
+    """
+    
+    resource_type = "Reference"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.display = None
+        """ Text alternative for the resource.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Logical reference, when literal reference is not known.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.reference = None
+        """ Literal reference, Relative, internal or absolute URL.
+        Type `str`. """
+        
+        super(Reference, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Reference, self).elementProperties()
+        js.extend([
+            ("display", "display", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("reference", "reference", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/referralrequest.py b/fhirclient/models/referralrequest.py
new file mode 100644
index 0000000..e99e228
--- /dev/null
+++ b/fhirclient/models/referralrequest.py
@@ -0,0 +1,222 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ReferralRequest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ReferralRequest(domainresource.DomainResource):
+    """ A request for referral or transfer of care.
+    
+    Used to record and send details about a request for referral service or
+    transfer of a patient to the care of another provider or provider
+    organization.
+    """
+    
+    resource_type = "ReferralRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authoredOn = None
+        """ Date of creation/activation.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.basedOn = None
+        """ Request fulfilled by this request.
+        List of `FHIRReference` items referencing `ReferralRequest, CarePlan, ProcedureRequest` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Originating encounter.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Instantiates protocol or definition.
+        List of `FHIRReference` items referencing `ActivityDefinition, PlanDefinition` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ A textual description of the referral.
+        Type `str`. """
+        
+        self.groupIdentifier = None
+        """ Composite request this is part of.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.intent = None
+        """ proposal | plan | order.
+        Type `str`. """
+        
+        self.note = None
+        """ Comments made about referral request.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.occurrenceDateTime = None
+        """ When the service(s) requested in the referral should occur.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.occurrencePeriod = None
+        """ When the service(s) requested in the referral should occur.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ Urgency of referral / transfer of care request.
+        Type `str`. """
+        
+        self.reasonCode = None
+        """ Reason for referral / transfer of care request.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Why is service needed?.
+        List of `FHIRReference` items referencing `Condition, Observation` (represented as `dict` in JSON). """
+        
+        self.recipient = None
+        """ Receiver of referral / transfer of care request.
+        List of `FHIRReference` items referencing `Practitioner, Organization, HealthcareService` (represented as `dict` in JSON). """
+        
+        self.relevantHistory = None
+        """ Key events in history of request.
+        List of `FHIRReference` items referencing `Provenance` (represented as `dict` in JSON). """
+        
+        self.replaces = None
+        """ Request(s) replaced by this request.
+        List of `FHIRReference` items referencing `ReferralRequest` (represented as `dict` in JSON). """
+        
+        self.requester = None
+        """ Who/what is requesting service.
+        Type `ReferralRequestRequester` (represented as `dict` in JSON). """
+        
+        self.serviceRequested = None
+        """ Actions requested as part of the referral.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.specialty = None
+        """ The clinical specialty (discipline) that the referral is requested
+        for.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | suspended | cancelled | completed | entered-in-
+        error | unknown.
+        Type `str`. """
+        
+        self.subject = None
+        """ Patient referred to care or transfer.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        self.supportingInfo = None
+        """ Additonal information to support referral or transfer of care
+        request.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Referral/Transition of care request type.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(ReferralRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ReferralRequest, self).elementProperties()
+        js.extend([
+            ("authoredOn", "authoredOn", fhirdate.FHIRDate, False, None, False),
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, True, None, False),
+            ("description", "description", str, False, None, False),
+            ("groupIdentifier", "groupIdentifier", identifier.Identifier, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("intent", "intent", str, False, None, True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("occurrenceDateTime", "occurrenceDateTime", fhirdate.FHIRDate, False, "occurrence", False),
+            ("occurrencePeriod", "occurrencePeriod", period.Period, False, "occurrence", False),
+            ("priority", "priority", str, False, None, False),
+            ("reasonCode", "reasonCode", codeableconcept.CodeableConcept, True, None, False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, True, None, False),
+            ("recipient", "recipient", fhirreference.FHIRReference, True, None, False),
+            ("relevantHistory", "relevantHistory", fhirreference.FHIRReference, True, None, False),
+            ("replaces", "replaces", fhirreference.FHIRReference, True, None, False),
+            ("requester", "requester", ReferralRequestRequester, False, None, False),
+            ("serviceRequested", "serviceRequested", codeableconcept.CodeableConcept, True, None, False),
+            ("specialty", "specialty", codeableconcept.CodeableConcept, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("supportingInfo", "supportingInfo", fhirreference.FHIRReference, True, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ReferralRequestRequester(backboneelement.BackboneElement):
+    """ Who/what is requesting service.
+    
+    The individual who initiated the request and has responsibility for its
+    activation.
+    """
+    
+    resource_type = "ReferralRequestRequester"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.agent = None
+        """ Individual making the request.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, RelatedPerson, Device` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization agent is acting for.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(ReferralRequestRequester, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ReferralRequestRequester, self).elementProperties()
+        js.extend([
+            ("agent", "agent", fhirreference.FHIRReference, False, None, True),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/referralrequest_tests.py b/fhirclient/models/referralrequest_tests.py
new file mode 100644
index 0000000..3c9743d
--- /dev/null
+++ b/fhirclient/models/referralrequest_tests.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import referralrequest
+from .fhirdate import FHIRDate
+
+
+class ReferralRequestTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ReferralRequest", js["resourceType"])
+        return referralrequest.ReferralRequest(js)
+    
+    def testReferralRequest1(self):
+        inst = self.instantiate_from("referralrequest-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ReferralRequest instance")
+        self.implReferralRequest1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ReferralRequest", js["resourceType"])
+        inst2 = referralrequest.ReferralRequest(js)
+        self.implReferralRequest1(inst2)
+    
+    def implReferralRequest1(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2014-02-14").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2014-02-14")
+        self.assertEqual(inst.description, "In the past 2 years Beverly has had 6 instances of r) sided Otitis media. She is     falling behind her peers at school, and displaying some learning difficulties.")
+        self.assertEqual(inst.groupIdentifier.value, "1234")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http://orionhealth.com/fhir/apps/referralids")
+        self.assertEqual(inst.identifier[0].value, "ret4421")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.occurrencePeriod.end.date, FHIRDate("2014-03-14").date)
+        self.assertEqual(inst.occurrencePeriod.end.as_json(), "2014-03-14")
+        self.assertEqual(inst.priority, "routine")
+        self.assertEqual(inst.reasonCode[0].text, "For consideration of Grommets")
+        self.assertEqual(inst.serviceRequested[0].coding[0].code, "172676009")
+        self.assertEqual(inst.serviceRequested[0].coding[0].display, "Myringotomy and insertion of tympanic ventilation tube")
+        self.assertEqual(inst.serviceRequested[0].coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.serviceRequested[0].text, "Insertion of grommets")
+        self.assertEqual(inst.specialty.coding[0].code, "ent")
+        self.assertEqual(inst.specialty.coding[0].display, "ENT")
+        self.assertEqual(inst.specialty.coding[0].system, "http://orionhealth.com/fhir/apps/specialties")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Referral to Dr Dave for Beverly weaver to have grommets inserted in her r) ear</div>")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "103696004")
+        self.assertEqual(inst.type.coding[0].display, "Patient referral to specialist")
+        self.assertEqual(inst.type.coding[0].system, "http://snomed.info/sct")
+
diff --git a/fhirclient/models/relatedartifact.py b/fhirclient/models/relatedartifact.py
new file mode 100644
index 0000000..aa70827
--- /dev/null
+++ b/fhirclient/models/relatedartifact.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/RelatedArtifact) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class RelatedArtifact(element.Element):
+    """ Related artifacts for a knowledge resource.
+    
+    Related artifacts such as additional documentation, justification, or
+    bibliographic references.
+    """
+    
+    resource_type = "RelatedArtifact"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.citation = None
+        """ Bibliographic citation for the artifact.
+        Type `str`. """
+        
+        self.display = None
+        """ Brief description of the related artifact.
+        Type `str`. """
+        
+        self.document = None
+        """ What document is being referenced.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.resource = None
+        """ What resource is being referenced.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ documentation | justification | citation | predecessor | successor
+        | derived-from | depends-on | composed-of.
+        Type `str`. """
+        
+        self.url = None
+        """ Where the artifact can be accessed.
+        Type `str`. """
+        
+        super(RelatedArtifact, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(RelatedArtifact, self).elementProperties()
+        js.extend([
+            ("citation", "citation", str, False, None, False),
+            ("display", "display", str, False, None, False),
+            ("document", "document", attachment.Attachment, False, None, False),
+            ("resource", "resource", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", str, False, None, True),
+            ("url", "url", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
diff --git a/fhirclient/models/relatedperson.py b/fhirclient/models/relatedperson.py
new file mode 100644
index 0000000..d43e05a
--- /dev/null
+++ b/fhirclient/models/relatedperson.py
@@ -0,0 +1,129 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/RelatedPerson) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class RelatedPerson(domainresource.DomainResource):
+    """ An person that is related to a patient, but who is not a direct target of
+    care.
+    
+    Information about a person that is involved in the care for a patient, but
+    who is not the target of healthcare, nor has a formal responsibility in the
+    care process.
+    """
+    
+    resource_type = "RelatedPerson"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Whether this related person's record is in active use.
+        Type `bool`. """
+        
+        self.address = None
+        """ Address where the related person can be contacted or visited.
+        List of `Address` items (represented as `dict` in JSON). """
+        
+        self.birthDate = None
+        """ The date on which the related person was born.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.gender = None
+        """ male | female | other | unknown.
+        Type `str`. """
+        
+        self.identifier = None
+        """ A human identifier for this person.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ A name associated with the person.
+        List of `HumanName` items (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ The patient this person is related to.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Period of time that this relationship is considered valid.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.photo = None
+        """ Image of the person.
+        List of `Attachment` items (represented as `dict` in JSON). """
+        
+        self.relationship = None
+        """ The nature of the relationship.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.telecom = None
+        """ A contact detail for the person.
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        super(RelatedPerson, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(RelatedPerson, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("address", "address", address.Address, True, None, False),
+            ("birthDate", "birthDate", fhirdate.FHIRDate, False, None, False),
+            ("gender", "gender", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("name", "name", humanname.HumanName, True, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, True),
+            ("period", "period", period.Period, False, None, False),
+            ("photo", "photo", attachment.Attachment, True, None, False),
+            ("relationship", "relationship", codeableconcept.CodeableConcept, False, None, False),
+            ("telecom", "telecom", contactpoint.ContactPoint, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import humanname
+except ImportError:
+    humanname = sys.modules[__package__ + '.humanname']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/relatedperson_tests.py b/fhirclient/models/relatedperson_tests.py
new file mode 100644
index 0000000..f532095
--- /dev/null
+++ b/fhirclient/models/relatedperson_tests.py
@@ -0,0 +1,146 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import relatedperson
+from .fhirdate import FHIRDate
+
+
+class RelatedPersonTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("RelatedPerson", js["resourceType"])
+        return relatedperson.RelatedPerson(js)
+    
+    def testRelatedPerson1(self):
+        inst = self.instantiate_from("relatedperson-example-f001-sarah.json")
+        self.assertIsNotNone(inst, "Must have instantiated a RelatedPerson instance")
+        self.implRelatedPerson1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("RelatedPerson", js["resourceType"])
+        inst2 = relatedperson.RelatedPerson(js)
+        self.implRelatedPerson1(inst2)
+    
+    def implRelatedPerson1(self, inst):
+        self.assertEqual(inst.gender, "female")
+        self.assertEqual(inst.id, "f001")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:2.16.840.1.113883.2.4.6.3")
+        self.assertEqual(inst.identifier[0].type.text, "BSN")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.name[0].family, "Abels")
+        self.assertEqual(inst.name[0].given[0], "Sarah")
+        self.assertEqual(inst.name[0].use, "usual")
+        self.assertEqual(inst.relationship.coding[0].code, "SIGOTHR")
+        self.assertEqual(inst.relationship.coding[0].system, "http://hl7.org/fhir/v3/RoleCode")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "mobile")
+        self.assertEqual(inst.telecom[0].value, "0690383372")
+        self.assertEqual(inst.telecom[1].system, "email")
+        self.assertEqual(inst.telecom[1].use, "home")
+        self.assertEqual(inst.telecom[1].value, "s.abels at kpn.nl")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testRelatedPerson2(self):
+        inst = self.instantiate_from("relatedperson-example-f002-ariadne.json")
+        self.assertIsNotNone(inst, "Must have instantiated a RelatedPerson instance")
+        self.implRelatedPerson2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("RelatedPerson", js["resourceType"])
+        inst2 = relatedperson.RelatedPerson(js)
+        self.implRelatedPerson2(inst2)
+    
+    def implRelatedPerson2(self, inst):
+        self.assertEqual(inst.birthDate.date, FHIRDate("1963").date)
+        self.assertEqual(inst.birthDate.as_json(), "1963")
+        self.assertEqual(inst.gender, "female")
+        self.assertEqual(inst.id, "f002")
+        self.assertEqual(inst.name[0].text, "Ariadne Bor-Jansma")
+        self.assertEqual(inst.name[0].use, "usual")
+        self.assertEqual(inst.period.start.date, FHIRDate("1975").date)
+        self.assertEqual(inst.period.start.as_json(), "1975")
+        self.assertEqual(inst.photo[0].contentType, "image/jpeg")
+        self.assertEqual(inst.relationship.coding[0].code, "SIGOTHR")
+        self.assertEqual(inst.relationship.coding[0].system, "http://hl7.org/fhir/v3/RoleCode")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "home")
+        self.assertEqual(inst.telecom[0].value, "+31201234567")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testRelatedPerson3(self):
+        inst = self.instantiate_from("relatedperson-example-peter.json")
+        self.assertIsNotNone(inst, "Must have instantiated a RelatedPerson instance")
+        self.implRelatedPerson3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("RelatedPerson", js["resourceType"])
+        inst2 = relatedperson.RelatedPerson(js)
+        self.implRelatedPerson3(inst2)
+    
+    def implRelatedPerson3(self, inst):
+        self.assertEqual(inst.address[0].city, "PleasantVille")
+        self.assertEqual(inst.address[0].line[0], "534 Erewhon St")
+        self.assertEqual(inst.address[0].postalCode, "3999")
+        self.assertEqual(inst.address[0].state, "Vic")
+        self.assertEqual(inst.address[0].use, "home")
+        self.assertEqual(inst.gender, "male")
+        self.assertEqual(inst.id, "peter")
+        self.assertEqual(inst.name[0].family, "Chalmers")
+        self.assertEqual(inst.name[0].given[0], "Peter")
+        self.assertEqual(inst.name[0].given[1], "James")
+        self.assertEqual(inst.name[0].use, "official")
+        self.assertEqual(inst.period.start.date, FHIRDate("2012-03-11").date)
+        self.assertEqual(inst.period.start.as_json(), "2012-03-11")
+        self.assertEqual(inst.photo[0].contentType, "image/jpeg")
+        self.assertEqual(inst.photo[0].url, "Binary/f012")
+        self.assertEqual(inst.relationship.coding[0].code, "C")
+        self.assertEqual(inst.relationship.coding[0].system, "http://hl7.org/fhir/v2/0131")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].use, "work")
+        self.assertEqual(inst.telecom[0].value, "(03) 5555 6473")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testRelatedPerson4(self):
+        inst = self.instantiate_from("relatedperson-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a RelatedPerson instance")
+        self.implRelatedPerson4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("RelatedPerson", js["resourceType"])
+        inst2 = relatedperson.RelatedPerson(js)
+        self.implRelatedPerson4(inst2)
+    
+    def implRelatedPerson4(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.address[0].city, "Paris")
+        self.assertEqual(inst.address[0].country, "FRA")
+        self.assertEqual(inst.address[0].line[0], "43, Place du Marché Sainte Catherine")
+        self.assertEqual(inst.address[0].postalCode, "75004")
+        self.assertEqual(inst.gender, "female")
+        self.assertEqual(inst.id, "benedicte")
+        self.assertEqual(inst.identifier[0].system, "urn:oid:1.2.250.1.61")
+        self.assertEqual(inst.identifier[0].type.text, "INSEE")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "272117510400399")
+        self.assertEqual(inst.name[0].family, "du Marché")
+        self.assertEqual(inst.name[0].given[0], "Bénédicte")
+        self.assertEqual(inst.photo[0].contentType, "image/jpeg")
+        self.assertEqual(inst.photo[0].url, "Binary/f016")
+        self.assertEqual(inst.relationship.coding[0].code, "N")
+        self.assertEqual(inst.relationship.coding[0].system, "http://hl7.org/fhir/v2/0131")
+        self.assertEqual(inst.relationship.coding[1].code, "WIFE")
+        self.assertEqual(inst.relationship.coding[1].system, "http://hl7.org/fhir/v3/RoleCode")
+        self.assertEqual(inst.telecom[0].system, "phone")
+        self.assertEqual(inst.telecom[0].value, "+33 (237) 998327")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/requestgroup.py b/fhirclient/models/requestgroup.py
new file mode 100644
index 0000000..df49629
--- /dev/null
+++ b/fhirclient/models/requestgroup.py
@@ -0,0 +1,392 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/RequestGroup) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class RequestGroup(domainresource.DomainResource):
+    """ A group of related requests.
+    
+    A group of related requests that can be used to capture intended activities
+    that have inter-dependencies such as "give this medication after that one".
+    """
+    
+    resource_type = "RequestGroup"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ Proposed actions, if any.
+        List of `RequestGroupAction` items (represented as `dict` in JSON). """
+        
+        self.author = None
+        """ Device or practitioner that authored the request group.
+        Type `FHIRReference` referencing `Device, Practitioner` (represented as `dict` in JSON). """
+        
+        self.authoredOn = None
+        """ When the request group was authored.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.basedOn = None
+        """ Fulfills plan, proposal, or order.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Encounter or Episode for the request group.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definition = None
+        """ Instantiates protocol or definition.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.groupIdentifier = None
+        """ Composite request this is part of.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.intent = None
+        """ proposal | plan | order.
+        Type `str`. """
+        
+        self.note = None
+        """ Additional notes about the response.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ routine | urgent | asap | stat.
+        Type `str`. """
+        
+        self.reasonCodeableConcept = None
+        """ Reason for the request group.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Reason for the request group.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.replaces = None
+        """ Request(s) replaced by this request.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | suspended | cancelled | completed | entered-in-
+        error | unknown.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who the request group is about.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        super(RequestGroup, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(RequestGroup, self).elementProperties()
+        js.extend([
+            ("action", "action", RequestGroupAction, True, None, False),
+            ("author", "author", fhirreference.FHIRReference, False, None, False),
+            ("authoredOn", "authoredOn", fhirdate.FHIRDate, False, None, False),
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definition", "definition", fhirreference.FHIRReference, True, None, False),
+            ("groupIdentifier", "groupIdentifier", identifier.Identifier, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("intent", "intent", str, False, None, True),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("priority", "priority", str, False, None, False),
+            ("reasonCodeableConcept", "reasonCodeableConcept", codeableconcept.CodeableConcept, False, "reason", False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, False, "reason", False),
+            ("replaces", "replaces", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class RequestGroupAction(backboneelement.BackboneElement):
+    """ Proposed actions, if any.
+    
+    The actions, if any, produced by the evaluation of the artifact.
+    """
+    
+    resource_type = "RequestGroupAction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ Sub action.
+        List of `RequestGroupAction` items (represented as `dict` in JSON). """
+        
+        self.cardinalityBehavior = None
+        """ single | multiple.
+        Type `str`. """
+        
+        self.code = None
+        """ Code representing the meaning of the action or sub-actions.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.condition = None
+        """ Whether or not the action is applicable.
+        List of `RequestGroupActionCondition` items (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Short description of the action.
+        Type `str`. """
+        
+        self.documentation = None
+        """ Supporting documentation for the intended performer of the action.
+        List of `RelatedArtifact` items (represented as `dict` in JSON). """
+        
+        self.groupingBehavior = None
+        """ visual-group | logical-group | sentence-group.
+        Type `str`. """
+        
+        self.label = None
+        """ User-visible label for the action (e.g. 1. or A.).
+        Type `str`. """
+        
+        self.participant = None
+        """ Who should perform the action.
+        List of `FHIRReference` items referencing `Patient, Person, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.precheckBehavior = None
+        """ yes | no.
+        Type `str`. """
+        
+        self.relatedAction = None
+        """ Relationship to another action.
+        List of `RequestGroupActionRelatedAction` items (represented as `dict` in JSON). """
+        
+        self.requiredBehavior = None
+        """ must | could | must-unless-documented.
+        Type `str`. """
+        
+        self.resource = None
+        """ The target of the action.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.selectionBehavior = None
+        """ any | all | all-or-none | exactly-one | at-most-one | one-or-more.
+        Type `str`. """
+        
+        self.textEquivalent = None
+        """ Static text equivalent of the action, used if the dynamic aspects
+        cannot be interpreted by the receiving system.
+        Type `str`. """
+        
+        self.timingDateTime = None
+        """ When the action should take place.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.timingDuration = None
+        """ When the action should take place.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.timingPeriod = None
+        """ When the action should take place.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.timingRange = None
+        """ When the action should take place.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.timingTiming = None
+        """ When the action should take place.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.title = None
+        """ User-visible title.
+        Type `str`. """
+        
+        self.type = None
+        """ create | update | remove | fire-event.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(RequestGroupAction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(RequestGroupAction, self).elementProperties()
+        js.extend([
+            ("action", "action", RequestGroupAction, True, None, False),
+            ("cardinalityBehavior", "cardinalityBehavior", str, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, True, None, False),
+            ("condition", "condition", RequestGroupActionCondition, True, None, False),
+            ("description", "description", str, False, None, False),
+            ("documentation", "documentation", relatedartifact.RelatedArtifact, True, None, False),
+            ("groupingBehavior", "groupingBehavior", str, False, None, False),
+            ("label", "label", str, False, None, False),
+            ("participant", "participant", fhirreference.FHIRReference, True, None, False),
+            ("precheckBehavior", "precheckBehavior", str, False, None, False),
+            ("relatedAction", "relatedAction", RequestGroupActionRelatedAction, True, None, False),
+            ("requiredBehavior", "requiredBehavior", str, False, None, False),
+            ("resource", "resource", fhirreference.FHIRReference, False, None, False),
+            ("selectionBehavior", "selectionBehavior", str, False, None, False),
+            ("textEquivalent", "textEquivalent", str, False, None, False),
+            ("timingDateTime", "timingDateTime", fhirdate.FHIRDate, False, "timing", False),
+            ("timingDuration", "timingDuration", duration.Duration, False, "timing", False),
+            ("timingPeriod", "timingPeriod", period.Period, False, "timing", False),
+            ("timingRange", "timingRange", range.Range, False, "timing", False),
+            ("timingTiming", "timingTiming", timing.Timing, False, "timing", False),
+            ("title", "title", str, False, None, False),
+            ("type", "type", coding.Coding, False, None, False),
+        ])
+        return js
+
+
+class RequestGroupActionCondition(backboneelement.BackboneElement):
+    """ Whether or not the action is applicable.
+    
+    An expression that describes applicability criteria, or start/stop
+    conditions for the action.
+    """
+    
+    resource_type = "RequestGroupActionCondition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Natural language description of the condition.
+        Type `str`. """
+        
+        self.expression = None
+        """ Boolean-valued expression.
+        Type `str`. """
+        
+        self.kind = None
+        """ applicability | start | stop.
+        Type `str`. """
+        
+        self.language = None
+        """ Language of the expression.
+        Type `str`. """
+        
+        super(RequestGroupActionCondition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(RequestGroupActionCondition, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("expression", "expression", str, False, None, False),
+            ("kind", "kind", str, False, None, True),
+            ("language", "language", str, False, None, False),
+        ])
+        return js
+
+
+class RequestGroupActionRelatedAction(backboneelement.BackboneElement):
+    """ Relationship to another action.
+    
+    A relationship to another action such as "before" or "30-60 minutes after
+    start of".
+    """
+    
+    resource_type = "RequestGroupActionRelatedAction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actionId = None
+        """ What action this is related to.
+        Type `str`. """
+        
+        self.offsetDuration = None
+        """ Time offset for the relationship.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.offsetRange = None
+        """ Time offset for the relationship.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.relationship = None
+        """ before-start | before | before-end | concurrent-with-start |
+        concurrent | concurrent-with-end | after-start | after | after-end.
+        Type `str`. """
+        
+        super(RequestGroupActionRelatedAction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(RequestGroupActionRelatedAction, self).elementProperties()
+        js.extend([
+            ("actionId", "actionId", str, False, None, True),
+            ("offsetDuration", "offsetDuration", duration.Duration, False, "offset", False),
+            ("offsetRange", "offsetRange", range.Range, False, "offset", False),
+            ("relationship", "relationship", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
+try:
+    from . import relatedartifact
+except ImportError:
+    relatedartifact = sys.modules[__package__ + '.relatedartifact']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/requestgroup_tests.py b/fhirclient/models/requestgroup_tests.py
new file mode 100644
index 0000000..73348f4
--- /dev/null
+++ b/fhirclient/models/requestgroup_tests.py
@@ -0,0 +1,117 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import requestgroup
+from .fhirdate import FHIRDate
+
+
+class RequestGroupTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("RequestGroup", js["resourceType"])
+        return requestgroup.RequestGroup(js)
+    
+    def testRequestGroup1(self):
+        inst = self.instantiate_from("requestgroup-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a RequestGroup instance")
+        self.implRequestGroup1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("RequestGroup", js["resourceType"])
+        inst2 = requestgroup.RequestGroup(js)
+        self.implRequestGroup1(inst2)
+    
+    def implRequestGroup1(self, inst):
+        self.assertEqual(inst.action[0].action[0].description, "Administer medication 1")
+        self.assertEqual(inst.action[0].action[0].id, "medication-action-1")
+        self.assertEqual(inst.action[0].action[0].type.code, "create")
+        self.assertEqual(inst.action[0].action[1].description, "Administer medication 2")
+        self.assertEqual(inst.action[0].action[1].id, "medication-action-2")
+        self.assertEqual(inst.action[0].action[1].relatedAction[0].actionId, "medication-action-1")
+        self.assertEqual(inst.action[0].action[1].relatedAction[0].offsetDuration.unit, "h")
+        self.assertEqual(inst.action[0].action[1].relatedAction[0].offsetDuration.value, 1)
+        self.assertEqual(inst.action[0].action[1].relatedAction[0].relationship, "after-end")
+        self.assertEqual(inst.action[0].action[1].type.code, "create")
+        self.assertEqual(inst.action[0].cardinalityBehavior, "single")
+        self.assertEqual(inst.action[0].description, "Administer medications at the appropriate time")
+        self.assertEqual(inst.action[0].groupingBehavior, "logical-group")
+        self.assertEqual(inst.action[0].label, "1")
+        self.assertEqual(inst.action[0].precheckBehavior, "yes")
+        self.assertEqual(inst.action[0].requiredBehavior, "must")
+        self.assertEqual(inst.action[0].selectionBehavior, "all")
+        self.assertEqual(inst.action[0].textEquivalent, "Administer medication 1, followed an hour later by medication 2")
+        self.assertEqual(inst.action[0].timingDateTime.date, FHIRDate("2017-03-06T19:00:00Z").date)
+        self.assertEqual(inst.action[0].timingDateTime.as_json(), "2017-03-06T19:00:00Z")
+        self.assertEqual(inst.action[0].title, "Administer Medications")
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2017-03-06T17:31:00Z").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2017-03-06T17:31:00Z")
+        self.assertEqual(inst.contained[0].id, "medicationrequest-1")
+        self.assertEqual(inst.contained[1].id, "medicationrequest-2")
+        self.assertEqual(inst.groupIdentifier.system, "http://example.org/treatment-group")
+        self.assertEqual(inst.groupIdentifier.value, "00001")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].value, "requestgroup-1")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.note[0].text, "Additional notes about the request group")
+        self.assertEqual(inst.priority, "routine")
+        self.assertEqual(inst.reasonCodeableConcept.text, "Treatment")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Example RequestGroup illustrating related actions to administer medications in sequence with time delay.</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testRequestGroup2(self):
+        inst = self.instantiate_from("requestgroup-kdn5-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a RequestGroup instance")
+        self.implRequestGroup2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("RequestGroup", js["resourceType"])
+        inst2 = requestgroup.RequestGroup(js)
+        self.implRequestGroup2(inst2)
+    
+    def implRequestGroup2(self, inst):
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].extension[0].extension[0].url, "day")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].extension[0].extension[0].valueInteger, 1)
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].extension[0].extension[1].url, "day")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].extension[0].extension[1].valueInteger, 8)
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].extension[0].url, "http://hl7.org/fhir/StructureDefinition/timing-daysOfCycle")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].id, "action-1")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[0].textEquivalent, "Gemcitabine 1250 mg/m² IV over 30 minutes on days 1 and 8")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].extension[0].extension[0].url, "day")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].extension[0].extension[0].valueInteger, 1)
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].extension[0].url, "http://hl7.org/fhir/StructureDefinition/timing-daysOfCycle")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].id, "action-2")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].relatedAction[0].actionId, "action-1")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].relatedAction[0].relationship, "concurrent-with-start")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].action[1].textEquivalent, "CARBOplatin AUC 5 IV over 30 minutes on Day 1")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].id, "cycle-definition-1")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].textEquivalent, "21-day cycle for 6 cycles")
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].timingTiming.repeat.count, 6)
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].timingTiming.repeat.duration, 21)
+        self.assertEqual(inst.action[0].action[0].action[0].action[0].timingTiming.repeat.durationUnit, "d")
+        self.assertEqual(inst.action[0].action[0].action[0].groupingBehavior, "sentence-group")
+        self.assertEqual(inst.action[0].action[0].action[0].selectionBehavior, "exactly-one")
+        self.assertEqual(inst.action[0].action[0].selectionBehavior, "all")
+        self.assertEqual(inst.action[0].selectionBehavior, "exactly-one")
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2017-03-06T17:31:00Z").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2017-03-06T17:31:00Z")
+        self.assertEqual(inst.contained[0].id, "1111")
+        self.assertEqual(inst.contained[1].id, "2222")
+        self.assertEqual(inst.id, "kdn5-example")
+        self.assertEqual(inst.identifier[0].value, "requestgroup-kdn5")
+        self.assertEqual(inst.intent, "plan")
+        self.assertEqual(inst.priority, "routine")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Administer gemcitabine and carboplatin.</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/researchstudy.py b/fhirclient/models/researchstudy.py
new file mode 100644
index 0000000..47503e8
--- /dev/null
+++ b/fhirclient/models/researchstudy.py
@@ -0,0 +1,213 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ResearchStudy) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ResearchStudy(domainresource.DomainResource):
+    """ Investigation to increase healthcare-related patient-independent knowledge.
+    
+    A process where a researcher or organization plans and then executes a
+    series of steps intended to increase the field of healthcare-related
+    knowledge.  This includes studies of safety, efficacy, comparative
+    effectiveness and other information about medications, devices, therapies
+    and other interventional and investigative techniques.  A ResearchStudy
+    involves the gathering of information about human or animal subjects.
+    """
+    
+    resource_type = "ResearchStudy"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.arm = None
+        """ Defined path through the study for a subject.
+        List of `ResearchStudyArm` items (represented as `dict` in JSON). """
+        
+        self.category = None
+        """ Classifications for the study.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.contact = None
+        """ Contact details for the study.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ What this is study doing.
+        Type `str`. """
+        
+        self.enrollment = None
+        """ Inclusion & exclusion criteria.
+        List of `FHIRReference` items referencing `Group` (represented as `dict` in JSON). """
+        
+        self.focus = None
+        """ Drugs, devices, conditions, etc. under study.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier for study.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Geographic region(s) for study.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.keyword = None
+        """ Used to search for the study.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Comments made about the event.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Part of larger study.
+        List of `FHIRReference` items referencing `ResearchStudy` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ When the study began and ended.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.principalInvestigator = None
+        """ The individual responsible for the study.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.protocol = None
+        """ Steps followed in executing study.
+        List of `FHIRReference` items referencing `PlanDefinition` (represented as `dict` in JSON). """
+        
+        self.reasonStopped = None
+        """ Reason for terminating study early.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.relatedArtifact = None
+        """ References and dependencies.
+        List of `RelatedArtifact` items (represented as `dict` in JSON). """
+        
+        self.site = None
+        """ Location involved in study execution.
+        List of `FHIRReference` items referencing `Location` (represented as `dict` in JSON). """
+        
+        self.sponsor = None
+        """ Organization responsible for the study.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | in-progress | suspended | stopped | completed | entered-in-
+        error.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this study.
+        Type `str`. """
+        
+        super(ResearchStudy, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ResearchStudy, self).elementProperties()
+        js.extend([
+            ("arm", "arm", ResearchStudyArm, True, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("description", "description", str, False, None, False),
+            ("enrollment", "enrollment", fhirreference.FHIRReference, True, None, False),
+            ("focus", "focus", codeableconcept.CodeableConcept, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("keyword", "keyword", codeableconcept.CodeableConcept, True, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, True, None, False),
+            ("period", "period", period.Period, False, None, False),
+            ("principalInvestigator", "principalInvestigator", fhirreference.FHIRReference, False, None, False),
+            ("protocol", "protocol", fhirreference.FHIRReference, True, None, False),
+            ("reasonStopped", "reasonStopped", codeableconcept.CodeableConcept, False, None, False),
+            ("relatedArtifact", "relatedArtifact", relatedartifact.RelatedArtifact, True, None, False),
+            ("site", "site", fhirreference.FHIRReference, True, None, False),
+            ("sponsor", "sponsor", fhirreference.FHIRReference, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ResearchStudyArm(backboneelement.BackboneElement):
+    """ Defined path through the study for a subject.
+    
+    Describes an expected sequence of events for one of the participants of a
+    study.  E.g. Exposure to drug A, wash-out, exposure to drug B, wash-out,
+    follow-up.
+    """
+    
+    resource_type = "ResearchStudyArm"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Categorization of study arm.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Short explanation of study path.
+        Type `str`. """
+        
+        self.name = None
+        """ Label for study arm.
+        Type `str`. """
+        
+        super(ResearchStudyArm, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ResearchStudyArm, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("name", "name", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import relatedartifact
+except ImportError:
+    relatedartifact = sys.modules[__package__ + '.relatedartifact']
diff --git a/fhirclient/models/researchstudy_tests.py b/fhirclient/models/researchstudy_tests.py
new file mode 100644
index 0000000..232df12
--- /dev/null
+++ b/fhirclient/models/researchstudy_tests.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import researchstudy
+from .fhirdate import FHIRDate
+
+
+class ResearchStudyTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ResearchStudy", js["resourceType"])
+        return researchstudy.ResearchStudy(js)
+    
+    def testResearchStudy1(self):
+        inst = self.instantiate_from("researchstudy-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ResearchStudy instance")
+        self.implResearchStudy1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ResearchStudy", js["resourceType"])
+        inst2 = researchstudy.ResearchStudy(js)
+        self.implResearchStudy1(inst2)
+    
+    def implResearchStudy1(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/researchsubject.py b/fhirclient/models/researchsubject.py
new file mode 100644
index 0000000..87bbde2
--- /dev/null
+++ b/fhirclient/models/researchsubject.py
@@ -0,0 +1,92 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ResearchSubject) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ResearchSubject(domainresource.DomainResource):
+    """ Investigation to increase healthcare-related patient-independent knowledge.
+    
+    A process where a researcher or organization plans and then executes a
+    series of steps intended to increase the field of healthcare-related
+    knowledge.  This includes studies of safety, efficacy, comparative
+    effectiveness and other information about medications, devices, therapies
+    and other interventional and investigative techniques.  A ResearchStudy
+    involves the gathering of information about human or animal subjects.
+    """
+    
+    resource_type = "ResearchSubject"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.actualArm = None
+        """ What path was followed.
+        Type `str`. """
+        
+        self.assignedArm = None
+        """ What path should be followed.
+        Type `str`. """
+        
+        self.consent = None
+        """ Agreement to participate in study.
+        Type `FHIRReference` referencing `Consent` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business Identifier for research subject.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.individual = None
+        """ Who is part of study.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Start and end of participation.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ candidate | enrolled | active | suspended | withdrawn | completed.
+        Type `str`. """
+        
+        self.study = None
+        """ Study subject is part of.
+        Type `FHIRReference` referencing `ResearchStudy` (represented as `dict` in JSON). """
+        
+        super(ResearchSubject, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ResearchSubject, self).elementProperties()
+        js.extend([
+            ("actualArm", "actualArm", str, False, None, False),
+            ("assignedArm", "assignedArm", str, False, None, False),
+            ("consent", "consent", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("individual", "individual", fhirreference.FHIRReference, False, None, True),
+            ("period", "period", period.Period, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("study", "study", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/researchsubject_tests.py b/fhirclient/models/researchsubject_tests.py
new file mode 100644
index 0000000..4dc69d4
--- /dev/null
+++ b/fhirclient/models/researchsubject_tests.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import researchsubject
+from .fhirdate import FHIRDate
+
+
+class ResearchSubjectTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ResearchSubject", js["resourceType"])
+        return researchsubject.ResearchSubject(js)
+    
+    def testResearchSubject1(self):
+        inst = self.instantiate_from("researchsubject-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ResearchSubject instance")
+        self.implResearchSubject1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ResearchSubject", js["resourceType"])
+        inst2 = researchsubject.ResearchSubject(js)
+        self.implResearchSubject1(inst2)
+    
+    def implResearchSubject1(self, inst):
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier.system, "http://example.org/studysubjectids")
+        self.assertEqual(inst.identifier.type.text, "Subject id")
+        self.assertEqual(inst.identifier.value, "123")
+        self.assertEqual(inst.status, "candidate")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/resource.py b/fhirclient/models/resource.py
new file mode 100644
index 0000000..7077416
--- /dev/null
+++ b/fhirclient/models/resource.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Resource) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import fhirabstractresource
+
+class Resource(fhirabstractresource.FHIRAbstractResource):
+    """ Base Resource.
+    
+    This is the base resource type for everything.
+    """
+    
+    resource_type = "Resource"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.id = None
+        """ Logical id of this artifact.
+        Type `str`. """
+        
+        self.implicitRules = None
+        """ A set of rules under which this content was created.
+        Type `str`. """
+        
+        self.language = None
+        """ Language of the resource content.
+        Type `str`. """
+        
+        self.meta = None
+        """ Metadata about the resource.
+        Type `Meta` (represented as `dict` in JSON). """
+        
+        super(Resource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Resource, self).elementProperties()
+        js.extend([
+            ("id", "id", str, False, None, False),
+            ("implicitRules", "implicitRules", str, False, None, False),
+            ("language", "language", str, False, None, False),
+            ("meta", "meta", meta.Meta, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import meta
+except ImportError:
+    meta = sys.modules[__package__ + '.meta']
diff --git a/fhirclient/models/riskassessment.py b/fhirclient/models/riskassessment.py
new file mode 100644
index 0000000..9398aa0
--- /dev/null
+++ b/fhirclient/models/riskassessment.py
@@ -0,0 +1,217 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/RiskAssessment) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class RiskAssessment(domainresource.DomainResource):
+    """ Potential outcomes for a subject with likelihood.
+    
+    An assessment of the likely outcome(s) for a patient or other subject as
+    well as the likelihood of each outcome.
+    """
+    
+    resource_type = "RiskAssessment"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.basedOn = None
+        """ Request fulfilled by this assessment.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.basis = None
+        """ Information used in assessment.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Type of assessment.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.comment = None
+        """ Comments on the risk assessment.
+        Type `str`. """
+        
+        self.condition = None
+        """ Condition assessed.
+        Type `FHIRReference` referencing `Condition` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Where was assessment performed?.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Unique identifier for the assessment.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.method = None
+        """ Evaluation mechanism.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.mitigation = None
+        """ How to reduce risk.
+        Type `str`. """
+        
+        self.occurrenceDateTime = None
+        """ When was assessment made?.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.occurrencePeriod = None
+        """ When was assessment made?.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.parent = None
+        """ Part of this occurrence.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.performer = None
+        """ Who did assessment?.
+        Type `FHIRReference` referencing `Practitioner, Device` (represented as `dict` in JSON). """
+        
+        self.prediction = None
+        """ Outcome predicted.
+        List of `RiskAssessmentPrediction` items (represented as `dict` in JSON). """
+        
+        self.reasonCodeableConcept = None
+        """ Why the assessment was necessary?.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Why the assessment was necessary?.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ registered | preliminary | final | amended +.
+        Type `str`. """
+        
+        self.subject = None
+        """ Who/what does assessment apply to?.
+        Type `FHIRReference` referencing `Patient, Group` (represented as `dict` in JSON). """
+        
+        super(RiskAssessment, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(RiskAssessment, self).elementProperties()
+        js.extend([
+            ("basedOn", "basedOn", fhirreference.FHIRReference, False, None, False),
+            ("basis", "basis", fhirreference.FHIRReference, True, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("comment", "comment", str, False, None, False),
+            ("condition", "condition", fhirreference.FHIRReference, False, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("method", "method", codeableconcept.CodeableConcept, False, None, False),
+            ("mitigation", "mitigation", str, False, None, False),
+            ("occurrenceDateTime", "occurrenceDateTime", fhirdate.FHIRDate, False, "occurrence", False),
+            ("occurrencePeriod", "occurrencePeriod", period.Period, False, "occurrence", False),
+            ("parent", "parent", fhirreference.FHIRReference, False, None, False),
+            ("performer", "performer", fhirreference.FHIRReference, False, None, False),
+            ("prediction", "prediction", RiskAssessmentPrediction, True, None, False),
+            ("reasonCodeableConcept", "reasonCodeableConcept", codeableconcept.CodeableConcept, False, "reason", False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, False, "reason", False),
+            ("status", "status", str, False, None, True),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class RiskAssessmentPrediction(backboneelement.BackboneElement):
+    """ Outcome predicted.
+    
+    Describes the expected outcome for the subject.
+    """
+    
+    resource_type = "RiskAssessmentPrediction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.outcome = None
+        """ Possible outcome for the subject.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.probabilityDecimal = None
+        """ Likelihood of specified outcome.
+        Type `float`. """
+        
+        self.probabilityRange = None
+        """ Likelihood of specified outcome.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.qualitativeRisk = None
+        """ Likelihood of specified outcome as a qualitative value.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.rationale = None
+        """ Explanation of prediction.
+        Type `str`. """
+        
+        self.relativeRisk = None
+        """ Relative likelihood.
+        Type `float`. """
+        
+        self.whenPeriod = None
+        """ Timeframe or age range.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.whenRange = None
+        """ Timeframe or age range.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        super(RiskAssessmentPrediction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(RiskAssessmentPrediction, self).elementProperties()
+        js.extend([
+            ("outcome", "outcome", codeableconcept.CodeableConcept, False, None, True),
+            ("probabilityDecimal", "probabilityDecimal", float, False, "probability", False),
+            ("probabilityRange", "probabilityRange", range.Range, False, "probability", False),
+            ("qualitativeRisk", "qualitativeRisk", codeableconcept.CodeableConcept, False, None, False),
+            ("rationale", "rationale", str, False, None, False),
+            ("relativeRisk", "relativeRisk", float, False, None, False),
+            ("whenPeriod", "whenPeriod", period.Period, False, "when", False),
+            ("whenRange", "whenRange", range.Range, False, "when", False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
diff --git a/fhirclient/models/riskassessment_tests.py b/fhirclient/models/riskassessment_tests.py
new file mode 100644
index 0000000..cb64dba
--- /dev/null
+++ b/fhirclient/models/riskassessment_tests.py
@@ -0,0 +1,186 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import riskassessment
+from .fhirdate import FHIRDate
+
+
+class RiskAssessmentTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("RiskAssessment", js["resourceType"])
+        return riskassessment.RiskAssessment(js)
+    
+    def testRiskAssessment1(self):
+        inst = self.instantiate_from("riskassessment-example-cardiac.json")
+        self.assertIsNotNone(inst, "Must have instantiated a RiskAssessment instance")
+        self.implRiskAssessment1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("RiskAssessment", js["resourceType"])
+        inst2 = riskassessment.RiskAssessment(js)
+        self.implRiskAssessment1(inst2)
+    
+    def implRiskAssessment1(self, inst):
+        self.assertEqual(inst.id, "cardiac")
+        self.assertEqual(inst.identifier.system, "http://example.org")
+        self.assertEqual(inst.identifier.use, "official")
+        self.assertEqual(inst.identifier.value, "risk-assessment-cardiac")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2014-07-19T16:04:00Z").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2014-07-19T16:04:00Z")
+        self.assertEqual(inst.prediction[0].outcome.text, "Heart Attack")
+        self.assertEqual(inst.prediction[0].probabilityDecimal, 0.02)
+        self.assertEqual(inst.prediction[0].whenRange.high.code, "a")
+        self.assertEqual(inst.prediction[0].whenRange.high.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[0].whenRange.high.unit, "years")
+        self.assertEqual(inst.prediction[0].whenRange.high.value, 49)
+        self.assertEqual(inst.prediction[0].whenRange.low.code, "a")
+        self.assertEqual(inst.prediction[0].whenRange.low.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[0].whenRange.low.unit, "years")
+        self.assertEqual(inst.prediction[0].whenRange.low.value, 39)
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testRiskAssessment2(self):
+        inst = self.instantiate_from("riskassessment-example-population.json")
+        self.assertIsNotNone(inst, "Must have instantiated a RiskAssessment instance")
+        self.implRiskAssessment2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("RiskAssessment", js["resourceType"])
+        inst2 = riskassessment.RiskAssessment(js)
+        self.implRiskAssessment2(inst2)
+    
+    def implRiskAssessment2(self, inst):
+        self.assertEqual(inst.id, "population")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testRiskAssessment3(self):
+        inst = self.instantiate_from("riskassessment-example-prognosis.json")
+        self.assertIsNotNone(inst, "Must have instantiated a RiskAssessment instance")
+        self.implRiskAssessment3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("RiskAssessment", js["resourceType"])
+        inst2 = riskassessment.RiskAssessment(js)
+        self.implRiskAssessment3(inst2)
+    
+    def implRiskAssessment3(self, inst):
+        self.assertEqual(inst.id, "prognosis")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2010-11-22").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2010-11-22")
+        self.assertEqual(inst.prediction[0].outcome.coding[0].code, "249943000:363698007=72098002,260868000=6934004")
+        self.assertEqual(inst.prediction[0].outcome.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.prediction[0].outcome.text, "permanent weakness of the left arm")
+        self.assertEqual(inst.prediction[0].qualitativeRisk.coding[0].code, "moderate")
+        self.assertEqual(inst.prediction[0].qualitativeRisk.coding[0].display, "moderate likelihood")
+        self.assertEqual(inst.prediction[0].qualitativeRisk.coding[0].system, "http://hl7.org/fhir/risk-probability")
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "additional")
+    
+    def testRiskAssessment4(self):
+        inst = self.instantiate_from("riskassessment-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a RiskAssessment instance")
+        self.implRiskAssessment4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("RiskAssessment", js["resourceType"])
+        inst2 = riskassessment.RiskAssessment(js)
+        self.implRiskAssessment4(inst2)
+    
+    def implRiskAssessment4(self, inst):
+        self.assertEqual(inst.comment, "High degree of certainty")
+        self.assertEqual(inst.id, "genetic")
+        self.assertEqual(inst.method.coding[0].code, "BRCAPRO")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2006-01-13T23:01:00Z").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2006-01-13T23:01:00Z")
+        self.assertEqual(inst.prediction[0].outcome.text, "Breast Cancer")
+        self.assertEqual(inst.prediction[0].probabilityDecimal, 0.000168)
+        self.assertEqual(inst.prediction[0].whenRange.high.code, "a")
+        self.assertEqual(inst.prediction[0].whenRange.high.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[0].whenRange.high.unit, "years")
+        self.assertEqual(inst.prediction[0].whenRange.high.value, 53)
+        self.assertEqual(inst.prediction[1].outcome.text, "Breast Cancer")
+        self.assertEqual(inst.prediction[1].probabilityDecimal, 0.000368)
+        self.assertEqual(inst.prediction[1].whenRange.high.code, "a")
+        self.assertEqual(inst.prediction[1].whenRange.high.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[1].whenRange.high.unit, "years")
+        self.assertEqual(inst.prediction[1].whenRange.high.value, 57)
+        self.assertEqual(inst.prediction[1].whenRange.low.code, "a")
+        self.assertEqual(inst.prediction[1].whenRange.low.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[1].whenRange.low.unit, "years")
+        self.assertEqual(inst.prediction[1].whenRange.low.value, 54)
+        self.assertEqual(inst.prediction[2].outcome.text, "Breast Cancer")
+        self.assertEqual(inst.prediction[2].probabilityDecimal, 0.000594)
+        self.assertEqual(inst.prediction[2].whenRange.high.code, "a")
+        self.assertEqual(inst.prediction[2].whenRange.high.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[2].whenRange.high.unit, "years")
+        self.assertEqual(inst.prediction[2].whenRange.high.value, 62)
+        self.assertEqual(inst.prediction[2].whenRange.low.code, "a")
+        self.assertEqual(inst.prediction[2].whenRange.low.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[2].whenRange.low.unit, "years")
+        self.assertEqual(inst.prediction[2].whenRange.low.value, 58)
+        self.assertEqual(inst.prediction[3].outcome.text, "Breast Cancer")
+        self.assertEqual(inst.prediction[3].probabilityDecimal, 0.000838)
+        self.assertEqual(inst.prediction[3].whenRange.high.code, "a")
+        self.assertEqual(inst.prediction[3].whenRange.high.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[3].whenRange.high.unit, "years")
+        self.assertEqual(inst.prediction[3].whenRange.high.value, 67)
+        self.assertEqual(inst.prediction[3].whenRange.low.code, "a")
+        self.assertEqual(inst.prediction[3].whenRange.low.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[3].whenRange.low.unit, "years")
+        self.assertEqual(inst.prediction[3].whenRange.low.value, 63)
+        self.assertEqual(inst.prediction[4].outcome.text, "Breast Cancer")
+        self.assertEqual(inst.prediction[4].probabilityDecimal, 0.001089)
+        self.assertEqual(inst.prediction[4].whenRange.high.code, "a")
+        self.assertEqual(inst.prediction[4].whenRange.high.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[4].whenRange.high.unit, "years")
+        self.assertEqual(inst.prediction[4].whenRange.high.value, 72)
+        self.assertEqual(inst.prediction[4].whenRange.low.code, "a")
+        self.assertEqual(inst.prediction[4].whenRange.low.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[4].whenRange.low.unit, "years")
+        self.assertEqual(inst.prediction[4].whenRange.low.value, 68)
+        self.assertEqual(inst.prediction[5].outcome.text, "Breast Cancer")
+        self.assertEqual(inst.prediction[5].probabilityDecimal, 0.001327)
+        self.assertEqual(inst.prediction[5].whenRange.high.code, "a")
+        self.assertEqual(inst.prediction[5].whenRange.high.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[5].whenRange.high.unit, "years")
+        self.assertEqual(inst.prediction[5].whenRange.high.value, 77)
+        self.assertEqual(inst.prediction[5].whenRange.low.code, "a")
+        self.assertEqual(inst.prediction[5].whenRange.low.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[5].whenRange.low.unit, "years")
+        self.assertEqual(inst.prediction[5].whenRange.low.value, 73)
+        self.assertEqual(inst.prediction[6].outcome.text, "Breast Cancer")
+        self.assertEqual(inst.prediction[6].probabilityDecimal, 0.00153)
+        self.assertEqual(inst.prediction[6].whenRange.high.code, "a")
+        self.assertEqual(inst.prediction[6].whenRange.high.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[6].whenRange.high.unit, "years")
+        self.assertEqual(inst.prediction[6].whenRange.high.value, 82)
+        self.assertEqual(inst.prediction[6].whenRange.low.code, "a")
+        self.assertEqual(inst.prediction[6].whenRange.low.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[6].whenRange.low.unit, "years")
+        self.assertEqual(inst.prediction[6].whenRange.low.value, 78)
+        self.assertEqual(inst.prediction[7].outcome.text, "Breast Cancer")
+        self.assertEqual(inst.prediction[7].probabilityDecimal, 0.001663)
+        self.assertEqual(inst.prediction[7].whenRange.high.code, "a")
+        self.assertEqual(inst.prediction[7].whenRange.high.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[7].whenRange.high.unit, "years")
+        self.assertEqual(inst.prediction[7].whenRange.high.value, 88)
+        self.assertEqual(inst.prediction[7].whenRange.low.code, "a")
+        self.assertEqual(inst.prediction[7].whenRange.low.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.prediction[7].whenRange.low.unit, "years")
+        self.assertEqual(inst.prediction[7].whenRange.low.value, 83)
+        self.assertEqual(inst.status, "final")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/sampleddata.py b/fhirclient/models/sampleddata.py
new file mode 100644
index 0000000..7805f5f
--- /dev/null
+++ b/fhirclient/models/sampleddata.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/SampledData) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class SampledData(element.Element):
+    """ A series of measurements taken by a device.
+    
+    A series of measurements taken by a device, with upper and lower limits.
+    There may be more than one dimension in the data.
+    """
+    
+    resource_type = "SampledData"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.data = None
+        """ Decimal values with spaces, or "E" | "U" | "L".
+        Type `str`. """
+        
+        self.dimensions = None
+        """ Number of sample points at each time point.
+        Type `int`. """
+        
+        self.factor = None
+        """ Multiply data by this before adding to origin.
+        Type `float`. """
+        
+        self.lowerLimit = None
+        """ Lower limit of detection.
+        Type `float`. """
+        
+        self.origin = None
+        """ Zero value and units.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.period = None
+        """ Number of milliseconds between samples.
+        Type `float`. """
+        
+        self.upperLimit = None
+        """ Upper limit of detection.
+        Type `float`. """
+        
+        super(SampledData, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SampledData, self).elementProperties()
+        js.extend([
+            ("data", "data", str, False, None, True),
+            ("dimensions", "dimensions", int, False, None, True),
+            ("factor", "factor", float, False, None, False),
+            ("lowerLimit", "lowerLimit", float, False, None, False),
+            ("origin", "origin", quantity.Quantity, False, None, True),
+            ("period", "period", float, False, None, True),
+            ("upperLimit", "upperLimit", float, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/schedule.py b/fhirclient/models/schedule.py
new file mode 100644
index 0000000..d9662b8
--- /dev/null
+++ b/fhirclient/models/schedule.py
@@ -0,0 +1,101 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Schedule) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Schedule(domainresource.DomainResource):
+    """ A container for slots of time that may be available for booking
+    appointments.
+    """
+    
+    resource_type = "Schedule"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.active = None
+        """ Whether this schedule is in active use.
+        Type `bool`. """
+        
+        self.actor = None
+        """ The resource this Schedule resource is providing availability
+        information for. These are expected to usually be one of
+        HealthcareService, Location, Practitioner, PractitionerRole,
+        Device, Patient or RelatedPerson.
+        List of `FHIRReference` items referencing `Patient, Practitioner, PractitionerRole, RelatedPerson, Device, HealthcareService, Location` (represented as `dict` in JSON). """
+        
+        self.comment = None
+        """ Comments on the availability to describe any extended information.
+        Such as custom constraints on the slots that may be associated.
+        Type `str`. """
+        
+        self.identifier = None
+        """ External Ids for this item.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.planningHorizon = None
+        """ The period of time that the slots that are attached to this
+        Schedule resource cover (even if none exist). These  cover the
+        amount of time that an organization's planning horizon; the
+        interval for which they are currently accepting appointments. This
+        does not define a "template" for planning outside these dates.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.serviceCategory = None
+        """ A broad categorisation of the service that is to be performed
+        during this appointment.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.serviceType = None
+        """ The specific service that is to be performed during this
+        appointment.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.specialty = None
+        """ The specialty of a practitioner that would be required to perform
+        the service requested in this appointment.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        super(Schedule, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Schedule, self).elementProperties()
+        js.extend([
+            ("active", "active", bool, False, None, False),
+            ("actor", "actor", fhirreference.FHIRReference, True, None, True),
+            ("comment", "comment", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("planningHorizon", "planningHorizon", period.Period, False, None, False),
+            ("serviceCategory", "serviceCategory", codeableconcept.CodeableConcept, False, None, False),
+            ("serviceType", "serviceType", codeableconcept.CodeableConcept, True, None, False),
+            ("specialty", "specialty", codeableconcept.CodeableConcept, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
diff --git a/fhirclient/models/schedule_tests.py b/fhirclient/models/schedule_tests.py
new file mode 100644
index 0000000..757ab41
--- /dev/null
+++ b/fhirclient/models/schedule_tests.py
@@ -0,0 +1,110 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import schedule
+from .fhirdate import FHIRDate
+
+
+class ScheduleTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Schedule", js["resourceType"])
+        return schedule.Schedule(js)
+    
+    def testSchedule1(self):
+        inst = self.instantiate_from("schedule-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Schedule instance")
+        self.implSchedule1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Schedule", js["resourceType"])
+        inst2 = schedule.Schedule(js)
+        self.implSchedule1(inst2)
+    
+    def implSchedule1(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.comment, "The slots attached to this schedule should be specialized to cover immunizations within the clinic")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/scheduleid")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "45")
+        self.assertEqual(inst.planningHorizon.end.date, FHIRDate("2013-12-25T09:30:00Z").date)
+        self.assertEqual(inst.planningHorizon.end.as_json(), "2013-12-25T09:30:00Z")
+        self.assertEqual(inst.planningHorizon.start.date, FHIRDate("2013-12-25T09:15:00Z").date)
+        self.assertEqual(inst.planningHorizon.start.as_json(), "2013-12-25T09:15:00Z")
+        self.assertEqual(inst.serviceCategory.coding[0].code, "17")
+        self.assertEqual(inst.serviceCategory.coding[0].display, "General Practice")
+        self.assertEqual(inst.serviceType[0].coding[0].code, "57")
+        self.assertEqual(inst.serviceType[0].coding[0].display, "Immunization")
+        self.assertEqual(inst.specialty[0].coding[0].code, "408480009")
+        self.assertEqual(inst.specialty[0].coding[0].display, "Clinical immunology")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSchedule2(self):
+        inst = self.instantiate_from("schedule-provider-location1-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Schedule instance")
+        self.implSchedule2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Schedule", js["resourceType"])
+        inst2 = schedule.Schedule(js)
+        self.implSchedule2(inst2)
+    
+    def implSchedule2(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.comment, "The slots attached to this schedule are for genetic counselling in the USS Enterprise-D Sickbay.")
+        self.assertEqual(inst.id, "exampleloc1")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/scheduleid")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "46")
+        self.assertEqual(inst.planningHorizon.end.date, FHIRDate("2017-12-25T09:30:00Z").date)
+        self.assertEqual(inst.planningHorizon.end.as_json(), "2017-12-25T09:30:00Z")
+        self.assertEqual(inst.planningHorizon.start.date, FHIRDate("2017-12-25T09:15:00Z").date)
+        self.assertEqual(inst.planningHorizon.start.as_json(), "2017-12-25T09:15:00Z")
+        self.assertEqual(inst.serviceCategory.coding[0].code, "17")
+        self.assertEqual(inst.serviceCategory.coding[0].display, "General Practice")
+        self.assertEqual(inst.serviceType[0].coding[0].code, "75")
+        self.assertEqual(inst.serviceType[0].coding[0].display, "Genetic Counselling")
+        self.assertEqual(inst.specialty[0].coding[0].code, "394580004")
+        self.assertEqual(inst.specialty[0].coding[0].display, "Clinical genetics")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSchedule3(self):
+        inst = self.instantiate_from("schedule-provider-location2-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Schedule instance")
+        self.implSchedule3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Schedule", js["resourceType"])
+        inst2 = schedule.Schedule(js)
+        self.implSchedule3(inst2)
+    
+    def implSchedule3(self, inst):
+        self.assertTrue(inst.active)
+        self.assertEqual(inst.comment, "The slots attached to this schedule are for neurosurgery operations at Starfleet HQ only.")
+        self.assertEqual(inst.id, "exampleloc2")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/scheduleid")
+        self.assertEqual(inst.identifier[0].use, "usual")
+        self.assertEqual(inst.identifier[0].value, "47")
+        self.assertEqual(inst.planningHorizon.end.date, FHIRDate("2017-12-25T09:30:00Z").date)
+        self.assertEqual(inst.planningHorizon.end.as_json(), "2017-12-25T09:30:00Z")
+        self.assertEqual(inst.planningHorizon.start.date, FHIRDate("2017-12-25T09:15:00Z").date)
+        self.assertEqual(inst.planningHorizon.start.as_json(), "2017-12-25T09:15:00Z")
+        self.assertEqual(inst.serviceCategory.coding[0].code, "31")
+        self.assertEqual(inst.serviceCategory.coding[0].display, "Specialist Surgical")
+        self.assertEqual(inst.serviceType[0].coding[0].code, "221")
+        self.assertEqual(inst.serviceType[0].coding[0].display, "Surgery - General")
+        self.assertEqual(inst.specialty[0].coding[0].code, "394610002")
+        self.assertEqual(inst.specialty[0].coding[0].display, "Surgery-Neurosurgery")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/searchparameter.py b/fhirclient/models/searchparameter.py
new file mode 100644
index 0000000..d90853b
--- /dev/null
+++ b/fhirclient/models/searchparameter.py
@@ -0,0 +1,215 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/SearchParameter) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class SearchParameter(domainresource.DomainResource):
+    """ Search Parameter for a resource.
+    
+    A search parameter that defines a named search item that can be used to
+    search/filter on a resource.
+    """
+    
+    resource_type = "SearchParameter"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.base = None
+        """ The resource type(s) this search parameter applies to.
+        List of `str` items. """
+        
+        self.chain = None
+        """ Chained names supported.
+        List of `str` items. """
+        
+        self.code = None
+        """ Code used in URL.
+        Type `str`. """
+        
+        self.comparator = None
+        """ eq | ne | gt | lt | ge | le | sa | eb | ap.
+        List of `str` items. """
+        
+        self.component = None
+        """ For Composite resources to define the parts.
+        List of `SearchParameterComponent` items (represented as `dict` in JSON). """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.derivedFrom = None
+        """ Original Definition for the search parameter.
+        Type `str`. """
+        
+        self.description = None
+        """ Natural language description of the search parameter.
+        Type `str`. """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.expression = None
+        """ FHIRPath expression that extracts the values.
+        Type `str`. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for search parameter (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.modifier = None
+        """ missing | exact | contains | not | text | in | not-in | below |
+        above | type.
+        List of `str` items. """
+        
+        self.name = None
+        """ Name for this search parameter (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this search parameter is defined.
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.target = None
+        """ Types of resource (if a resource reference).
+        List of `str` items. """
+        
+        self.type = None
+        """ number | date | string | token | reference | composite | quantity |
+        uri.
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this search parameter (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the search parameter.
+        Type `str`. """
+        
+        self.xpath = None
+        """ XPath that extracts the values.
+        Type `str`. """
+        
+        self.xpathUsage = None
+        """ normal | phonetic | nearby | distance | other.
+        Type `str`. """
+        
+        super(SearchParameter, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SearchParameter, self).elementProperties()
+        js.extend([
+            ("base", "base", str, True, None, True),
+            ("chain", "chain", str, True, None, False),
+            ("code", "code", str, False, None, True),
+            ("comparator", "comparator", str, True, None, False),
+            ("component", "component", SearchParameterComponent, True, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("derivedFrom", "derivedFrom", str, False, None, False),
+            ("description", "description", str, False, None, True),
+            ("experimental", "experimental", bool, False, None, False),
+            ("expression", "expression", str, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("modifier", "modifier", str, True, None, False),
+            ("name", "name", str, False, None, True),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("target", "target", str, True, None, False),
+            ("type", "type", str, False, None, True),
+            ("url", "url", str, False, None, True),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+            ("xpath", "xpath", str, False, None, False),
+            ("xpathUsage", "xpathUsage", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class SearchParameterComponent(backboneelement.BackboneElement):
+    """ For Composite resources to define the parts.
+    
+    Used to define the parts of a composite search parameter.
+    """
+    
+    resource_type = "SearchParameterComponent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.definition = None
+        """ Defines how the part works.
+        Type `FHIRReference` referencing `SearchParameter` (represented as `dict` in JSON). """
+        
+        self.expression = None
+        """ Subexpression relative to main expression.
+        Type `str`. """
+        
+        super(SearchParameterComponent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SearchParameterComponent, self).elementProperties()
+        js.extend([
+            ("definition", "definition", fhirreference.FHIRReference, False, None, True),
+            ("expression", "expression", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/searchparameter_tests.py b/fhirclient/models/searchparameter_tests.py
new file mode 100644
index 0000000..e8e2cfb
--- /dev/null
+++ b/fhirclient/models/searchparameter_tests.py
@@ -0,0 +1,129 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import searchparameter
+from .fhirdate import FHIRDate
+
+
+class SearchParameterTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("SearchParameter", js["resourceType"])
+        return searchparameter.SearchParameter(js)
+    
+    def testSearchParameter1(self):
+        inst = self.instantiate_from("searchparameter-example-extension.json")
+        self.assertIsNotNone(inst, "Must have instantiated a SearchParameter instance")
+        self.implSearchParameter1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("SearchParameter", js["resourceType"])
+        inst2 = searchparameter.SearchParameter(js)
+        self.implSearchParameter1(inst2)
+    
+    def implSearchParameter1(self, inst):
+        self.assertEqual(inst.base[0], "Patient")
+        self.assertEqual(inst.code, "part-agree")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.description, "Search by url for a participation agreement, which is stored in a DocumentReference")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.expression, "DocumentReference.extension('http://example.org/fhir/StructureDefinition/participation-agreement')")
+        self.assertEqual(inst.id, "example-extension")
+        self.assertEqual(inst.name, "Example Search Parameter on an extension")
+        self.assertEqual(inst.publisher, "Health Level Seven International (FHIR Infrastructure)")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.target[0], "DocumentReference")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "reference")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/SearchParameter/example-extension")
+        self.assertEqual(inst.xpath, "f:DocumentReference/f:extension[@url='http://example.org/fhir/StructureDefinition/participation-agreement']")
+        self.assertEqual(inst.xpathUsage, "normal")
+    
+    def testSearchParameter2(self):
+        inst = self.instantiate_from("searchparameter-example-reference.json")
+        self.assertIsNotNone(inst, "Must have instantiated a SearchParameter instance")
+        self.implSearchParameter2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("SearchParameter", js["resourceType"])
+        inst2 = searchparameter.SearchParameter(js)
+        self.implSearchParameter2(inst2)
+    
+    def implSearchParameter2(self, inst):
+        self.assertEqual(inst.base[0], "Condition")
+        self.assertEqual(inst.chain[0], "name")
+        self.assertEqual(inst.chain[1], "identifier")
+        self.assertEqual(inst.code, "subject")
+        self.assertEqual(inst.contact[0].name, "[string]")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.date.date, FHIRDate("2013-10-23").date)
+        self.assertEqual(inst.date.as_json(), "2013-10-23")
+        self.assertEqual(inst.description, "Search by condition subject")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.expression, "Condition.subject")
+        self.assertEqual(inst.id, "example-reference")
+        self.assertEqual(inst.modifier[0], "missing")
+        self.assertEqual(inst.name, "Example Search Parameter")
+        self.assertEqual(inst.publisher, "Health Level Seven International (FHIR Infrastructure)")
+        self.assertEqual(inst.purpose, "Need to search Condition by subject")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.target[0], "Organization")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "reference")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/SearchParameter/example")
+        self.assertEqual(inst.xpathUsage, "normal")
+    
+    def testSearchParameter3(self):
+        inst = self.instantiate_from("searchparameter-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a SearchParameter instance")
+        self.implSearchParameter3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("SearchParameter", js["resourceType"])
+        inst2 = searchparameter.SearchParameter(js)
+        self.implSearchParameter3(inst2)
+    
+    def implSearchParameter3(self, inst):
+        self.assertEqual(inst.base[0], "Resource")
+        self.assertEqual(inst.code, "_id")
+        self.assertEqual(inst.comparator[0], "eq")
+        self.assertEqual(inst.contact[0].name, "[string]")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.date.date, FHIRDate("2013-10-23").date)
+        self.assertEqual(inst.date.as_json(), "2013-10-23")
+        self.assertEqual(inst.derivedFrom, "http://hl7.org/fhir/SearchParameter/Resource-id")
+        self.assertEqual(inst.description, "Search by resource identifier - e.g. same as the read interaction, but can return included resources")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.expression, "id")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United States of America (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.name, "ID-SEARCH-PARAMETER")
+        self.assertEqual(inst.publisher, "Health Level Seven International (FHIR Infrastructure)")
+        self.assertEqual(inst.purpose, "Need to search by identifier for various infrastructural cases - mainly retrieving packages, and matching as part of a chain")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "token")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/SearchParameter/example")
+        self.assertEqual(inst.useContext[0].code.code, "focus")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "positive")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "http://hl7.org/fhir/variant-state")
+        self.assertEqual(inst.version, "1")
+        self.assertEqual(inst.xpath, "f:*/f:id")
+        self.assertEqual(inst.xpathUsage, "normal")
+
diff --git a/fhirclient/models/sequence.py b/fhirclient/models/sequence.py
new file mode 100644
index 0000000..5355604
--- /dev/null
+++ b/fhirclient/models/sequence.py
@@ -0,0 +1,414 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Sequence) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Sequence(domainresource.DomainResource):
+    """ Information about a biological sequence.
+    
+    Raw data describing a biological sequence.
+    """
+    
+    resource_type = "Sequence"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.coordinateSystem = None
+        """ Base number of coordinate system (0 for 0-based numbering or
+        coordinates, inclusive start, exclusive end, 1 for 1-based
+        numbering, inclusive start, inclusive end).
+        Type `int`. """
+        
+        self.device = None
+        """ The method for sequencing.
+        Type `FHIRReference` referencing `Device` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Unique ID for this particular sequence. This is a FHIR-defined id.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.observedSeq = None
+        """ Sequence that was observed.
+        Type `str`. """
+        
+        self.patient = None
+        """ Who and/or what this is about.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.performer = None
+        """ Who should be responsible for test result.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        self.pointer = None
+        """ Pointer to next atomic sequence.
+        List of `FHIRReference` items referencing `Sequence` (represented as `dict` in JSON). """
+        
+        self.quality = None
+        """ An set of value as quality of sequence.
+        List of `SequenceQuality` items (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ The number of copies of the seqeunce of interest.  (RNASeq).
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.readCoverage = None
+        """ Average number of reads representing a given nucleotide in the
+        reconstructed sequence.
+        Type `int`. """
+        
+        self.referenceSeq = None
+        """ A sequence used as reference.
+        Type `SequenceReferenceSeq` (represented as `dict` in JSON). """
+        
+        self.repository = None
+        """ External repository which contains detailed report related with
+        observedSeq in this resource.
+        List of `SequenceRepository` items (represented as `dict` in JSON). """
+        
+        self.specimen = None
+        """ Specimen used for sequencing.
+        Type `FHIRReference` referencing `Specimen` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ aa | dna | rna.
+        Type `str`. """
+        
+        self.variant = None
+        """ Variant in sequence.
+        List of `SequenceVariant` items (represented as `dict` in JSON). """
+        
+        super(Sequence, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Sequence, self).elementProperties()
+        js.extend([
+            ("coordinateSystem", "coordinateSystem", int, False, None, True),
+            ("device", "device", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("observedSeq", "observedSeq", str, False, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, False),
+            ("performer", "performer", fhirreference.FHIRReference, False, None, False),
+            ("pointer", "pointer", fhirreference.FHIRReference, True, None, False),
+            ("quality", "quality", SequenceQuality, True, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+            ("readCoverage", "readCoverage", int, False, None, False),
+            ("referenceSeq", "referenceSeq", SequenceReferenceSeq, False, None, False),
+            ("repository", "repository", SequenceRepository, True, None, False),
+            ("specimen", "specimen", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", str, False, None, False),
+            ("variant", "variant", SequenceVariant, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class SequenceQuality(backboneelement.BackboneElement):
+    """ An set of value as quality of sequence.
+    
+    An experimental feature attribute that defines the quality of the feature
+    in a quantitative way, such as a phred quality score ([SO:0001686](http://w
+    ww.sequenceontology.org/browser/current_svn/term/SO:0001686)).
+    """
+    
+    resource_type = "SequenceQuality"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.end = None
+        """ End position of the sequence.
+        Type `int`. """
+        
+        self.fScore = None
+        """ F-score.
+        Type `float`. """
+        
+        self.gtFP = None
+        """ False positives where the non-REF alleles in the Truth and Query
+        Call Sets match.
+        Type `float`. """
+        
+        self.method = None
+        """ Method to get quality.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.precision = None
+        """ Precision of comparison.
+        Type `float`. """
+        
+        self.queryFP = None
+        """ False positives.
+        Type `float`. """
+        
+        self.queryTP = None
+        """ True positives from the perspective of the query data.
+        Type `float`. """
+        
+        self.recall = None
+        """ Recall of comparison.
+        Type `float`. """
+        
+        self.score = None
+        """ Quality score for the comparison.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.standardSequence = None
+        """ Standard sequence for comparison.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.start = None
+        """ Start position of the sequence.
+        Type `int`. """
+        
+        self.truthFN = None
+        """ False negatives.
+        Type `float`. """
+        
+        self.truthTP = None
+        """ True positives from the perspective of the truth data.
+        Type `float`. """
+        
+        self.type = None
+        """ indel | snp | unknown.
+        Type `str`. """
+        
+        super(SequenceQuality, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SequenceQuality, self).elementProperties()
+        js.extend([
+            ("end", "end", int, False, None, False),
+            ("fScore", "fScore", float, False, None, False),
+            ("gtFP", "gtFP", float, False, None, False),
+            ("method", "method", codeableconcept.CodeableConcept, False, None, False),
+            ("precision", "precision", float, False, None, False),
+            ("queryFP", "queryFP", float, False, None, False),
+            ("queryTP", "queryTP", float, False, None, False),
+            ("recall", "recall", float, False, None, False),
+            ("score", "score", quantity.Quantity, False, None, False),
+            ("standardSequence", "standardSequence", codeableconcept.CodeableConcept, False, None, False),
+            ("start", "start", int, False, None, False),
+            ("truthFN", "truthFN", float, False, None, False),
+            ("truthTP", "truthTP", float, False, None, False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+class SequenceReferenceSeq(backboneelement.BackboneElement):
+    """ A sequence used as reference.
+    
+    A sequence that is used as a reference to describe variants that are
+    present in a sequence analyzed.
+    """
+    
+    resource_type = "SequenceReferenceSeq"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.chromosome = None
+        """ Chromosome containing genetic finding.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.genomeBuild = None
+        """ The Genome Build used for reference, following GRCh build versions
+        e.g. 'GRCh 37'.
+        Type `str`. """
+        
+        self.referenceSeqId = None
+        """ Reference identifier.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.referenceSeqPointer = None
+        """ A Pointer to another Sequence entity as reference sequence.
+        Type `FHIRReference` referencing `Sequence` (represented as `dict` in JSON). """
+        
+        self.referenceSeqString = None
+        """ A string to represent reference sequence.
+        Type `str`. """
+        
+        self.strand = None
+        """ Directionality of DNA ( +1/-1).
+        Type `int`. """
+        
+        self.windowEnd = None
+        """ End position of the window on the reference sequence.
+        Type `int`. """
+        
+        self.windowStart = None
+        """ Start position of the window on the  reference sequence.
+        Type `int`. """
+        
+        super(SequenceReferenceSeq, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SequenceReferenceSeq, self).elementProperties()
+        js.extend([
+            ("chromosome", "chromosome", codeableconcept.CodeableConcept, False, None, False),
+            ("genomeBuild", "genomeBuild", str, False, None, False),
+            ("referenceSeqId", "referenceSeqId", codeableconcept.CodeableConcept, False, None, False),
+            ("referenceSeqPointer", "referenceSeqPointer", fhirreference.FHIRReference, False, None, False),
+            ("referenceSeqString", "referenceSeqString", str, False, None, False),
+            ("strand", "strand", int, False, None, False),
+            ("windowEnd", "windowEnd", int, False, None, True),
+            ("windowStart", "windowStart", int, False, None, True),
+        ])
+        return js
+
+
+class SequenceRepository(backboneelement.BackboneElement):
+    """ External repository which contains detailed report related with observedSeq
+    in this resource.
+    
+    Configurations of the external repository. The repository shall store
+    target's observedSeq or records related with target's observedSeq.
+    """
+    
+    resource_type = "SequenceRepository"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.datasetId = None
+        """ Id of the dataset that used to call for dataset in repository.
+        Type `str`. """
+        
+        self.name = None
+        """ Repository's name.
+        Type `str`. """
+        
+        self.readsetId = None
+        """ Id of the read.
+        Type `str`. """
+        
+        self.type = None
+        """ directlink | openapi | login | oauth | other.
+        Type `str`. """
+        
+        self.url = None
+        """ URI of the repository.
+        Type `str`. """
+        
+        self.variantsetId = None
+        """ Id of the variantset that used to call for variantset in repository.
+        Type `str`. """
+        
+        super(SequenceRepository, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SequenceRepository, self).elementProperties()
+        js.extend([
+            ("datasetId", "datasetId", str, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("readsetId", "readsetId", str, False, None, False),
+            ("type", "type", str, False, None, True),
+            ("url", "url", str, False, None, False),
+            ("variantsetId", "variantsetId", str, False, None, False),
+        ])
+        return js
+
+
+class SequenceVariant(backboneelement.BackboneElement):
+    """ Variant in sequence.
+    
+    The definition of variant here originates from Sequence ontology ([variant_
+    of](http://www.sequenceontology.org/browser/current_svn/term/variant_of)).
+    This element can represent amino acid or nucleic sequence change(including
+    insertion,deletion,SNP,etc.)  It can represent some complex mutation or
+    segment variation with the assist of CIGAR string.
+    """
+    
+    resource_type = "SequenceVariant"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.cigar = None
+        """ Extended CIGAR string for aligning the sequence with reference
+        bases.
+        Type `str`. """
+        
+        self.end = None
+        """ End position of the variant on the reference sequence.
+        Type `int`. """
+        
+        self.observedAllele = None
+        """ Allele that was observed.
+        Type `str`. """
+        
+        self.referenceAllele = None
+        """ Allele in the reference sequence.
+        Type `str`. """
+        
+        self.start = None
+        """ Start position of the variant on the  reference sequence.
+        Type `int`. """
+        
+        self.variantPointer = None
+        """ Pointer to observed variant information.
+        Type `FHIRReference` referencing `Observation` (represented as `dict` in JSON). """
+        
+        super(SequenceVariant, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SequenceVariant, self).elementProperties()
+        js.extend([
+            ("cigar", "cigar", str, False, None, False),
+            ("end", "end", int, False, None, False),
+            ("observedAllele", "observedAllele", str, False, None, False),
+            ("referenceAllele", "referenceAllele", str, False, None, False),
+            ("start", "start", int, False, None, False),
+            ("variantPointer", "variantPointer", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/sequence_tests.py b/fhirclient/models/sequence_tests.py
new file mode 100644
index 0000000..c9da483
--- /dev/null
+++ b/fhirclient/models/sequence_tests.py
@@ -0,0 +1,368 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import sequence
+from .fhirdate import FHIRDate
+
+
+class SequenceTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Sequence", js["resourceType"])
+        return sequence.Sequence(js)
+    
+    def testSequence1(self):
+        inst = self.instantiate_from("coord-0base-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Sequence instance")
+        self.implSequence1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Sequence", js["resourceType"])
+        inst2 = sequence.Sequence(js)
+        self.implSequence1(inst2)
+    
+    def implSequence1(self, inst):
+        self.assertEqual(inst.coordinateSystem, 0)
+        self.assertEqual(inst.id, "coord-0-base")
+        self.assertEqual(inst.observedSeq, "ACATGGTAGC")
+        self.assertEqual(inst.referenceSeq.referenceSeqString, "ACGTAGTC")
+        self.assertEqual(inst.referenceSeq.strand, 1)
+        self.assertEqual(inst.referenceSeq.windowEnd, 8)
+        self.assertEqual(inst.referenceSeq.windowStart, 0)
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "dna")
+        self.assertEqual(inst.variant[0].cigar, "3I")
+        self.assertEqual(inst.variant[0].end, 2)
+        self.assertEqual(inst.variant[0].observedAllele, "ATG")
+        self.assertEqual(inst.variant[0].referenceAllele, "-")
+        self.assertEqual(inst.variant[0].start, 2)
+        self.assertEqual(inst.variant[1].cigar, "1M")
+        self.assertEqual(inst.variant[1].end, 5)
+        self.assertEqual(inst.variant[1].observedAllele, "T")
+        self.assertEqual(inst.variant[1].referenceAllele, "A")
+        self.assertEqual(inst.variant[1].start, 4)
+        self.assertEqual(inst.variant[2].cigar, "1D")
+        self.assertEqual(inst.variant[2].end, 7)
+        self.assertEqual(inst.variant[2].observedAllele, "-")
+        self.assertEqual(inst.variant[2].referenceAllele, "T")
+        self.assertEqual(inst.variant[2].start, 6)
+    
+    def testSequence2(self):
+        inst = self.instantiate_from("coord-1base-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Sequence instance")
+        self.implSequence2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Sequence", js["resourceType"])
+        inst2 = sequence.Sequence(js)
+        self.implSequence2(inst2)
+    
+    def implSequence2(self, inst):
+        self.assertEqual(inst.coordinateSystem, 1)
+        self.assertEqual(inst.id, "coord-1-base")
+        self.assertEqual(inst.observedSeq, "ACATGGTAGC")
+        self.assertEqual(inst.referenceSeq.referenceSeqString, "ACGTAGTC")
+        self.assertEqual(inst.referenceSeq.strand, 1)
+        self.assertEqual(inst.referenceSeq.windowEnd, 8)
+        self.assertEqual(inst.referenceSeq.windowStart, 1)
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "dna")
+        self.assertEqual(inst.variant[0].cigar, "3I")
+        self.assertEqual(inst.variant[0].end, 3)
+        self.assertEqual(inst.variant[0].observedAllele, "ATG")
+        self.assertEqual(inst.variant[0].referenceAllele, "-")
+        self.assertEqual(inst.variant[0].start, 2)
+        self.assertEqual(inst.variant[1].cigar, "3I")
+        self.assertEqual(inst.variant[1].end, 5)
+        self.assertEqual(inst.variant[1].observedAllele, "T")
+        self.assertEqual(inst.variant[1].referenceAllele, "A")
+        self.assertEqual(inst.variant[1].start, 5)
+        self.assertEqual(inst.variant[2].cigar, "1D")
+        self.assertEqual(inst.variant[2].end, 7)
+        self.assertEqual(inst.variant[2].observedAllele, "-")
+        self.assertEqual(inst.variant[2].referenceAllele, "T")
+        self.assertEqual(inst.variant[2].start, 7)
+    
+    def testSequence3(self):
+        inst = self.instantiate_from("sequence-example-fda-comparisons.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Sequence instance")
+        self.implSequence3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Sequence", js["resourceType"])
+        inst2 = sequence.Sequence(js)
+        self.implSequence3(inst2)
+    
+    def implSequence3(self, inst):
+        self.assertEqual(inst.coordinateSystem, 1)
+        self.assertEqual(inst.id, "fda-vcf-comparison")
+        self.assertEqual(inst.quality[0].end, 101770080)
+        self.assertEqual(inst.quality[0].fScore, 0.9823)
+        self.assertEqual(inst.quality[0].gtFP, 2186)
+        self.assertEqual(inst.quality[0].method.coding[0].code, "app-BqB9XZ8006ZZ2g5KzGXP3fpq")
+        self.assertEqual(inst.quality[0].method.coding[0].system, "https://precision.fda.gov/apps/")
+        self.assertEqual(inst.quality[0].method.text, "VCF Comparison")
+        self.assertEqual(inst.quality[0].precision, 0.9885)
+        self.assertEqual(inst.quality[0].queryFP, 1507)
+        self.assertEqual(inst.quality[0].score.value, 5.0)
+        self.assertEqual(inst.quality[0].standardSequence.coding[0].code, "file-BkZxBZ00bpJVk2q6x43b1YBx")
+        self.assertEqual(inst.quality[0].standardSequence.coding[0].system, "https://precision.fda.gov/files/")
+        self.assertEqual(inst.quality[0].start, 10453)
+        self.assertEqual(inst.quality[0].truthFN, 3168)
+        self.assertEqual(inst.quality[0].truthTP, 129481)
+        self.assertEqual(inst.quality[0].type, "unknown")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].code, "NC_000001.11")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].system, "http://www.ncbi.nlm.nih.gov/nuccore")
+        self.assertEqual(inst.referenceSeq.strand, 1)
+        self.assertEqual(inst.referenceSeq.windowEnd, 101770080)
+        self.assertEqual(inst.referenceSeq.windowStart, 10453)
+        self.assertEqual(inst.repository[0].name, "FDA")
+        self.assertEqual(inst.repository[0].type, "login")
+        self.assertEqual(inst.repository[0].url, "https://precision.fda.gov/comparisons/1850")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.variant[0].end, 13117)
+        self.assertEqual(inst.variant[0].observedAllele, "T")
+        self.assertEqual(inst.variant[0].referenceAllele, "G")
+        self.assertEqual(inst.variant[0].start, 13116)
+    
+    def testSequence4(self):
+        inst = self.instantiate_from("sequence-example-fda-vcfeval.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Sequence instance")
+        self.implSequence4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Sequence", js["resourceType"])
+        inst2 = sequence.Sequence(js)
+        self.implSequence4(inst2)
+    
+    def implSequence4(self, inst):
+        self.assertEqual(inst.coordinateSystem, 1)
+        self.assertEqual(inst.id, "fda-vcfeval-comparison")
+        self.assertEqual(inst.quality[0].end, 101770080)
+        self.assertEqual(inst.quality[0].gtFP, 2186)
+        self.assertEqual(inst.quality[0].method.coding[0].code, "app-BxfGF8j02pBZzZxbzZxP725P")
+        self.assertEqual(inst.quality[0].method.coding[0].system, "https://precision.fda.gov/apps/")
+        self.assertEqual(inst.quality[0].method.text, "Vcfeval + Hap.py Comparison")
+        self.assertEqual(inst.quality[0].precision, 0.428005)
+        self.assertEqual(inst.quality[0].queryFP, 10670)
+        self.assertEqual(inst.quality[0].recall, 0.752111)
+        self.assertEqual(inst.quality[0].standardSequence.coding[0].code, "file-BkZxBZ00bpJVk2q6x43b1YBx")
+        self.assertEqual(inst.quality[0].standardSequence.coding[0].system, "https://precision.fda.gov/files/")
+        self.assertEqual(inst.quality[0].start, 10453)
+        self.assertEqual(inst.quality[0].truthFN, 2554)
+        self.assertEqual(inst.quality[0].truthTP, 7749)
+        self.assertEqual(inst.quality[0].type, "indel")
+        self.assertEqual(inst.quality[1].end, 101770080)
+        self.assertEqual(inst.quality[1].gtFP, 493)
+        self.assertEqual(inst.quality[1].method.coding[0].code, "app-BxfGF8j02pBZzZxbzZxP725P")
+        self.assertEqual(inst.quality[1].method.coding[0].system, "https://precision.fda.gov/apps/")
+        self.assertEqual(inst.quality[1].method.text, "Vcfeval + Hap.py Comparison")
+        self.assertEqual(inst.quality[1].precision, 0.808602)
+        self.assertEqual(inst.quality[1].queryFP, 21744)
+        self.assertEqual(inst.quality[1].recall, 0.986642)
+        self.assertEqual(inst.quality[1].standardSequence.coding[0].code, "file-BkZxBZ00bpJVk2q6x43b1YBx")
+        self.assertEqual(inst.quality[1].standardSequence.coding[0].system, "https://precision.fda.gov/files/")
+        self.assertEqual(inst.quality[1].start, 10453)
+        self.assertEqual(inst.quality[1].truthFN, 1247)
+        self.assertEqual(inst.quality[1].truthTP, 92106)
+        self.assertEqual(inst.quality[1].type, "snp")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].code, "NC_000001.11")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].system, "http://www.ncbi.nlm.nih.gov/nuccore")
+        self.assertEqual(inst.referenceSeq.strand, 1)
+        self.assertEqual(inst.referenceSeq.windowEnd, 101770080)
+        self.assertEqual(inst.referenceSeq.windowStart, 10453)
+        self.assertEqual(inst.repository[0].name, "FDA")
+        self.assertEqual(inst.repository[0].type, "login")
+        self.assertEqual(inst.repository[0].url, "https://precision.fda.gov/jobs/job-ByxYPx809jFVy21KJG74Jg3Y")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.variant[0].end, 13117)
+        self.assertEqual(inst.variant[0].observedAllele, "T")
+        self.assertEqual(inst.variant[0].referenceAllele, "G")
+        self.assertEqual(inst.variant[0].start, 13116)
+    
+    def testSequence5(self):
+        inst = self.instantiate_from("sequence-example-fda.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Sequence instance")
+        self.implSequence5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Sequence", js["resourceType"])
+        inst2 = sequence.Sequence(js)
+        self.implSequence5(inst2)
+    
+    def implSequence5(self, inst):
+        self.assertEqual(inst.coordinateSystem, 1)
+        self.assertEqual(inst.id, "fda-example")
+        self.assertEqual(inst.quality[0].end, 101770080)
+        self.assertEqual(inst.quality[0].fScore, 0.545551)
+        self.assertEqual(inst.quality[0].gtFP, 2186)
+        self.assertEqual(inst.quality[0].method.coding[0].code, "job-ByxYPx809jFVy21KJG74Jg3Y")
+        self.assertEqual(inst.quality[0].method.coding[0].system, "https://precision.fda.gov/jobs/")
+        self.assertEqual(inst.quality[0].method.text, "Vcfeval + Hap.py Comparison")
+        self.assertEqual(inst.quality[0].precision, 0.428005)
+        self.assertEqual(inst.quality[0].queryFP, 10670)
+        self.assertEqual(inst.quality[0].queryTP, 7984)
+        self.assertEqual(inst.quality[0].recall, 0.752111)
+        self.assertEqual(inst.quality[0].standardSequence.coding[0].code, "file-Bk50V4Q0qVb65P0v2VPbfYPZ")
+        self.assertEqual(inst.quality[0].standardSequence.coding[0].system, "https://precision.fda.gov/files/")
+        self.assertEqual(inst.quality[0].start, 10453)
+        self.assertEqual(inst.quality[0].truthFN, 2554)
+        self.assertEqual(inst.quality[0].truthTP, 7749)
+        self.assertEqual(inst.quality[0].type, "snp")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].code, "NC_000001.11")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].system, "http://www.ncbi.nlm.nih.gov/nuccore")
+        self.assertEqual(inst.referenceSeq.strand, 1)
+        self.assertEqual(inst.referenceSeq.windowEnd, 101770080)
+        self.assertEqual(inst.referenceSeq.windowStart, 10453)
+        self.assertEqual(inst.repository[0].name, "FDA")
+        self.assertEqual(inst.repository[0].type, "login")
+        self.assertEqual(inst.repository[0].url, "https://precision.fda.gov/files/file-Bx37ZK009P4bX5g3qjkFZV38")
+        self.assertEqual(inst.repository[0].variantsetId, "file-Bx37ZK009P4bX5g3qjkFZV38")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "dna")
+        self.assertEqual(inst.variant[0].end, 13117)
+        self.assertEqual(inst.variant[0].observedAllele, "T")
+        self.assertEqual(inst.variant[0].referenceAllele, "G")
+        self.assertEqual(inst.variant[0].start, 13116)
+    
+    def testSequence6(self):
+        inst = self.instantiate_from("sequence-example-pgx-1.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Sequence instance")
+        self.implSequence6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Sequence", js["resourceType"])
+        inst2 = sequence.Sequence(js)
+        self.implSequence6(inst2)
+    
+    def implSequence6(self, inst):
+        self.assertEqual(inst.coordinateSystem, 0)
+        self.assertEqual(inst.id, "example-pgx-1")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].code, "NG_007726.3")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].system, "http://www.ncbi.nlm.nih.gov/nuccore")
+        self.assertEqual(inst.referenceSeq.strand, 1)
+        self.assertEqual(inst.referenceSeq.windowEnd, 55227980)
+        self.assertEqual(inst.referenceSeq.windowStart, 55227970)
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "dna")
+        self.assertEqual(inst.variant[0].end, 55227977)
+        self.assertEqual(inst.variant[0].observedAllele, "G")
+        self.assertEqual(inst.variant[0].referenceAllele, "T")
+        self.assertEqual(inst.variant[0].start, 55227976)
+    
+    def testSequence7(self):
+        inst = self.instantiate_from("sequence-example-pgx-2.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Sequence instance")
+        self.implSequence7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Sequence", js["resourceType"])
+        inst2 = sequence.Sequence(js)
+        self.implSequence7(inst2)
+    
+    def implSequence7(self, inst):
+        self.assertEqual(inst.coordinateSystem, 0)
+        self.assertEqual(inst.id, "example-pgx-2")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].code, "NG_007726.3")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].system, "http://www.ncbi.nlm.nih.gov/nuccore")
+        self.assertEqual(inst.referenceSeq.strand, 1)
+        self.assertEqual(inst.referenceSeq.windowEnd, 55227980)
+        self.assertEqual(inst.referenceSeq.windowStart, 55227970)
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "dna")
+        self.assertEqual(inst.variant[0].end, 55227979)
+        self.assertEqual(inst.variant[0].observedAllele, "G")
+        self.assertEqual(inst.variant[0].referenceAllele, "T")
+        self.assertEqual(inst.variant[0].start, 55227978)
+    
+    def testSequence8(self):
+        inst = self.instantiate_from("sequence-example-TPMT-one.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Sequence instance")
+        self.implSequence8(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Sequence", js["resourceType"])
+        inst2 = sequence.Sequence(js)
+        self.implSequence8(inst2)
+    
+    def implSequence8(self, inst):
+        self.assertEqual(inst.coordinateSystem, 1)
+        self.assertEqual(inst.id, "example-TPMT-one")
+        self.assertEqual(inst.observedSeq, "T-C-C-C-A-C-C-C")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].code, "NT_007592.15")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].system, "http://www.ncbi.nlm.nih.gov/nuccore")
+        self.assertEqual(inst.referenceSeq.strand, 1)
+        self.assertEqual(inst.referenceSeq.windowEnd, 18143955)
+        self.assertEqual(inst.referenceSeq.windowStart, 18130918)
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "dna")
+        self.assertEqual(inst.variant[0].end, 18139214)
+        self.assertEqual(inst.variant[0].observedAllele, "A")
+        self.assertEqual(inst.variant[0].referenceAllele, "G")
+        self.assertEqual(inst.variant[0].start, 18139214)
+    
+    def testSequence9(self):
+        inst = self.instantiate_from("sequence-example-TPMT-two.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Sequence instance")
+        self.implSequence9(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Sequence", js["resourceType"])
+        inst2 = sequence.Sequence(js)
+        self.implSequence9(inst2)
+    
+    def implSequence9(self, inst):
+        self.assertEqual(inst.coordinateSystem, 1)
+        self.assertEqual(inst.id, "example-TPMT-two")
+        self.assertEqual(inst.observedSeq, "T-C-T-C-G-C-C-C")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].code, "NT_007592.15")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].system, "http://www.ncbi.nlm.nih.gov/nuccore")
+        self.assertEqual(inst.referenceSeq.strand, 1)
+        self.assertEqual(inst.referenceSeq.windowEnd, 18143955)
+        self.assertEqual(inst.referenceSeq.windowStart, 18130918)
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "dna")
+        self.assertEqual(inst.variant[0].end, 18131012)
+        self.assertEqual(inst.variant[0].observedAllele, "T")
+        self.assertEqual(inst.variant[0].referenceAllele, "C")
+        self.assertEqual(inst.variant[0].start, 18131012)
+    
+    def testSequence10(self):
+        inst = self.instantiate_from("sequence-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Sequence instance")
+        self.implSequence10(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Sequence", js["resourceType"])
+        inst2 = sequence.Sequence(js)
+        self.implSequence10(inst2)
+    
+    def implSequence10(self, inst):
+        self.assertEqual(inst.coordinateSystem, 0)
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].code, "NC_000009.11")
+        self.assertEqual(inst.referenceSeq.referenceSeqId.coding[0].system, "http://www.ncbi.nlm.nih.gov/nuccore")
+        self.assertEqual(inst.referenceSeq.strand, 1)
+        self.assertEqual(inst.referenceSeq.windowEnd, 22125510)
+        self.assertEqual(inst.referenceSeq.windowStart, 22125500)
+        self.assertEqual(inst.repository[0].name, "GA4GH API")
+        self.assertEqual(inst.repository[0].type, "openapi")
+        self.assertEqual(inst.repository[0].url, "http://grch37.rest.ensembl.org/ga4gh/variants/3:rs1333049?content-type=application/json")
+        self.assertEqual(inst.repository[0].variantsetId, "3:rs1333049")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type, "dna")
+        self.assertEqual(inst.variant[0].end, 22125504)
+        self.assertEqual(inst.variant[0].observedAllele, "C")
+        self.assertEqual(inst.variant[0].referenceAllele, "G")
+        self.assertEqual(inst.variant[0].start, 22125503)
+
diff --git a/fhirclient/models/servicedefinition.py b/fhirclient/models/servicedefinition.py
new file mode 100644
index 0000000..d20107c
--- /dev/null
+++ b/fhirclient/models/servicedefinition.py
@@ -0,0 +1,206 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ServiceDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ServiceDefinition(domainresource.DomainResource):
+    """ A description of decision support service functionality.
+    
+    The ServiceDefinition describes a unit of decision support functionality
+    that is made available as a service, such as immunization modules or drug-
+    drug interaction checking.
+    """
+    
+    resource_type = "ServiceDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.approvalDate = None
+        """ When the service definition was approved by publisher.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.contributor = None
+        """ A content contributor.
+        List of `Contributor` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.dataRequirement = None
+        """ What data is used by the module.
+        List of `DataRequirement` items (represented as `dict` in JSON). """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the service definition.
+        Type `str`. """
+        
+        self.effectivePeriod = None
+        """ When the service definition is expected to be used.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.identifier = None
+        """ Additional identifier for the service definition.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for service definition (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.lastReviewDate = None
+        """ When the service definition was last reviewed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.name = None
+        """ Name for this service definition (computer friendly).
+        Type `str`. """
+        
+        self.operationDefinition = None
+        """ Operation to invoke.
+        Type `FHIRReference` referencing `OperationDefinition` (represented as `dict` in JSON). """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this service definition is defined.
+        Type `str`. """
+        
+        self.relatedArtifact = None
+        """ Additional documentation, citations, etc.
+        List of `RelatedArtifact` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this service definition (human friendly).
+        Type `str`. """
+        
+        self.topic = None
+        """ E.g. Education, Treatment, Assessment, etc.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.trigger = None
+        """ "when" the module should be invoked.
+        List of `TriggerDefinition` items (represented as `dict` in JSON). """
+        
+        self.url = None
+        """ Logical URI to reference this service definition (globally unique).
+        Type `str`. """
+        
+        self.usage = None
+        """ Describes the clinical usage of the module.
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the service definition.
+        Type `str`. """
+        
+        super(ServiceDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ServiceDefinition, self).elementProperties()
+        js.extend([
+            ("approvalDate", "approvalDate", fhirdate.FHIRDate, False, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("contributor", "contributor", contributor.Contributor, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("dataRequirement", "dataRequirement", datarequirement.DataRequirement, True, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("effectivePeriod", "effectivePeriod", period.Period, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("lastReviewDate", "lastReviewDate", fhirdate.FHIRDate, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("operationDefinition", "operationDefinition", fhirreference.FHIRReference, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("relatedArtifact", "relatedArtifact", relatedartifact.RelatedArtifact, True, None, False),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("topic", "topic", codeableconcept.CodeableConcept, True, None, False),
+            ("trigger", "trigger", triggerdefinition.TriggerDefinition, True, None, False),
+            ("url", "url", str, False, None, False),
+            ("usage", "usage", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import contributor
+except ImportError:
+    contributor = sys.modules[__package__ + '.contributor']
+try:
+    from . import datarequirement
+except ImportError:
+    datarequirement = sys.modules[__package__ + '.datarequirement']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import relatedartifact
+except ImportError:
+    relatedartifact = sys.modules[__package__ + '.relatedartifact']
+try:
+    from . import triggerdefinition
+except ImportError:
+    triggerdefinition = sys.modules[__package__ + '.triggerdefinition']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/servicedefinition_tests.py b/fhirclient/models/servicedefinition_tests.py
new file mode 100644
index 0000000..f729a0a
--- /dev/null
+++ b/fhirclient/models/servicedefinition_tests.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import servicedefinition
+from .fhirdate import FHIRDate
+
+
+class ServiceDefinitionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ServiceDefinition", js["resourceType"])
+        return servicedefinition.ServiceDefinition(js)
+    
+    def testServiceDefinition1(self):
+        inst = self.instantiate_from("servicedefinition-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ServiceDefinition instance")
+        self.implServiceDefinition1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ServiceDefinition", js["resourceType"])
+        inst2 = servicedefinition.ServiceDefinition(js)
+        self.implServiceDefinition1(inst2)
+    
+    def implServiceDefinition1(self, inst):
+        self.assertEqual(inst.date.date, FHIRDate("2015-07-22").date)
+        self.assertEqual(inst.date.as_json(), "2015-07-22")
+        self.assertEqual(inst.description, "Guideline appropriate ordering is used to assess appropriateness of an order given a patient, a proposed order, and a set of clinical indications.")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "guildeline-appropriate-ordering")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Guideline Appropriate Ordering Module")
+        self.assertEqual(inst.topic[0].text, "Guideline Appropriate Ordering")
+        self.assertEqual(inst.topic[1].text, "Appropriate Use Criteria")
+        self.assertEqual(inst.version, "1.0.0")
+
diff --git a/fhirclient/models/signature.py b/fhirclient/models/signature.py
new file mode 100644
index 0000000..0054a5a
--- /dev/null
+++ b/fhirclient/models/signature.py
@@ -0,0 +1,90 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Signature) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Signature(element.Element):
+    """ A digital Signature - XML DigSig, JWT, Graphical image of signature, etc..
+    
+    A digital signature along with supporting context. The signature may be
+    electronic/cryptographic in nature, or a graphical image representing a
+    hand-written signature, or a signature process. Different signature
+    approaches have different utilities.
+    """
+    
+    resource_type = "Signature"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.blob = None
+        """ The actual signature content (XML DigSig. JWT, picture, etc.).
+        Type `str`. """
+        
+        self.contentType = None
+        """ The technical format of the signature.
+        Type `str`. """
+        
+        self.onBehalfOfReference = None
+        """ The party represented.
+        Type `FHIRReference` referencing `Practitioner, RelatedPerson, Patient, Device, Organization` (represented as `dict` in JSON). """
+        
+        self.onBehalfOfUri = None
+        """ The party represented.
+        Type `str`. """
+        
+        self.type = None
+        """ Indication of the reason the entity signed the object(s).
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.when = None
+        """ When the signature was created.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.whoReference = None
+        """ Who signed.
+        Type `FHIRReference` referencing `Practitioner, RelatedPerson, Patient, Device, Organization` (represented as `dict` in JSON). """
+        
+        self.whoUri = None
+        """ Who signed.
+        Type `str`. """
+        
+        super(Signature, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Signature, self).elementProperties()
+        js.extend([
+            ("blob", "blob", str, False, None, False),
+            ("contentType", "contentType", str, False, None, False),
+            ("onBehalfOfReference", "onBehalfOfReference", fhirreference.FHIRReference, False, "onBehalfOf", False),
+            ("onBehalfOfUri", "onBehalfOfUri", str, False, "onBehalfOf", False),
+            ("type", "type", coding.Coding, True, None, True),
+            ("when", "when", fhirdate.FHIRDate, False, None, True),
+            ("whoReference", "whoReference", fhirreference.FHIRReference, False, "who", True),
+            ("whoUri", "whoUri", str, False, "who", True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
diff --git a/fhirclient/models/slot.py b/fhirclient/models/slot.py
new file mode 100644
index 0000000..8226384
--- /dev/null
+++ b/fhirclient/models/slot.py
@@ -0,0 +1,113 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Slot) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Slot(domainresource.DomainResource):
+    """ A slot of time on a schedule that may be available for booking appointments.
+    """
+    
+    resource_type = "Slot"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.appointmentType = None
+        """ The style of appointment or patient that may be booked in the slot
+        (not service type).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.comment = None
+        """ Comments on the slot to describe any extended information. Such as
+        custom constraints on the slot.
+        Type `str`. """
+        
+        self.end = None
+        """ Date/Time that the slot is to conclude.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.identifier = None
+        """ External Ids for this item.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.overbooked = None
+        """ This slot has already been overbooked, appointments are unlikely to
+        be accepted for this time.
+        Type `bool`. """
+        
+        self.schedule = None
+        """ The schedule resource that this slot defines an interval of status
+        information.
+        Type `FHIRReference` referencing `Schedule` (represented as `dict` in JSON). """
+        
+        self.serviceCategory = None
+        """ A broad categorisation of the service that is to be performed
+        during this appointment.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.serviceType = None
+        """ The type of appointments that can be booked into this slot (ideally
+        this would be an identifiable service - which is at a location,
+        rather than the location itself). If provided then this overrides
+        the value provided on the availability resource.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.specialty = None
+        """ The specialty of a practitioner that would be required to perform
+        the service requested in this appointment.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.start = None
+        """ Date/Time that the slot is to begin.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.status = None
+        """ busy | free | busy-unavailable | busy-tentative | entered-in-error.
+        Type `str`. """
+        
+        super(Slot, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Slot, self).elementProperties()
+        js.extend([
+            ("appointmentType", "appointmentType", codeableconcept.CodeableConcept, False, None, False),
+            ("comment", "comment", str, False, None, False),
+            ("end", "end", fhirdate.FHIRDate, False, None, True),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("overbooked", "overbooked", bool, False, None, False),
+            ("schedule", "schedule", fhirreference.FHIRReference, False, None, True),
+            ("serviceCategory", "serviceCategory", codeableconcept.CodeableConcept, False, None, False),
+            ("serviceType", "serviceType", codeableconcept.CodeableConcept, True, None, False),
+            ("specialty", "specialty", codeableconcept.CodeableConcept, True, None, False),
+            ("start", "start", fhirdate.FHIRDate, False, None, True),
+            ("status", "status", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/slot_tests.py b/fhirclient/models/slot_tests.py
new file mode 100644
index 0000000..ab3f877
--- /dev/null
+++ b/fhirclient/models/slot_tests.py
@@ -0,0 +1,121 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import slot
+from .fhirdate import FHIRDate
+
+
+class SlotTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Slot", js["resourceType"])
+        return slot.Slot(js)
+    
+    def testSlot1(self):
+        inst = self.instantiate_from("slot-example-busy.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Slot instance")
+        self.implSlot1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Slot", js["resourceType"])
+        inst2 = slot.Slot(js)
+        self.implSlot1(inst2)
+    
+    def implSlot1(self, inst):
+        self.assertEqual(inst.comment, "Assessments should be performed before requesting appointments in this slot.")
+        self.assertEqual(inst.end.date, FHIRDate("2013-12-25T09:15:00Z").date)
+        self.assertEqual(inst.end.as_json(), "2013-12-25T09:15:00Z")
+        self.assertEqual(inst.id, "1")
+        self.assertEqual(inst.identifier[0].system, "http://example.org/identifiers/slots")
+        self.assertEqual(inst.identifier[0].value, "123132")
+        self.assertTrue(inst.overbooked)
+        self.assertEqual(inst.serviceCategory.coding[0].code, "17")
+        self.assertEqual(inst.serviceCategory.coding[0].display, "General Practice")
+        self.assertEqual(inst.start.date, FHIRDate("2013-12-25T09:00:00Z").date)
+        self.assertEqual(inst.start.as_json(), "2013-12-25T09:00:00Z")
+        self.assertEqual(inst.status, "busy")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSlot2(self):
+        inst = self.instantiate_from("slot-example-tentative.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Slot instance")
+        self.implSlot2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Slot", js["resourceType"])
+        inst2 = slot.Slot(js)
+        self.implSlot2(inst2)
+    
+    def implSlot2(self, inst):
+        self.assertEqual(inst.comment, "Dr Careful is out of the office")
+        self.assertEqual(inst.end.date, FHIRDate("2013-12-25T10:00:00Z").date)
+        self.assertEqual(inst.end.as_json(), "2013-12-25T10:00:00Z")
+        self.assertEqual(inst.id, "2")
+        self.assertEqual(inst.serviceCategory.coding[0].code, "17")
+        self.assertEqual(inst.serviceCategory.coding[0].display, "General Practice")
+        self.assertEqual(inst.start.date, FHIRDate("2013-12-25T09:45:00Z").date)
+        self.assertEqual(inst.start.as_json(), "2013-12-25T09:45:00Z")
+        self.assertEqual(inst.status, "busy-tentative")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSlot3(self):
+        inst = self.instantiate_from("slot-example-unavailable.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Slot instance")
+        self.implSlot3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Slot", js["resourceType"])
+        inst2 = slot.Slot(js)
+        self.implSlot3(inst2)
+    
+    def implSlot3(self, inst):
+        self.assertEqual(inst.comment, "Dr Careful is out of the office")
+        self.assertEqual(inst.end.date, FHIRDate("2013-12-25T09:45:00Z").date)
+        self.assertEqual(inst.end.as_json(), "2013-12-25T09:45:00Z")
+        self.assertEqual(inst.id, "3")
+        self.assertEqual(inst.serviceCategory.coding[0].code, "17")
+        self.assertEqual(inst.serviceCategory.coding[0].display, "General Practice")
+        self.assertEqual(inst.start.date, FHIRDate("2013-12-25T09:30:00Z").date)
+        self.assertEqual(inst.start.as_json(), "2013-12-25T09:30:00Z")
+        self.assertEqual(inst.status, "busy-unavailable")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSlot4(self):
+        inst = self.instantiate_from("slot-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Slot instance")
+        self.implSlot4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Slot", js["resourceType"])
+        inst2 = slot.Slot(js)
+        self.implSlot4(inst2)
+    
+    def implSlot4(self, inst):
+        self.assertEqual(inst.appointmentType.coding[0].code, "WALKIN")
+        self.assertEqual(inst.appointmentType.coding[0].display, "A previously unscheduled walk-in visit")
+        self.assertEqual(inst.appointmentType.coding[0].system, "http://hl7.org/fhir/v2/0276")
+        self.assertEqual(inst.comment, "Assessments should be performed before requesting appointments in this slot.")
+        self.assertEqual(inst.end.date, FHIRDate("2013-12-25T09:30:00Z").date)
+        self.assertEqual(inst.end.as_json(), "2013-12-25T09:30:00Z")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.serviceCategory.coding[0].code, "17")
+        self.assertEqual(inst.serviceCategory.coding[0].display, "General Practice")
+        self.assertEqual(inst.serviceType[0].coding[0].code, "57")
+        self.assertEqual(inst.serviceType[0].coding[0].display, "Immunization")
+        self.assertEqual(inst.specialty[0].coding[0].code, "408480009")
+        self.assertEqual(inst.specialty[0].coding[0].display, "Clinical immunology")
+        self.assertEqual(inst.start.date, FHIRDate("2013-12-25T09:15:00Z").date)
+        self.assertEqual(inst.start.as_json(), "2013-12-25T09:15:00Z")
+        self.assertEqual(inst.status, "free")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/specimen.py b/fhirclient/models/specimen.py
new file mode 100644
index 0000000..35d73ff
--- /dev/null
+++ b/fhirclient/models/specimen.py
@@ -0,0 +1,292 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Specimen) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Specimen(domainresource.DomainResource):
+    """ Sample for analysis.
+    
+    A sample to be used for analysis.
+    """
+    
+    resource_type = "Specimen"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.accessionIdentifier = None
+        """ Identifier assigned by the lab.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.collection = None
+        """ Collection details.
+        Type `SpecimenCollection` (represented as `dict` in JSON). """
+        
+        self.container = None
+        """ Direct container of specimen (tube/slide, etc.).
+        List of `SpecimenContainer` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.note = None
+        """ Comments.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.parent = None
+        """ Specimen from which this specimen originated.
+        List of `FHIRReference` items referencing `Specimen` (represented as `dict` in JSON). """
+        
+        self.processing = None
+        """ Processing and processing step details.
+        List of `SpecimenProcessing` items (represented as `dict` in JSON). """
+        
+        self.receivedTime = None
+        """ The time when specimen was received for processing.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.request = None
+        """ Why the specimen was collected.
+        List of `FHIRReference` items referencing `ProcedureRequest` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ available | unavailable | unsatisfactory | entered-in-error.
+        Type `str`. """
+        
+        self.subject = None
+        """ Where the specimen came from. This may be from the patient(s) or
+        from the environment or a device.
+        Type `FHIRReference` referencing `Patient, Group, Device, Substance` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Kind of material that forms the specimen.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(Specimen, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Specimen, self).elementProperties()
+        js.extend([
+            ("accessionIdentifier", "accessionIdentifier", identifier.Identifier, False, None, False),
+            ("collection", "collection", SpecimenCollection, False, None, False),
+            ("container", "container", SpecimenContainer, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("parent", "parent", fhirreference.FHIRReference, True, None, False),
+            ("processing", "processing", SpecimenProcessing, True, None, False),
+            ("receivedTime", "receivedTime", fhirdate.FHIRDate, False, None, False),
+            ("request", "request", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, False),
+            ("subject", "subject", fhirreference.FHIRReference, False, None, True),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class SpecimenCollection(backboneelement.BackboneElement):
+    """ Collection details.
+    
+    Details concerning the specimen collection.
+    """
+    
+    resource_type = "SpecimenCollection"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.bodySite = None
+        """ Anatomical collection site.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.collectedDateTime = None
+        """ Collection time.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.collectedPeriod = None
+        """ Collection time.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.collector = None
+        """ Who collected the specimen.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.method = None
+        """ Technique used to perform collection.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ The quantity of specimen collected.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        super(SpecimenCollection, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SpecimenCollection, self).elementProperties()
+        js.extend([
+            ("bodySite", "bodySite", codeableconcept.CodeableConcept, False, None, False),
+            ("collectedDateTime", "collectedDateTime", fhirdate.FHIRDate, False, "collected", False),
+            ("collectedPeriod", "collectedPeriod", period.Period, False, "collected", False),
+            ("collector", "collector", fhirreference.FHIRReference, False, None, False),
+            ("method", "method", codeableconcept.CodeableConcept, False, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+        ])
+        return js
+
+
+class SpecimenContainer(backboneelement.BackboneElement):
+    """ Direct container of specimen (tube/slide, etc.).
+    
+    The container holding the specimen.  The recursive nature of containers;
+    i.e. blood in tube in tray in rack is not addressed here.
+    """
+    
+    resource_type = "SpecimenContainer"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.additiveCodeableConcept = None
+        """ Additive associated with container.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.additiveReference = None
+        """ Additive associated with container.
+        Type `FHIRReference` referencing `Substance` (represented as `dict` in JSON). """
+        
+        self.capacity = None
+        """ Container volume or size.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Textual description of the container.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Id for the container.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.specimenQuantity = None
+        """ Quantity of specimen within container.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Kind of container directly associated with specimen.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(SpecimenContainer, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SpecimenContainer, self).elementProperties()
+        js.extend([
+            ("additiveCodeableConcept", "additiveCodeableConcept", codeableconcept.CodeableConcept, False, "additive", False),
+            ("additiveReference", "additiveReference", fhirreference.FHIRReference, False, "additive", False),
+            ("capacity", "capacity", quantity.Quantity, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("specimenQuantity", "specimenQuantity", quantity.Quantity, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+class SpecimenProcessing(backboneelement.BackboneElement):
+    """ Processing and processing step details.
+    
+    Details concerning processing and processing steps for the specimen.
+    """
+    
+    resource_type = "SpecimenProcessing"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.additive = None
+        """ Material used in the processing step.
+        List of `FHIRReference` items referencing `Substance` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Textual description of procedure.
+        Type `str`. """
+        
+        self.procedure = None
+        """ Indicates the treatment step  applied to the specimen.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.timeDateTime = None
+        """ Date and time of specimen processing.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.timePeriod = None
+        """ Date and time of specimen processing.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        super(SpecimenProcessing, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SpecimenProcessing, self).elementProperties()
+        js.extend([
+            ("additive", "additive", fhirreference.FHIRReference, True, None, False),
+            ("description", "description", str, False, None, False),
+            ("procedure", "procedure", codeableconcept.CodeableConcept, False, None, False),
+            ("timeDateTime", "timeDateTime", fhirdate.FHIRDate, False, "time", False),
+            ("timePeriod", "timePeriod", period.Period, False, "time", False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/specimen_tests.py b/fhirclient/models/specimen_tests.py
new file mode 100644
index 0000000..854ebfc
--- /dev/null
+++ b/fhirclient/models/specimen_tests.py
@@ -0,0 +1,152 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import specimen
+from .fhirdate import FHIRDate
+
+
+class SpecimenTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Specimen", js["resourceType"])
+        return specimen.Specimen(js)
+    
+    def testSpecimen1(self):
+        inst = self.instantiate_from("specimen-example-isolate.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Specimen instance")
+        self.implSpecimen1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Specimen", js["resourceType"])
+        inst2 = specimen.Specimen(js)
+        self.implSpecimen1(inst2)
+    
+    def implSpecimen1(self, inst):
+        self.assertEqual(inst.accessionIdentifier.system, "http://lab.acme.org/specimens/2011")
+        self.assertEqual(inst.accessionIdentifier.value, "X352356-ISO1")
+        self.assertEqual(inst.collection.collectedDateTime.date, FHIRDate("2015-08-16T07:03:00Z").date)
+        self.assertEqual(inst.collection.collectedDateTime.as_json(), "2015-08-16T07:03:00Z")
+        self.assertEqual(inst.collection.method.coding[0].code, "BAP")
+        self.assertEqual(inst.collection.method.coding[0].system, "http://hl7.org/fhir/v2/0488")
+        self.assertEqual(inst.contained[0].id, "stool")
+        self.assertEqual(inst.id, "isolate")
+        self.assertEqual(inst.note[0].text, "Patient dropped off specimen")
+        self.assertEqual(inst.receivedTime.date, FHIRDate("2015-08-18T07:03:00Z").date)
+        self.assertEqual(inst.receivedTime.as_json(), "2015-08-18T07:03:00Z")
+        self.assertEqual(inst.status, "available")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "429951000124103")
+        self.assertEqual(inst.type.coding[0].display, "Bacterial isolate specimen")
+        self.assertEqual(inst.type.coding[0].system, "http://snomed.info/sct")
+    
+    def testSpecimen2(self):
+        inst = self.instantiate_from("specimen-example-serum.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Specimen instance")
+        self.implSpecimen2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Specimen", js["resourceType"])
+        inst2 = specimen.Specimen(js)
+        self.implSpecimen2(inst2)
+    
+    def implSpecimen2(self, inst):
+        self.assertEqual(inst.accessionIdentifier.system, "http://acme.com/labs/accession-ids")
+        self.assertEqual(inst.accessionIdentifier.value, "20150816-00124")
+        self.assertEqual(inst.collection.collectedDateTime.date, FHIRDate("2015-08-16T06:40:17Z").date)
+        self.assertEqual(inst.collection.collectedDateTime.as_json(), "2015-08-16T06:40:17Z")
+        self.assertEqual(inst.container[0].type.coding[0].code, "SST")
+        self.assertEqual(inst.container[0].type.coding[0].display, "Serum Separator Tube")
+        self.assertEqual(inst.container[0].type.coding[0].system, "http://acme.com/labs")
+        self.assertEqual(inst.id, "sst")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "119364003")
+        self.assertEqual(inst.type.coding[0].display, "Serum sample")
+        self.assertEqual(inst.type.coding[0].system, "http://snomed.info/sct")
+    
+    def testSpecimen3(self):
+        inst = self.instantiate_from("specimen-example-urine.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Specimen instance")
+        self.implSpecimen3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Specimen", js["resourceType"])
+        inst2 = specimen.Specimen(js)
+        self.implSpecimen3(inst2)
+    
+    def implSpecimen3(self, inst):
+        self.assertEqual(inst.accessionIdentifier.system, "http://lab.acme.org/specimens/2015")
+        self.assertEqual(inst.accessionIdentifier.value, "X352356")
+        self.assertEqual(inst.collection.collectedDateTime.date, FHIRDate("2015-08-18T07:03:00Z").date)
+        self.assertEqual(inst.collection.collectedDateTime.as_json(), "2015-08-18T07:03:00Z")
+        self.assertEqual(inst.container[0].capacity.unit, "mls")
+        self.assertEqual(inst.container[0].capacity.value, 50)
+        self.assertEqual(inst.container[0].specimenQuantity.unit, "mls")
+        self.assertEqual(inst.container[0].specimenQuantity.value, 10)
+        self.assertEqual(inst.container[0].type.text, "Non-sterile specimen container")
+        self.assertEqual(inst.id, "vma-urine")
+        self.assertEqual(inst.processing[0].description, "Acidify to pH < 3.0 with 6 N HCl.")
+        self.assertEqual(inst.processing[0].procedure.coding[0].code, "ACID")
+        self.assertEqual(inst.processing[0].procedure.coding[0].system, "http://hl7.org/fhir/v2/0373")
+        self.assertEqual(inst.processing[0].timeDateTime.date, FHIRDate("2015-08-18T08:10:00Z").date)
+        self.assertEqual(inst.processing[0].timeDateTime.as_json(), "2015-08-18T08:10:00Z")
+        self.assertEqual(inst.receivedTime.date, FHIRDate("2015-08-18T07:03:00Z").date)
+        self.assertEqual(inst.receivedTime.as_json(), "2015-08-18T07:03:00Z")
+        self.assertEqual(inst.status, "available")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "RANDU")
+        self.assertEqual(inst.type.coding[0].display, "Urine, Random")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/v2/0487")
+    
+    def testSpecimen4(self):
+        inst = self.instantiate_from("specimen-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Specimen instance")
+        self.implSpecimen4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Specimen", js["resourceType"])
+        inst2 = specimen.Specimen(js)
+        self.implSpecimen4(inst2)
+    
+    def implSpecimen4(self, inst):
+        self.assertEqual(inst.accessionIdentifier.system, "http://lab.acme.org/specimens/2011")
+        self.assertEqual(inst.accessionIdentifier.value, "X352356")
+        self.assertEqual(inst.collection.bodySite.coding[0].code, "49852007")
+        self.assertEqual(inst.collection.bodySite.coding[0].display, "Structure of median cubital vein (body structure)")
+        self.assertEqual(inst.collection.bodySite.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.collection.bodySite.text, "Right median cubital vein")
+        self.assertEqual(inst.collection.collectedDateTime.date, FHIRDate("2011-05-30T06:15:00Z").date)
+        self.assertEqual(inst.collection.collectedDateTime.as_json(), "2011-05-30T06:15:00Z")
+        self.assertEqual(inst.collection.method.coding[0].code, "LNV")
+        self.assertEqual(inst.collection.method.coding[0].system, "http://hl7.org/fhir/v2/0488")
+        self.assertEqual(inst.collection.quantity.unit, "mL")
+        self.assertEqual(inst.collection.quantity.value, 6)
+        self.assertEqual(inst.contained[0].id, "hep")
+        self.assertEqual(inst.container[0].capacity.unit, "mL")
+        self.assertEqual(inst.container[0].capacity.value, 10)
+        self.assertEqual(inst.container[0].description, "Green Gel tube")
+        self.assertEqual(inst.container[0].identifier[0].value, "48736-15394-75465")
+        self.assertEqual(inst.container[0].specimenQuantity.unit, "mL")
+        self.assertEqual(inst.container[0].specimenQuantity.value, 6)
+        self.assertEqual(inst.container[0].type.text, "Vacutainer")
+        self.assertEqual(inst.id, "101")
+        self.assertEqual(inst.identifier[0].system, "http://ehr.acme.org/identifiers/collections")
+        self.assertEqual(inst.identifier[0].value, "23234352356")
+        self.assertEqual(inst.note[0].text, "Specimen is grossly lipemic")
+        self.assertEqual(inst.receivedTime.date, FHIRDate("2011-03-04T07:03:00Z").date)
+        self.assertEqual(inst.receivedTime.as_json(), "2011-03-04T07:03:00Z")
+        self.assertEqual(inst.status, "available")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "122555007")
+        self.assertEqual(inst.type.coding[0].display, "Venous blood specimen")
+        self.assertEqual(inst.type.coding[0].system, "http://snomed.info/sct")
+
diff --git a/fhirclient/models/structuredefinition.py b/fhirclient/models/structuredefinition.py
new file mode 100644
index 0000000..d052ebd
--- /dev/null
+++ b/fhirclient/models/structuredefinition.py
@@ -0,0 +1,315 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/StructureDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class StructureDefinition(domainresource.DomainResource):
+    """ Structural Definition.
+    
+    A definition of a FHIR structure. This resource is used to describe the
+    underlying resources, data types defined in FHIR, and also for describing
+    extensions and constraints on resources and data types.
+    """
+    
+    resource_type = "StructureDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.abstract = None
+        """ Whether the structure is abstract.
+        Type `bool`. """
+        
+        self.baseDefinition = None
+        """ Definition that this type is constrained/specialized from.
+        Type `str`. """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Where the extension can be used in instances.
+        List of `str` items. """
+        
+        self.contextInvariant = None
+        """ FHIRPath invariants - when the extension can be used.
+        List of `str` items. """
+        
+        self.contextType = None
+        """ resource | datatype | extension.
+        Type `str`. """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.derivation = None
+        """ specialization | constraint - How relates to base definition.
+        Type `str`. """
+        
+        self.description = None
+        """ Natural language description of the structure definition.
+        Type `str`. """
+        
+        self.differential = None
+        """ Differential view of the structure.
+        Type `StructureDefinitionDifferential` (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.fhirVersion = None
+        """ FHIR Version this StructureDefinition targets.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Additional identifier for the structure definition.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for structure definition (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.keyword = None
+        """ Assist with indexing and finding.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        self.kind = None
+        """ primitive-type | complex-type | resource | logical.
+        Type `str`. """
+        
+        self.mapping = None
+        """ External specification that the content is mapped to.
+        List of `StructureDefinitionMapping` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this structure definition (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this structure definition is defined.
+        Type `str`. """
+        
+        self.snapshot = None
+        """ Snapshot view of the structure.
+        Type `StructureDefinitionSnapshot` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this structure definition (human friendly).
+        Type `str`. """
+        
+        self.type = None
+        """ Type defined or constrained by this structure.
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this structure definition (globally
+        unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the structure definition.
+        Type `str`. """
+        
+        super(StructureDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureDefinition, self).elementProperties()
+        js.extend([
+            ("abstract", "abstract", bool, False, None, True),
+            ("baseDefinition", "baseDefinition", str, False, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("context", "context", str, True, None, False),
+            ("contextInvariant", "contextInvariant", str, True, None, False),
+            ("contextType", "contextType", str, False, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("derivation", "derivation", str, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("differential", "differential", StructureDefinitionDifferential, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("fhirVersion", "fhirVersion", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("keyword", "keyword", coding.Coding, True, None, False),
+            ("kind", "kind", str, False, None, True),
+            ("mapping", "mapping", StructureDefinitionMapping, True, None, False),
+            ("name", "name", str, False, None, True),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("snapshot", "snapshot", StructureDefinitionSnapshot, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("type", "type", str, False, None, True),
+            ("url", "url", str, False, None, True),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class StructureDefinitionDifferential(backboneelement.BackboneElement):
+    """ Differential view of the structure.
+    
+    A differential view is expressed relative to the base StructureDefinition -
+    a statement of differences that it applies.
+    """
+    
+    resource_type = "StructureDefinitionDifferential"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.element = None
+        """ Definition of elements in the resource (if no StructureDefinition).
+        List of `ElementDefinition` items (represented as `dict` in JSON). """
+        
+        super(StructureDefinitionDifferential, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureDefinitionDifferential, self).elementProperties()
+        js.extend([
+            ("element", "element", elementdefinition.ElementDefinition, True, None, True),
+        ])
+        return js
+
+
+class StructureDefinitionMapping(backboneelement.BackboneElement):
+    """ External specification that the content is mapped to.
+    
+    An external specification that the content is mapped to.
+    """
+    
+    resource_type = "StructureDefinitionMapping"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.comment = None
+        """ Versions, Issues, Scope limitations etc..
+        Type `str`. """
+        
+        self.identity = None
+        """ Internal id when this mapping is used.
+        Type `str`. """
+        
+        self.name = None
+        """ Names what this mapping refers to.
+        Type `str`. """
+        
+        self.uri = None
+        """ Identifies what this mapping refers to.
+        Type `str`. """
+        
+        super(StructureDefinitionMapping, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureDefinitionMapping, self).elementProperties()
+        js.extend([
+            ("comment", "comment", str, False, None, False),
+            ("identity", "identity", str, False, None, True),
+            ("name", "name", str, False, None, False),
+            ("uri", "uri", str, False, None, False),
+        ])
+        return js
+
+
+class StructureDefinitionSnapshot(backboneelement.BackboneElement):
+    """ Snapshot view of the structure.
+    
+    A snapshot view is expressed in a stand alone form that can be used and
+    interpreted without considering the base StructureDefinition.
+    """
+    
+    resource_type = "StructureDefinitionSnapshot"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.element = None
+        """ Definition of elements in the resource (if no StructureDefinition).
+        List of `ElementDefinition` items (represented as `dict` in JSON). """
+        
+        super(StructureDefinitionSnapshot, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureDefinitionSnapshot, self).elementProperties()
+        js.extend([
+            ("element", "element", elementdefinition.ElementDefinition, True, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import elementdefinition
+except ImportError:
+    elementdefinition = sys.modules[__package__ + '.elementdefinition']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/structuredefinition_tests.py b/fhirclient/models/structuredefinition_tests.py
new file mode 100644
index 0000000..97db8b6
--- /dev/null
+++ b/fhirclient/models/structuredefinition_tests.py
@@ -0,0 +1,211 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import structuredefinition
+from .fhirdate import FHIRDate
+
+
+class StructureDefinitionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("StructureDefinition", js["resourceType"])
+        return structuredefinition.StructureDefinition(js)
+    
+    def testStructureDefinition1(self):
+        inst = self.instantiate_from("structuredefinition-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a StructureDefinition instance")
+        self.implStructureDefinition1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("StructureDefinition", js["resourceType"])
+        inst2 = structuredefinition.StructureDefinition(js)
+        self.implStructureDefinition1(inst2)
+    
+    def implStructureDefinition1(self, inst):
+        self.assertFalse(inst.abstract)
+        self.assertEqual(inst.baseDefinition, "http://hl7.org/fhir/StructureDefinition/DiagnosticReport")
+        self.assertEqual(inst.contact[0].name, "Grahame Grieve")
+        self.assertEqual(inst.contact[0].telecom[0].system, "email")
+        self.assertEqual(inst.contact[0].telecom[0].value, "grahame at healthintersections.com.au")
+        self.assertEqual(inst.copyright, "Creative Commons 0, per FHIR specification")
+        self.assertEqual(inst.date.date, FHIRDate("2012-05-12").date)
+        self.assertEqual(inst.date.as_json(), "2012-05-12")
+        self.assertEqual(inst.derivation, "constraint")
+        self.assertEqual(inst.description, "Describes how the lab report is used for a standard Lipid Profile - Cholesterol, Triglyceride and Cholesterol fractions. Uses LOINC codes")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.fhirVersion, "1.0.0")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "1.2.36.90146595217.4.2")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "AU")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.keyword[0].code, "314079002")
+        self.assertEqual(inst.keyword[0].display, "Hyperlipidemia screening test (procedure)")
+        self.assertEqual(inst.keyword[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.kind, "resource")
+        self.assertEqual(inst.mapping[0].comment, "Actual mappings haven't yet been filled out")
+        self.assertEqual(inst.mapping[0].identity, "m1")
+        self.assertEqual(inst.mapping[0].name, "RCPA Lipid Report recommendations")
+        self.assertEqual(inst.mapping[0].uri, "https://www.rcpa.edu.au/getattachment/0961c6d1-ec80-4500-8dc0-de516500e05b/Lipid-and-lipoprotein-testing.aspx")
+        self.assertEqual(inst.name, "LipidProfileExample")
+        self.assertEqual(inst.publisher, "Health Intersections Pty Ltd")
+        self.assertEqual(inst.purpose, "Provide an example to demonstrate how to use StructureDefinition")
+        self.assertEqual(inst.snapshot.element[0].base.max, "1")
+        self.assertEqual(inst.snapshot.element[0].base.min, 1)
+        self.assertEqual(inst.snapshot.element[0].base.path, "DiagnosticReport")
+        self.assertEqual(inst.snapshot.element[0].definition, "The findings and interpretation of a general lipd lab profile.")
+        self.assertEqual(inst.snapshot.element[0].id, "DiagnosticReport")
+        self.assertFalse(inst.snapshot.element[0].isModifier)
+        self.assertEqual(inst.snapshot.element[0].max, "1")
+        self.assertEqual(inst.snapshot.element[0].min, 1)
+        self.assertEqual(inst.snapshot.element[0].path, "DiagnosticReport")
+        self.assertEqual(inst.snapshot.element[0].short, "Lipid Lab Report")
+        self.assertEqual(inst.snapshot.element[1].base.max, "*")
+        self.assertEqual(inst.snapshot.element[1].base.min, 0)
+        self.assertEqual(inst.snapshot.element[1].base.path, "DiagnosticReport.extension")
+        self.assertEqual(inst.snapshot.element[1].id, "DiagnosticReport.extension")
+        self.assertFalse(inst.snapshot.element[1].isModifier)
+        self.assertEqual(inst.snapshot.element[1].max, "*")
+        self.assertEqual(inst.snapshot.element[1].min, 0)
+        self.assertEqual(inst.snapshot.element[1].path, "DiagnosticReport.extension")
+        self.assertEqual(inst.snapshot.element[1].short, "Additional Content defined by implementations")
+        self.assertEqual(inst.snapshot.element[1].slicing.discriminator[0].path, "url")
+        self.assertEqual(inst.snapshot.element[1].slicing.discriminator[0].type, "value")
+        self.assertFalse(inst.snapshot.element[1].slicing.ordered)
+        self.assertEqual(inst.snapshot.element[1].slicing.rules, "open")
+        self.assertEqual(inst.snapshot.element[1].type[0].code, "Extension")
+        self.assertEqual(inst.snapshot.element[2].alias[0], "narrative")
+        self.assertEqual(inst.snapshot.element[2].alias[1], "html")
+        self.assertEqual(inst.snapshot.element[2].alias[2], "xhtml")
+        self.assertEqual(inst.snapshot.element[2].alias[3], "display")
+        self.assertEqual(inst.snapshot.element[2].base.max, "1")
+        self.assertEqual(inst.snapshot.element[2].base.min, 0)
+        self.assertEqual(inst.snapshot.element[2].base.path, "DiagnosticReport.text")
+        self.assertEqual(inst.snapshot.element[2].comment, "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative.")
+        self.assertEqual(inst.snapshot.element[2].id, "DiagnosticReport.text")
+        self.assertFalse(inst.snapshot.element[2].isModifier)
+        self.assertEqual(inst.snapshot.element[2].max, "1")
+        self.assertEqual(inst.snapshot.element[2].min, 0)
+        self.assertEqual(inst.snapshot.element[2].path, "DiagnosticReport.text")
+        self.assertEqual(inst.snapshot.element[2].short, "Text summary of the resource, for human interpretation")
+        self.assertEqual(inst.snapshot.element[2].type[0].code, "Narrative")
+        self.assertEqual(inst.snapshot.element[3].alias[0], "inline resources")
+        self.assertEqual(inst.snapshot.element[3].alias[1], "anonymous resources")
+        self.assertEqual(inst.snapshot.element[3].alias[2], "contained resources")
+        self.assertEqual(inst.snapshot.element[3].base.max, "*")
+        self.assertEqual(inst.snapshot.element[3].base.min, 0)
+        self.assertEqual(inst.snapshot.element[3].base.path, "DiagnosticReport.contained")
+        self.assertEqual(inst.snapshot.element[3].comment, "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.")
+        self.assertEqual(inst.snapshot.element[3].id, "DiagnosticReport.contained")
+        self.assertFalse(inst.snapshot.element[3].isModifier)
+        self.assertEqual(inst.snapshot.element[3].max, "*")
+        self.assertEqual(inst.snapshot.element[3].min, 0)
+        self.assertEqual(inst.snapshot.element[3].path, "DiagnosticReport.contained")
+        self.assertEqual(inst.snapshot.element[3].short, "Contained, inline Resources")
+        self.assertEqual(inst.snapshot.element[3].type[0].code, "Resource")
+        self.assertEqual(inst.snapshot.element[4].base.max, "1")
+        self.assertEqual(inst.snapshot.element[4].base.min, 1)
+        self.assertEqual(inst.snapshot.element[4].base.path, "DiagnosticReport.status")
+        self.assertEqual(inst.snapshot.element[4].binding.strength, "required")
+        self.assertEqual(inst.snapshot.element[4].comment, "This is labeled as \"Is Modifier\" because applications need to take appropriate action if a report is withdrawn.")
+        self.assertEqual(inst.snapshot.element[4].definition, "The status of the diagnostic report as a whole.")
+        self.assertEqual(inst.snapshot.element[4].id, "DiagnosticReport.status")
+        self.assertFalse(inst.snapshot.element[4].isModifier)
+        self.assertEqual(inst.snapshot.element[4].max, "1")
+        self.assertEqual(inst.snapshot.element[4].min, 1)
+        self.assertEqual(inst.snapshot.element[4].path, "DiagnosticReport.status")
+        self.assertEqual(inst.snapshot.element[4].short, "registered|interim|final|amended|cancelled|withdrawn")
+        self.assertEqual(inst.snapshot.element[4].type[0].code, "code")
+        self.assertEqual(inst.snapshot.element[5].base.max, "1")
+        self.assertEqual(inst.snapshot.element[5].base.min, 1)
+        self.assertEqual(inst.snapshot.element[5].base.path, "DiagnosticReport.issued")
+        self.assertEqual(inst.snapshot.element[5].comment, "May be different from the update time of the resource itself, because that is the status of the record (potentially a secondary copy), not the actual release time of the report.")
+        self.assertEqual(inst.snapshot.element[5].definition, "The date and/or time that this version of the report was released from the source diagnostic service.")
+        self.assertEqual(inst.snapshot.element[5].id, "DiagnosticReport.issued")
+        self.assertFalse(inst.snapshot.element[5].isModifier)
+        self.assertEqual(inst.snapshot.element[5].max, "1")
+        self.assertEqual(inst.snapshot.element[5].min, 1)
+        self.assertEqual(inst.snapshot.element[5].path, "DiagnosticReport.issued")
+        self.assertEqual(inst.snapshot.element[5].short, "Date this version was released")
+        self.assertEqual(inst.snapshot.element[5].type[0].code, "dateTime")
+        self.assertEqual(inst.snapshot.element[6].base.max, "1")
+        self.assertEqual(inst.snapshot.element[6].base.min, 1)
+        self.assertEqual(inst.snapshot.element[6].base.path, "DiagnosticReport.subject")
+        self.assertEqual(inst.snapshot.element[6].definition, "The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.")
+        self.assertEqual(inst.snapshot.element[6].id, "DiagnosticReport.subject")
+        self.assertFalse(inst.snapshot.element[6].isModifier)
+        self.assertEqual(inst.snapshot.element[6].max, "1")
+        self.assertEqual(inst.snapshot.element[6].min, 1)
+        self.assertEqual(inst.snapshot.element[6].path, "DiagnosticReport.subject")
+        self.assertEqual(inst.snapshot.element[6].short, "The subject of the report")
+        self.assertEqual(inst.snapshot.element[6].type[0].aggregation[0], "bundled")
+        self.assertEqual(inst.snapshot.element[6].type[0].code, "Reference")
+        self.assertEqual(inst.snapshot.element[6].type[0].targetProfile, "http://hl7.org/fhir/StructureDefinition/Patient")
+        self.assertEqual(inst.snapshot.element[6].type[0].versioning, "either")
+        self.assertEqual(inst.snapshot.element[6].type[1].aggregation[0], "bundled")
+        self.assertEqual(inst.snapshot.element[6].type[1].code, "Reference")
+        self.assertEqual(inst.snapshot.element[6].type[1].targetProfile, "http://hl7.org/fhir/StructureDefinition/Group")
+        self.assertEqual(inst.snapshot.element[6].type[2].aggregation[0], "bundled")
+        self.assertEqual(inst.snapshot.element[6].type[2].code, "Reference")
+        self.assertEqual(inst.snapshot.element[6].type[2].targetProfile, "http://hl7.org/fhir/StructureDefinition/Device")
+        self.assertEqual(inst.snapshot.element[7].base.max, "1")
+        self.assertEqual(inst.snapshot.element[7].base.min, 1)
+        self.assertEqual(inst.snapshot.element[7].base.path, "DiagnosticReport.performer")
+        self.assertEqual(inst.snapshot.element[7].comment, "This is not necessarily the source of the atomic data items - it's the entity that takes responsibility for the clinical report.")
+        self.assertEqual(inst.snapshot.element[7].definition, "The diagnostic service that is responsible for issuing the report.")
+        self.assertEqual(inst.snapshot.element[7].id, "DiagnosticReport.performer")
+        self.assertFalse(inst.snapshot.element[7].isModifier)
+        self.assertEqual(inst.snapshot.element[7].max, "1")
+        self.assertEqual(inst.snapshot.element[7].min, 1)
+        self.assertEqual(inst.snapshot.element[7].path, "DiagnosticReport.performer")
+        self.assertEqual(inst.snapshot.element[7].short, "Responsible Diagnostic Service")
+        self.assertEqual(inst.snapshot.element[7].type[0].code, "Reference")
+        self.assertEqual(inst.snapshot.element[7].type[0].targetProfile, "http://hl7.org/fhir/StructureDefinition/Organization")
+        self.assertEqual(inst.snapshot.element[8].base.max, "*")
+        self.assertEqual(inst.snapshot.element[8].base.min, 0)
+        self.assertEqual(inst.snapshot.element[8].base.path, "DiagnosticReport.identifier")
+        self.assertEqual(inst.snapshot.element[8].definition, "The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.")
+        self.assertEqual(inst.snapshot.element[8].id, "DiagnosticReport.identifier")
+        self.assertFalse(inst.snapshot.element[8].isModifier)
+        self.assertEqual(inst.snapshot.element[8].max, "1")
+        self.assertEqual(inst.snapshot.element[8].min, 0)
+        self.assertEqual(inst.snapshot.element[8].path, "DiagnosticReport.identifier")
+        self.assertEqual(inst.snapshot.element[8].short, "Id for external references to this report")
+        self.assertEqual(inst.snapshot.element[8].type[0].code, "Identifier")
+        self.assertEqual(inst.snapshot.element[9].base.max, "*")
+        self.assertEqual(inst.snapshot.element[9].base.min, 0)
+        self.assertEqual(inst.snapshot.element[9].base.path, "DiagnosticReport.request")
+        self.assertEqual(inst.snapshot.element[9].definition, "Details concerning a single pathology test requested.")
+        self.assertEqual(inst.snapshot.element[9].id, "DiagnosticReport.request")
+        self.assertFalse(inst.snapshot.element[9].isModifier)
+        self.assertEqual(inst.snapshot.element[9].max, "*")
+        self.assertEqual(inst.snapshot.element[9].min, 0)
+        self.assertEqual(inst.snapshot.element[9].path, "DiagnosticReport.request")
+        self.assertEqual(inst.snapshot.element[9].short, "What was requested")
+        self.assertEqual(inst.snapshot.element[9].type[0].aggregation[0], "referenced")
+        self.assertEqual(inst.snapshot.element[9].type[0].code, "Reference")
+        self.assertEqual(inst.snapshot.element[9].type[0].targetProfile, "http://hl7.org/fhir/StructureDefinition/ProcedureRequest")
+        self.assertEqual(inst.snapshot.element[9].type[0].versioning, "specific")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Example Lipid Profile")
+        self.assertEqual(inst.type, "DiagnosticReport")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/StructureDefinition/example")
+        self.assertEqual(inst.useContext[0].code.code, "focus")
+        self.assertEqual(inst.useContext[0].code.display, "Clinical Focus")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "314079002")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].display, "Hyperlipidemia screening test (procedure)")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.version, "2")
+
diff --git a/fhirclient/models/structuremap.py b/fhirclient/models/structuremap.py
new file mode 100644
index 0000000..33919ca
--- /dev/null
+++ b/fhirclient/models/structuremap.py
@@ -0,0 +1,830 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/StructureMap) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class StructureMap(domainresource.DomainResource):
+    """ A Map of relationships between 2 structures that can be used to transform
+    data.
+    """
+    
+    resource_type = "StructureMap"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the structure map.
+        Type `str`. """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.group = None
+        """ Named sections for reader convenience.
+        List of `StructureMapGroup` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Additional identifier for the structure map.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.import_fhir = None
+        """ Other maps used by this map (canonical URLs).
+        List of `str` items. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for structure map (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this structure map (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this structure map is defined.
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.structure = None
+        """ Structure Definition used by this map.
+        List of `StructureMapStructure` items (represented as `dict` in JSON). """
+        
+        self.title = None
+        """ Name for this structure map (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this structure map (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the structure map.
+        Type `str`. """
+        
+        super(StructureMap, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureMap, self).elementProperties()
+        js.extend([
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("group", "group", StructureMapGroup, True, None, True),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("import_fhir", "import", str, True, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("name", "name", str, False, None, True),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("structure", "structure", StructureMapStructure, True, None, False),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, True),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class StructureMapGroup(backboneelement.BackboneElement):
+    """ Named sections for reader convenience.
+    
+    Organizes the mapping into managable chunks for human review/ease of
+    maintenance.
+    """
+    
+    resource_type = "StructureMapGroup"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.documentation = None
+        """ Additional description/explaination for group.
+        Type `str`. """
+        
+        self.extends = None
+        """ Another group that this group adds rules to.
+        Type `str`. """
+        
+        self.input = None
+        """ Named instance provided when invoking the map.
+        List of `StructureMapGroupInput` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Human-readable label.
+        Type `str`. """
+        
+        self.rule = None
+        """ Transform Rule from source to target.
+        List of `StructureMapGroupRule` items (represented as `dict` in JSON). """
+        
+        self.typeMode = None
+        """ none | types | type-and-types.
+        Type `str`. """
+        
+        super(StructureMapGroup, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureMapGroup, self).elementProperties()
+        js.extend([
+            ("documentation", "documentation", str, False, None, False),
+            ("extends", "extends", str, False, None, False),
+            ("input", "input", StructureMapGroupInput, True, None, True),
+            ("name", "name", str, False, None, True),
+            ("rule", "rule", StructureMapGroupRule, True, None, True),
+            ("typeMode", "typeMode", str, False, None, True),
+        ])
+        return js
+
+
+class StructureMapGroupInput(backboneelement.BackboneElement):
+    """ Named instance provided when invoking the map.
+    
+    A name assigned to an instance of data. The instance must be provided when
+    the mapping is invoked.
+    """
+    
+    resource_type = "StructureMapGroupInput"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.documentation = None
+        """ Documentation for this instance of data.
+        Type `str`. """
+        
+        self.mode = None
+        """ source | target.
+        Type `str`. """
+        
+        self.name = None
+        """ Name for this instance of data.
+        Type `str`. """
+        
+        self.type = None
+        """ Type for this instance of data.
+        Type `str`. """
+        
+        super(StructureMapGroupInput, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureMapGroupInput, self).elementProperties()
+        js.extend([
+            ("documentation", "documentation", str, False, None, False),
+            ("mode", "mode", str, False, None, True),
+            ("name", "name", str, False, None, True),
+            ("type", "type", str, False, None, False),
+        ])
+        return js
+
+
+class StructureMapGroupRule(backboneelement.BackboneElement):
+    """ Transform Rule from source to target.
+    """
+    
+    resource_type = "StructureMapGroupRule"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.dependent = None
+        """ Which other rules to apply in the context of this rule.
+        List of `StructureMapGroupRuleDependent` items (represented as `dict` in JSON). """
+        
+        self.documentation = None
+        """ Documentation for this instance of data.
+        Type `str`. """
+        
+        self.name = None
+        """ Name of the rule for internal references.
+        Type `str`. """
+        
+        self.rule = None
+        """ Rules contained in this rule.
+        List of `StructureMapGroupRule` items (represented as `dict` in JSON). """
+        
+        self.source = None
+        """ Source inputs to the mapping.
+        List of `StructureMapGroupRuleSource` items (represented as `dict` in JSON). """
+        
+        self.target = None
+        """ Content to create because of this mapping rule.
+        List of `StructureMapGroupRuleTarget` items (represented as `dict` in JSON). """
+        
+        super(StructureMapGroupRule, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureMapGroupRule, self).elementProperties()
+        js.extend([
+            ("dependent", "dependent", StructureMapGroupRuleDependent, True, None, False),
+            ("documentation", "documentation", str, False, None, False),
+            ("name", "name", str, False, None, True),
+            ("rule", "rule", StructureMapGroupRule, True, None, False),
+            ("source", "source", StructureMapGroupRuleSource, True, None, True),
+            ("target", "target", StructureMapGroupRuleTarget, True, None, False),
+        ])
+        return js
+
+
+class StructureMapGroupRuleDependent(backboneelement.BackboneElement):
+    """ Which other rules to apply in the context of this rule.
+    """
+    
+    resource_type = "StructureMapGroupRuleDependent"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.name = None
+        """ Name of a rule or group to apply.
+        Type `str`. """
+        
+        self.variable = None
+        """ Variable to pass to the rule or group.
+        List of `str` items. """
+        
+        super(StructureMapGroupRuleDependent, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureMapGroupRuleDependent, self).elementProperties()
+        js.extend([
+            ("name", "name", str, False, None, True),
+            ("variable", "variable", str, True, None, True),
+        ])
+        return js
+
+
+class StructureMapGroupRuleSource(backboneelement.BackboneElement):
+    """ Source inputs to the mapping.
+    """
+    
+    resource_type = "StructureMapGroupRuleSource"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.check = None
+        """ FHIRPath expression  - must be true or the mapping engine throws an
+        error instead of completing.
+        Type `str`. """
+        
+        self.condition = None
+        """ FHIRPath expression  - must be true or the rule does not apply.
+        Type `str`. """
+        
+        self.context = None
+        """ Type or variable this rule applies to.
+        Type `str`. """
+        
+        self.defaultValueAddress = None
+        """ Default value if no value exists.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.defaultValueAge = None
+        """ Default value if no value exists.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.defaultValueAnnotation = None
+        """ Default value if no value exists.
+        Type `Annotation` (represented as `dict` in JSON). """
+        
+        self.defaultValueAttachment = None
+        """ Default value if no value exists.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.defaultValueBase64Binary = None
+        """ Default value if no value exists.
+        Type `str`. """
+        
+        self.defaultValueBoolean = None
+        """ Default value if no value exists.
+        Type `bool`. """
+        
+        self.defaultValueCode = None
+        """ Default value if no value exists.
+        Type `str`. """
+        
+        self.defaultValueCodeableConcept = None
+        """ Default value if no value exists.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.defaultValueCoding = None
+        """ Default value if no value exists.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.defaultValueContactPoint = None
+        """ Default value if no value exists.
+        Type `ContactPoint` (represented as `dict` in JSON). """
+        
+        self.defaultValueCount = None
+        """ Default value if no value exists.
+        Type `Count` (represented as `dict` in JSON). """
+        
+        self.defaultValueDate = None
+        """ Default value if no value exists.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.defaultValueDateTime = None
+        """ Default value if no value exists.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.defaultValueDecimal = None
+        """ Default value if no value exists.
+        Type `float`. """
+        
+        self.defaultValueDistance = None
+        """ Default value if no value exists.
+        Type `Distance` (represented as `dict` in JSON). """
+        
+        self.defaultValueDuration = None
+        """ Default value if no value exists.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.defaultValueHumanName = None
+        """ Default value if no value exists.
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.defaultValueId = None
+        """ Default value if no value exists.
+        Type `str`. """
+        
+        self.defaultValueIdentifier = None
+        """ Default value if no value exists.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.defaultValueInstant = None
+        """ Default value if no value exists.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.defaultValueInteger = None
+        """ Default value if no value exists.
+        Type `int`. """
+        
+        self.defaultValueMarkdown = None
+        """ Default value if no value exists.
+        Type `str`. """
+        
+        self.defaultValueMeta = None
+        """ Default value if no value exists.
+        Type `Meta` (represented as `dict` in JSON). """
+        
+        self.defaultValueMoney = None
+        """ Default value if no value exists.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.defaultValueOid = None
+        """ Default value if no value exists.
+        Type `str`. """
+        
+        self.defaultValuePeriod = None
+        """ Default value if no value exists.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.defaultValuePositiveInt = None
+        """ Default value if no value exists.
+        Type `int`. """
+        
+        self.defaultValueQuantity = None
+        """ Default value if no value exists.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.defaultValueRange = None
+        """ Default value if no value exists.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.defaultValueRatio = None
+        """ Default value if no value exists.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.defaultValueReference = None
+        """ Default value if no value exists.
+        Type `FHIRReference` (represented as `dict` in JSON). """
+        
+        self.defaultValueSampledData = None
+        """ Default value if no value exists.
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.defaultValueSignature = None
+        """ Default value if no value exists.
+        Type `Signature` (represented as `dict` in JSON). """
+        
+        self.defaultValueString = None
+        """ Default value if no value exists.
+        Type `str`. """
+        
+        self.defaultValueTime = None
+        """ Default value if no value exists.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.defaultValueTiming = None
+        """ Default value if no value exists.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.defaultValueUnsignedInt = None
+        """ Default value if no value exists.
+        Type `int`. """
+        
+        self.defaultValueUri = None
+        """ Default value if no value exists.
+        Type `str`. """
+        
+        self.element = None
+        """ Optional field for this source.
+        Type `str`. """
+        
+        self.listMode = None
+        """ first | not_first | last | not_last | only_one.
+        Type `str`. """
+        
+        self.max = None
+        """ Specified maximum cardinality (number or *).
+        Type `str`. """
+        
+        self.min = None
+        """ Specified minimum cardinality.
+        Type `int`. """
+        
+        self.type = None
+        """ Rule only applies if source has this type.
+        Type `str`. """
+        
+        self.variable = None
+        """ Named context for field, if a field is specified.
+        Type `str`. """
+        
+        super(StructureMapGroupRuleSource, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureMapGroupRuleSource, self).elementProperties()
+        js.extend([
+            ("check", "check", str, False, None, False),
+            ("condition", "condition", str, False, None, False),
+            ("context", "context", str, False, None, True),
+            ("defaultValueAddress", "defaultValueAddress", address.Address, False, "defaultValue", False),
+            ("defaultValueAge", "defaultValueAge", age.Age, False, "defaultValue", False),
+            ("defaultValueAnnotation", "defaultValueAnnotation", annotation.Annotation, False, "defaultValue", False),
+            ("defaultValueAttachment", "defaultValueAttachment", attachment.Attachment, False, "defaultValue", False),
+            ("defaultValueBase64Binary", "defaultValueBase64Binary", str, False, "defaultValue", False),
+            ("defaultValueBoolean", "defaultValueBoolean", bool, False, "defaultValue", False),
+            ("defaultValueCode", "defaultValueCode", str, False, "defaultValue", False),
+            ("defaultValueCodeableConcept", "defaultValueCodeableConcept", codeableconcept.CodeableConcept, False, "defaultValue", False),
+            ("defaultValueCoding", "defaultValueCoding", coding.Coding, False, "defaultValue", False),
+            ("defaultValueContactPoint", "defaultValueContactPoint", contactpoint.ContactPoint, False, "defaultValue", False),
+            ("defaultValueCount", "defaultValueCount", count.Count, False, "defaultValue", False),
+            ("defaultValueDate", "defaultValueDate", fhirdate.FHIRDate, False, "defaultValue", False),
+            ("defaultValueDateTime", "defaultValueDateTime", fhirdate.FHIRDate, False, "defaultValue", False),
+            ("defaultValueDecimal", "defaultValueDecimal", float, False, "defaultValue", False),
+            ("defaultValueDistance", "defaultValueDistance", distance.Distance, False, "defaultValue", False),
+            ("defaultValueDuration", "defaultValueDuration", duration.Duration, False, "defaultValue", False),
+            ("defaultValueHumanName", "defaultValueHumanName", humanname.HumanName, False, "defaultValue", False),
+            ("defaultValueId", "defaultValueId", str, False, "defaultValue", False),
+            ("defaultValueIdentifier", "defaultValueIdentifier", identifier.Identifier, False, "defaultValue", False),
+            ("defaultValueInstant", "defaultValueInstant", fhirdate.FHIRDate, False, "defaultValue", False),
+            ("defaultValueInteger", "defaultValueInteger", int, False, "defaultValue", False),
+            ("defaultValueMarkdown", "defaultValueMarkdown", str, False, "defaultValue", False),
+            ("defaultValueMeta", "defaultValueMeta", meta.Meta, False, "defaultValue", False),
+            ("defaultValueMoney", "defaultValueMoney", money.Money, False, "defaultValue", False),
+            ("defaultValueOid", "defaultValueOid", str, False, "defaultValue", False),
+            ("defaultValuePeriod", "defaultValuePeriod", period.Period, False, "defaultValue", False),
+            ("defaultValuePositiveInt", "defaultValuePositiveInt", int, False, "defaultValue", False),
+            ("defaultValueQuantity", "defaultValueQuantity", quantity.Quantity, False, "defaultValue", False),
+            ("defaultValueRange", "defaultValueRange", range.Range, False, "defaultValue", False),
+            ("defaultValueRatio", "defaultValueRatio", ratio.Ratio, False, "defaultValue", False),
+            ("defaultValueReference", "defaultValueReference", fhirreference.FHIRReference, False, "defaultValue", False),
+            ("defaultValueSampledData", "defaultValueSampledData", sampleddata.SampledData, False, "defaultValue", False),
+            ("defaultValueSignature", "defaultValueSignature", signature.Signature, False, "defaultValue", False),
+            ("defaultValueString", "defaultValueString", str, False, "defaultValue", False),
+            ("defaultValueTime", "defaultValueTime", fhirdate.FHIRDate, False, "defaultValue", False),
+            ("defaultValueTiming", "defaultValueTiming", timing.Timing, False, "defaultValue", False),
+            ("defaultValueUnsignedInt", "defaultValueUnsignedInt", int, False, "defaultValue", False),
+            ("defaultValueUri", "defaultValueUri", str, False, "defaultValue", False),
+            ("element", "element", str, False, None, False),
+            ("listMode", "listMode", str, False, None, False),
+            ("max", "max", str, False, None, False),
+            ("min", "min", int, False, None, False),
+            ("type", "type", str, False, None, False),
+            ("variable", "variable", str, False, None, False),
+        ])
+        return js
+
+
+class StructureMapGroupRuleTarget(backboneelement.BackboneElement):
+    """ Content to create because of this mapping rule.
+    """
+    
+    resource_type = "StructureMapGroupRuleTarget"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.context = None
+        """ Type or variable this rule applies to.
+        Type `str`. """
+        
+        self.contextType = None
+        """ type | variable.
+        Type `str`. """
+        
+        self.element = None
+        """ Field to create in the context.
+        Type `str`. """
+        
+        self.listMode = None
+        """ first | share | last | collate.
+        List of `str` items. """
+        
+        self.listRuleId = None
+        """ Internal rule reference for shared list items.
+        Type `str`. """
+        
+        self.parameter = None
+        """ Parameters to the transform.
+        List of `StructureMapGroupRuleTargetParameter` items (represented as `dict` in JSON). """
+        
+        self.transform = None
+        """ create | copy +.
+        Type `str`. """
+        
+        self.variable = None
+        """ Named context for field, if desired, and a field is specified.
+        Type `str`. """
+        
+        super(StructureMapGroupRuleTarget, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureMapGroupRuleTarget, self).elementProperties()
+        js.extend([
+            ("context", "context", str, False, None, False),
+            ("contextType", "contextType", str, False, None, False),
+            ("element", "element", str, False, None, False),
+            ("listMode", "listMode", str, True, None, False),
+            ("listRuleId", "listRuleId", str, False, None, False),
+            ("parameter", "parameter", StructureMapGroupRuleTargetParameter, True, None, False),
+            ("transform", "transform", str, False, None, False),
+            ("variable", "variable", str, False, None, False),
+        ])
+        return js
+
+
+class StructureMapGroupRuleTargetParameter(backboneelement.BackboneElement):
+    """ Parameters to the transform.
+    """
+    
+    resource_type = "StructureMapGroupRuleTargetParameter"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.valueBoolean = None
+        """ Parameter value - variable or literal.
+        Type `bool`. """
+        
+        self.valueDecimal = None
+        """ Parameter value - variable or literal.
+        Type `float`. """
+        
+        self.valueId = None
+        """ Parameter value - variable or literal.
+        Type `str`. """
+        
+        self.valueInteger = None
+        """ Parameter value - variable or literal.
+        Type `int`. """
+        
+        self.valueString = None
+        """ Parameter value - variable or literal.
+        Type `str`. """
+        
+        super(StructureMapGroupRuleTargetParameter, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureMapGroupRuleTargetParameter, self).elementProperties()
+        js.extend([
+            ("valueBoolean", "valueBoolean", bool, False, "value", True),
+            ("valueDecimal", "valueDecimal", float, False, "value", True),
+            ("valueId", "valueId", str, False, "value", True),
+            ("valueInteger", "valueInteger", int, False, "value", True),
+            ("valueString", "valueString", str, False, "value", True),
+        ])
+        return js
+
+
+class StructureMapStructure(backboneelement.BackboneElement):
+    """ Structure Definition used by this map.
+    
+    A structure definition used by this map. The structure definition may
+    describe instances that are converted, or the instances that are produced.
+    """
+    
+    resource_type = "StructureMapStructure"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.alias = None
+        """ Name for type in this map.
+        Type `str`. """
+        
+        self.documentation = None
+        """ Documentation on use of structure.
+        Type `str`. """
+        
+        self.mode = None
+        """ source | queried | target | produced.
+        Type `str`. """
+        
+        self.url = None
+        """ Canonical URL for structure definition.
+        Type `str`. """
+        
+        super(StructureMapStructure, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(StructureMapStructure, self).elementProperties()
+        js.extend([
+            ("alias", "alias", str, False, None, False),
+            ("documentation", "documentation", str, False, None, False),
+            ("mode", "mode", str, False, None, True),
+            ("url", "url", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import age
+except ImportError:
+    age = sys.modules[__package__ + '.age']
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import count
+except ImportError:
+    count = sys.modules[__package__ + '.count']
+try:
+    from . import distance
+except ImportError:
+    distance = sys.modules[__package__ + '.distance']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import humanname
+except ImportError:
+    humanname = sys.modules[__package__ + '.humanname']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import meta
+except ImportError:
+    meta = sys.modules[__package__ + '.meta']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
+try:
+    from . import sampleddata
+except ImportError:
+    sampleddata = sys.modules[__package__ + '.sampleddata']
+try:
+    from . import signature
+except ImportError:
+    signature = sys.modules[__package__ + '.signature']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/structuremap_tests.py b/fhirclient/models/structuremap_tests.py
new file mode 100644
index 0000000..29e4ac0
--- /dev/null
+++ b/fhirclient/models/structuremap_tests.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import structuremap
+from .fhirdate import FHIRDate
+
+
+class StructureMapTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("StructureMap", js["resourceType"])
+        return structuremap.StructureMap(js)
+    
+    def testStructureMap1(self):
+        inst = self.instantiate_from("structuremap-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a StructureMap instance")
+        self.implStructureMap1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("StructureMap", js["resourceType"])
+        inst2 = structuremap.StructureMap(js)
+        self.implStructureMap1(inst2)
+    
+    def implStructureMap1(self, inst):
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.date.date, FHIRDate("2017-03-09").date)
+        self.assertEqual(inst.date.as_json(), "2017-03-09")
+        self.assertEqual(inst.description, "Example Structure Map")
+        self.assertEqual(inst.group[0].documentation, "test -> testValue")
+        self.assertEqual(inst.group[0].input[0].mode, "source")
+        self.assertEqual(inst.group[0].input[0].name, "test")
+        self.assertEqual(inst.group[0].name, "Examples")
+        self.assertEqual(inst.group[0].rule[0].name, "rule1")
+        self.assertEqual(inst.group[0].rule[0].source[0].context, "Source")
+        self.assertEqual(inst.group[0].rule[0].source[0].element, "test")
+        self.assertEqual(inst.group[0].rule[0].source[0].type, "SourceClassA")
+        self.assertEqual(inst.group[0].rule[0].source[0].variable, "t")
+        self.assertEqual(inst.group[0].rule[0].target[0].context, "Destination")
+        self.assertEqual(inst.group[0].rule[0].target[0].contextType, "variable")
+        self.assertEqual(inst.group[0].rule[0].target[0].element, "testValue")
+        self.assertEqual(inst.group[0].rule[0].target[0].transform, "copy")
+        self.assertEqual(inst.group[0].typeMode, "none")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "urn:oid:37843577-95fb-4adb-84c0-8837188a7bf3")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "009")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "Oceania")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "http://unstats.un.org/unsd/methods/m49/m49.htm")
+        self.assertEqual(inst.name, "ExampleMap")
+        self.assertEqual(inst.publisher, "HL7 FHIR Standard")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Example Map")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/StructureMap/example")
+        self.assertEqual(inst.version, "0.1")
+
diff --git a/fhirclient/models/subscription.py b/fhirclient/models/subscription.py
new file mode 100644
index 0000000..38f9c0b
--- /dev/null
+++ b/fhirclient/models/subscription.py
@@ -0,0 +1,139 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Subscription) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Subscription(domainresource.DomainResource):
+    """ A server push subscription criteria.
+    
+    The subscription resource is used to define a push based subscription from
+    a server to another system. Once a subscription is registered with the
+    server, the server checks every resource that is created or updated, and if
+    the resource matches the given criteria, it sends a message on the defined
+    "channel" so that another system is able to take an appropriate action.
+    """
+    
+    resource_type = "Subscription"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.channel = None
+        """ The channel on which to report matches to the criteria.
+        Type `SubscriptionChannel` (represented as `dict` in JSON). """
+        
+        self.contact = None
+        """ Contact details for source (e.g. troubleshooting).
+        List of `ContactPoint` items (represented as `dict` in JSON). """
+        
+        self.criteria = None
+        """ Rule for server push criteria.
+        Type `str`. """
+        
+        self.end = None
+        """ When to automatically delete the subscription.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.error = None
+        """ Latest error note.
+        Type `str`. """
+        
+        self.reason = None
+        """ Description of why this subscription was created.
+        Type `str`. """
+        
+        self.status = None
+        """ requested | active | error | off.
+        Type `str`. """
+        
+        self.tag = None
+        """ A tag to add to matching resources.
+        List of `Coding` items (represented as `dict` in JSON). """
+        
+        super(Subscription, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Subscription, self).elementProperties()
+        js.extend([
+            ("channel", "channel", SubscriptionChannel, False, None, True),
+            ("contact", "contact", contactpoint.ContactPoint, True, None, False),
+            ("criteria", "criteria", str, False, None, True),
+            ("end", "end", fhirdate.FHIRDate, False, None, False),
+            ("error", "error", str, False, None, False),
+            ("reason", "reason", str, False, None, True),
+            ("status", "status", str, False, None, True),
+            ("tag", "tag", coding.Coding, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class SubscriptionChannel(backboneelement.BackboneElement):
+    """ The channel on which to report matches to the criteria.
+    
+    Details where to send notifications when resources are received that meet
+    the criteria.
+    """
+    
+    resource_type = "SubscriptionChannel"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.endpoint = None
+        """ Where the channel points to.
+        Type `str`. """
+        
+        self.header = None
+        """ Usage depends on the channel type.
+        List of `str` items. """
+        
+        self.payload = None
+        """ Mimetype to send, or omit for no payload.
+        Type `str`. """
+        
+        self.type = None
+        """ rest-hook | websocket | email | sms | message.
+        Type `str`. """
+        
+        super(SubscriptionChannel, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SubscriptionChannel, self).elementProperties()
+        js.extend([
+            ("endpoint", "endpoint", str, False, None, False),
+            ("header", "header", str, True, None, False),
+            ("payload", "payload", str, False, None, False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
diff --git a/fhirclient/models/subscription_tests.py b/fhirclient/models/subscription_tests.py
new file mode 100644
index 0000000..b183e02
--- /dev/null
+++ b/fhirclient/models/subscription_tests.py
@@ -0,0 +1,80 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import subscription
+from .fhirdate import FHIRDate
+
+
+class SubscriptionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Subscription", js["resourceType"])
+        return subscription.Subscription(js)
+    
+    def testSubscription1(self):
+        inst = self.instantiate_from("subscription-example-error.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Subscription instance")
+        self.implSubscription1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Subscription", js["resourceType"])
+        inst2 = subscription.Subscription(js)
+        self.implSubscription1(inst2)
+    
+    def implSubscription1(self, inst):
+        self.assertEqual(inst.channel.endpoint, "https://biliwatch.com/customers/mount-auburn-miu/on-result")
+        self.assertEqual(inst.channel.header[0], "Authorization: Bearer secret-token-abc-123")
+        self.assertEqual(inst.channel.payload, "application/fhir+json")
+        self.assertEqual(inst.channel.type, "rest-hook")
+        self.assertEqual(inst.contact[0].system, "phone")
+        self.assertEqual(inst.contact[0].value, "ext 4123")
+        self.assertEqual(inst.criteria, "Observation?code=http://loinc.org|1975-2")
+        self.assertEqual(inst.end.date, FHIRDate("2021-01-01T00:00:00Z").date)
+        self.assertEqual(inst.end.as_json(), "2021-01-01T00:00:00Z")
+        self.assertEqual(inst.error, "Socket Error 10060 - can't connect to host")
+        self.assertEqual(inst.id, "example-error")
+        self.assertEqual(inst.reason, "Monitor new neonatal function")
+        self.assertEqual(inst.status, "error")
+        self.assertEqual(inst.tag[0].code, "bili-done")
+        self.assertEqual(inst.tag[0].system, "http://example.org/fhir/cs/internal")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSubscription2(self):
+        inst = self.instantiate_from("subscription-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Subscription instance")
+        self.implSubscription2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Subscription", js["resourceType"])
+        inst2 = subscription.Subscription(js)
+        self.implSubscription2(inst2)
+    
+    def implSubscription2(self, inst):
+        self.assertEqual(inst.channel.endpoint, "https://biliwatch.com/customers/mount-auburn-miu/on-result")
+        self.assertEqual(inst.channel.header[0], "Authorization: Bearer secret-token-abc-123")
+        self.assertEqual(inst.channel.payload, "application/fhir+json")
+        self.assertEqual(inst.channel.type, "rest-hook")
+        self.assertEqual(inst.contact[0].system, "phone")
+        self.assertEqual(inst.contact[0].value, "ext 4123")
+        self.assertEqual(inst.criteria, "Observation?code=http://loinc.org|1975-2")
+        self.assertEqual(inst.end.date, FHIRDate("2021-01-01T00:00:00Z").date)
+        self.assertEqual(inst.end.as_json(), "2021-01-01T00:00:00Z")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.reason, "Monitor new neonatal function")
+        self.assertEqual(inst.status, "requested")
+        self.assertEqual(inst.tag[0].code, "bili-done")
+        self.assertEqual(inst.tag[0].system, "http://example.org/fhir/cs/internal")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/substance.py b/fhirclient/models/substance.py
new file mode 100644
index 0000000..01f2692
--- /dev/null
+++ b/fhirclient/models/substance.py
@@ -0,0 +1,175 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Substance) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Substance(domainresource.DomainResource):
+    """ A homogeneous material with a definite composition.
+    """
+    
+    resource_type = "Substance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.category = None
+        """ What class/type of substance this is.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ What substance this is.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Textual description of the substance, comments.
+        Type `str`. """
+        
+        self.identifier = None
+        """ Unique identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.ingredient = None
+        """ Composition information about the substance.
+        List of `SubstanceIngredient` items (represented as `dict` in JSON). """
+        
+        self.instance = None
+        """ If this describes a specific package/container of the substance.
+        List of `SubstanceInstance` items (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | inactive | entered-in-error.
+        Type `str`. """
+        
+        super(Substance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Substance, self).elementProperties()
+        js.extend([
+            ("category", "category", codeableconcept.CodeableConcept, True, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("ingredient", "ingredient", SubstanceIngredient, True, None, False),
+            ("instance", "instance", SubstanceInstance, True, None, False),
+            ("status", "status", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class SubstanceIngredient(backboneelement.BackboneElement):
+    """ Composition information about the substance.
+    
+    A substance can be composed of other substances.
+    """
+    
+    resource_type = "SubstanceIngredient"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.quantity = None
+        """ Optional amount (concentration).
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.substanceCodeableConcept = None
+        """ A component of the substance.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.substanceReference = None
+        """ A component of the substance.
+        Type `FHIRReference` referencing `Substance` (represented as `dict` in JSON). """
+        
+        super(SubstanceIngredient, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SubstanceIngredient, self).elementProperties()
+        js.extend([
+            ("quantity", "quantity", ratio.Ratio, False, None, False),
+            ("substanceCodeableConcept", "substanceCodeableConcept", codeableconcept.CodeableConcept, False, "substance", True),
+            ("substanceReference", "substanceReference", fhirreference.FHIRReference, False, "substance", True),
+        ])
+        return js
+
+
+class SubstanceInstance(backboneelement.BackboneElement):
+    """ If this describes a specific package/container of the substance.
+    
+    Substance may be used to describe a kind of substance, or a specific
+    package/container of the substance: an instance.
+    """
+    
+    resource_type = "SubstanceInstance"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.expiry = None
+        """ When no longer valid to use.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.identifier = None
+        """ Identifier of the package/container.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Amount of substance in the package.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        super(SubstanceInstance, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SubstanceInstance, self).elementProperties()
+        js.extend([
+            ("expiry", "expiry", fhirdate.FHIRDate, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
diff --git a/fhirclient/models/substance_tests.py b/fhirclient/models/substance_tests.py
new file mode 100644
index 0000000..cff0e93
--- /dev/null
+++ b/fhirclient/models/substance_tests.py
@@ -0,0 +1,170 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import substance
+from .fhirdate import FHIRDate
+
+
+class SubstanceTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Substance", js["resourceType"])
+        return substance.Substance(js)
+    
+    def testSubstance1(self):
+        inst = self.instantiate_from("substance-example-amoxicillin-clavulanate.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Substance instance")
+        self.implSubstance1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Substance", js["resourceType"])
+        inst2 = substance.Substance(js)
+        self.implSubstance1(inst2)
+    
+    def implSubstance1(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "drug")
+        self.assertEqual(inst.category[0].coding[0].display, "Drug or Medicament")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org.fhir/substance-category")
+        self.assertEqual(inst.code.coding[0].code, "392259005")
+        self.assertEqual(inst.code.coding[0].display, "Amoxicillin + clavulanate potassium 875mg/125mg tablet (product)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.contained[0].id, "ingr1")
+        self.assertEqual(inst.contained[1].id, "ingr2")
+        self.assertEqual(inst.description, "Augmentin 875")
+        self.assertEqual(inst.id, "f205")
+        self.assertEqual(inst.ingredient[0].quantity.denominator.code, "mg")
+        self.assertEqual(inst.ingredient[0].quantity.denominator.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.ingredient[0].quantity.denominator.unit, "mg")
+        self.assertEqual(inst.ingredient[0].quantity.denominator.value, 1000)
+        self.assertEqual(inst.ingredient[0].quantity.numerator.code, "mg")
+        self.assertEqual(inst.ingredient[0].quantity.numerator.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.ingredient[0].quantity.numerator.unit, "mg")
+        self.assertEqual(inst.ingredient[0].quantity.numerator.value, 875)
+        self.assertEqual(inst.ingredient[1].quantity.denominator.code, "mg")
+        self.assertEqual(inst.ingredient[1].quantity.denominator.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.ingredient[1].quantity.denominator.unit, "mg")
+        self.assertEqual(inst.ingredient[1].quantity.denominator.value, 1000)
+        self.assertEqual(inst.ingredient[1].quantity.numerator.code, "mg")
+        self.assertEqual(inst.ingredient[1].quantity.numerator.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.ingredient[1].quantity.numerator.unit, "mg")
+        self.assertEqual(inst.ingredient[1].quantity.numerator.value, 125)
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSubstance2(self):
+        inst = self.instantiate_from("substance-example-f201-dust.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Substance instance")
+        self.implSubstance2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Substance", js["resourceType"])
+        inst2 = substance.Substance(js)
+        self.implSubstance2(inst2)
+    
+    def implSubstance2(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "406466009")
+        self.assertEqual(inst.code.coding[0].display, "House dust allergen")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f201")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSubstance3(self):
+        inst = self.instantiate_from("substance-example-f202-staphylococcus.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Substance instance")
+        self.implSubstance3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Substance", js["resourceType"])
+        inst2 = substance.Substance(js)
+        self.implSubstance3(inst2)
+    
+    def implSubstance3(self, inst):
+        self.assertEqual(inst.code.coding[0].code, "3092008")
+        self.assertEqual(inst.code.coding[0].display, "Staphylococcus Aureus")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f202")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSubstance4(self):
+        inst = self.instantiate_from("substance-example-f203-potassium.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Substance instance")
+        self.implSubstance4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Substance", js["resourceType"])
+        inst2 = substance.Substance(js)
+        self.implSubstance4(inst2)
+    
+    def implSubstance4(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "chemical")
+        self.assertEqual(inst.category[0].coding[0].display, "Chemical")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org.fhir/substance-category")
+        self.assertEqual(inst.code.coding[0].code, "88480006")
+        self.assertEqual(inst.code.coding[0].display, "Potassium")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.id, "f203")
+        self.assertEqual(inst.identifier[0].system, "http://acme.org/identifiers/substances")
+        self.assertEqual(inst.identifier[0].value, "1234")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSubstance5(self):
+        inst = self.instantiate_from("substance-example-silver-nitrate-product.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Substance instance")
+        self.implSubstance5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Substance", js["resourceType"])
+        inst2 = substance.Substance(js)
+        self.implSubstance5(inst2)
+    
+    def implSubstance5(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "chemical")
+        self.assertEqual(inst.category[0].coding[0].display, "Chemical")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org.fhir/substance-category")
+        self.assertEqual(inst.code.coding[0].code, "333346007")
+        self.assertEqual(inst.code.coding[0].display, "Silver nitrate 20% solution (product)")
+        self.assertEqual(inst.code.coding[0].system, "http://snomed.info/sct")
+        self.assertEqual(inst.description, "Solution for silver nitrate stain")
+        self.assertEqual(inst.id, "f204")
+        self.assertEqual(inst.identifier[0].system, "http://acme.org/identifiers/substances")
+        self.assertEqual(inst.identifier[0].value, "15970")
+        self.assertEqual(inst.instance[0].expiry.date, FHIRDate("2018-01-01").date)
+        self.assertEqual(inst.instance[0].expiry.as_json(), "2018-01-01")
+        self.assertEqual(inst.instance[0].identifier.system, "http://acme.org/identifiers/substances/lot")
+        self.assertEqual(inst.instance[0].identifier.value, "AB94687")
+        self.assertEqual(inst.instance[0].quantity.code, "mL")
+        self.assertEqual(inst.instance[0].quantity.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.instance[0].quantity.unit, "mL")
+        self.assertEqual(inst.instance[0].quantity.value, 100)
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSubstance6(self):
+        inst = self.instantiate_from("substance-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Substance instance")
+        self.implSubstance6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Substance", js["resourceType"])
+        inst2 = substance.Substance(js)
+        self.implSubstance6(inst2)
+    
+    def implSubstance6(self, inst):
+        self.assertEqual(inst.category[0].coding[0].code, "allergen")
+        self.assertEqual(inst.category[0].coding[0].display, "Allergen")
+        self.assertEqual(inst.category[0].coding[0].system, "http://hl7.org.fhir/substance-category")
+        self.assertEqual(inst.code.text, "apitoxin (Honey Bee Venom)")
+        self.assertEqual(inst.id, "example")
+        self.assertEqual(inst.identifier[0].system, "http://acme.org/identifiers/substances")
+        self.assertEqual(inst.identifier[0].value, "1463")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/supplydelivery.py b/fhirclient/models/supplydelivery.py
new file mode 100644
index 0000000..16ffc27
--- /dev/null
+++ b/fhirclient/models/supplydelivery.py
@@ -0,0 +1,170 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/SupplyDelivery) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class SupplyDelivery(domainresource.DomainResource):
+    """ Delivery of bulk Supplies.
+    
+    Record of delivery of what is supplied.
+    """
+    
+    resource_type = "SupplyDelivery"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.basedOn = None
+        """ Fulfills plan, proposal or order.
+        List of `FHIRReference` items referencing `SupplyRequest` (represented as `dict` in JSON). """
+        
+        self.destination = None
+        """ Where the Supply was sent.
+        Type `FHIRReference` referencing `Location` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ External identifier.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.occurrenceDateTime = None
+        """ When event occurred.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.occurrencePeriod = None
+        """ When event occurred.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.occurrenceTiming = None
+        """ When event occurred.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Part of referenced event.
+        List of `FHIRReference` items referencing `SupplyDelivery, Contract` (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ Patient for whom the item is supplied.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.receiver = None
+        """ Who collected the Supply.
+        List of `FHIRReference` items referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ in-progress | completed | abandoned | entered-in-error.
+        Type `str`. """
+        
+        self.suppliedItem = None
+        """ The item that is delivered or supplied.
+        Type `SupplyDeliverySuppliedItem` (represented as `dict` in JSON). """
+        
+        self.supplier = None
+        """ Dispenser.
+        Type `FHIRReference` referencing `Practitioner, Organization` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ Category of dispense event.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(SupplyDelivery, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SupplyDelivery, self).elementProperties()
+        js.extend([
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("destination", "destination", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("occurrenceDateTime", "occurrenceDateTime", fhirdate.FHIRDate, False, "occurrence", False),
+            ("occurrencePeriod", "occurrencePeriod", period.Period, False, "occurrence", False),
+            ("occurrenceTiming", "occurrenceTiming", timing.Timing, False, "occurrence", False),
+            ("partOf", "partOf", fhirreference.FHIRReference, True, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, False),
+            ("receiver", "receiver", fhirreference.FHIRReference, True, None, False),
+            ("status", "status", str, False, None, False),
+            ("suppliedItem", "suppliedItem", SupplyDeliverySuppliedItem, False, None, False),
+            ("supplier", "supplier", fhirreference.FHIRReference, False, None, False),
+            ("type", "type", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class SupplyDeliverySuppliedItem(backboneelement.BackboneElement):
+    """ The item that is delivered or supplied.
+    
+    The item that is being delivered or has been supplied.
+    """
+    
+    resource_type = "SupplyDeliverySuppliedItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.itemCodeableConcept = None
+        """ Medication, Substance, or Device supplied.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.itemReference = None
+        """ Medication, Substance, or Device supplied.
+        Type `FHIRReference` referencing `Medication, Substance, Device` (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ Amount dispensed.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        super(SupplyDeliverySuppliedItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SupplyDeliverySuppliedItem, self).elementProperties()
+        js.extend([
+            ("itemCodeableConcept", "itemCodeableConcept", codeableconcept.CodeableConcept, False, "item", False),
+            ("itemReference", "itemReference", fhirreference.FHIRReference, False, "item", False),
+            ("quantity", "quantity", quantity.Quantity, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/supplydelivery_tests.py b/fhirclient/models/supplydelivery_tests.py
new file mode 100644
index 0000000..b67391f
--- /dev/null
+++ b/fhirclient/models/supplydelivery_tests.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import supplydelivery
+from .fhirdate import FHIRDate
+
+
+class SupplyDeliveryTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("SupplyDelivery", js["resourceType"])
+        return supplydelivery.SupplyDelivery(js)
+    
+    def testSupplyDelivery1(self):
+        inst = self.instantiate_from("supplydelivery-example-pumpdelivery.json")
+        self.assertIsNotNone(inst, "Must have instantiated a SupplyDelivery instance")
+        self.implSupplyDelivery1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("SupplyDelivery", js["resourceType"])
+        inst2 = supplydelivery.SupplyDelivery(js)
+        self.implSupplyDelivery1(inst2)
+    
+    def implSupplyDelivery1(self, inst):
+        self.assertEqual(inst.id, "pumpdelivery")
+        self.assertEqual(inst.identifier.value, "98398459409")
+        self.assertEqual(inst.status, "in-progress")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">[Put rendering here]</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testSupplyDelivery2(self):
+        inst = self.instantiate_from("supplydelivery-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a SupplyDelivery instance")
+        self.implSupplyDelivery2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("SupplyDelivery", js["resourceType"])
+        inst2 = supplydelivery.SupplyDelivery(js)
+        self.implSupplyDelivery2(inst2)
+    
+    def implSupplyDelivery2(self, inst):
+        self.assertEqual(inst.id, "simpledelivery")
+        self.assertEqual(inst.identifier.value, "Order10284")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2016-12-31").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2016-12-31")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.suppliedItem.itemCodeableConcept.coding[0].code, "BlueTubes")
+        self.assertEqual(inst.suppliedItem.itemCodeableConcept.coding[0].display, "Blood collect tubes blue cap")
+        self.assertEqual(inst.suppliedItem.quantity.value, 10)
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.type.coding[0].code, "device")
+        self.assertEqual(inst.type.coding[0].system, "http://hl7.org/fhir/supply-item-type")
+        self.assertEqual(inst.type.text, "Blood collect tubes blue cap")
+
diff --git a/fhirclient/models/supplyrequest.py b/fhirclient/models/supplyrequest.py
new file mode 100644
index 0000000..a604908
--- /dev/null
+++ b/fhirclient/models/supplyrequest.py
@@ -0,0 +1,215 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/SupplyRequest) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class SupplyRequest(domainresource.DomainResource):
+    """ Request for a medication, substance or device.
+    
+    A record of a request for a medication, substance or device used in the
+    healthcare setting.
+    """
+    
+    resource_type = "SupplyRequest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authoredOn = None
+        """ When the request was made.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.category = None
+        """ The kind of supply (central, non-stock, etc.).
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.deliverFrom = None
+        """ The origin of the supply.
+        Type `FHIRReference` referencing `Organization, Location` (represented as `dict` in JSON). """
+        
+        self.deliverTo = None
+        """ The destination of the supply.
+        Type `FHIRReference` referencing `Organization, Location, Patient` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Unique identifier.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.occurrenceDateTime = None
+        """ When the request should be fulfilled.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.occurrencePeriod = None
+        """ When the request should be fulfilled.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.occurrenceTiming = None
+        """ When the request should be fulfilled.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.orderedItem = None
+        """ The item being requested.
+        Type `SupplyRequestOrderedItem` (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ routine | urgent | asap | stat.
+        Type `str`. """
+        
+        self.reasonCodeableConcept = None
+        """ Why the supply item was requested.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Why the supply item was requested.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.requester = None
+        """ Who/what is requesting service.
+        Type `SupplyRequestRequester` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | suspended +.
+        Type `str`. """
+        
+        self.supplier = None
+        """ Who is intended to fulfill the request.
+        List of `FHIRReference` items referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(SupplyRequest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SupplyRequest, self).elementProperties()
+        js.extend([
+            ("authoredOn", "authoredOn", fhirdate.FHIRDate, False, None, False),
+            ("category", "category", codeableconcept.CodeableConcept, False, None, False),
+            ("deliverFrom", "deliverFrom", fhirreference.FHIRReference, False, None, False),
+            ("deliverTo", "deliverTo", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("occurrenceDateTime", "occurrenceDateTime", fhirdate.FHIRDate, False, "occurrence", False),
+            ("occurrencePeriod", "occurrencePeriod", period.Period, False, "occurrence", False),
+            ("occurrenceTiming", "occurrenceTiming", timing.Timing, False, "occurrence", False),
+            ("orderedItem", "orderedItem", SupplyRequestOrderedItem, False, None, False),
+            ("priority", "priority", str, False, None, False),
+            ("reasonCodeableConcept", "reasonCodeableConcept", codeableconcept.CodeableConcept, False, "reason", False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, False, "reason", False),
+            ("requester", "requester", SupplyRequestRequester, False, None, False),
+            ("status", "status", str, False, None, False),
+            ("supplier", "supplier", fhirreference.FHIRReference, True, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class SupplyRequestOrderedItem(backboneelement.BackboneElement):
+    """ The item being requested.
+    """
+    
+    resource_type = "SupplyRequestOrderedItem"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.itemCodeableConcept = None
+        """ Medication, Substance, or Device requested to be supplied.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.itemReference = None
+        """ Medication, Substance, or Device requested to be supplied.
+        Type `FHIRReference` referencing `Medication, Substance, Device` (represented as `dict` in JSON). """
+        
+        self.quantity = None
+        """ The requested amount of the item indicated.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        super(SupplyRequestOrderedItem, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SupplyRequestOrderedItem, self).elementProperties()
+        js.extend([
+            ("itemCodeableConcept", "itemCodeableConcept", codeableconcept.CodeableConcept, False, "item", False),
+            ("itemReference", "itemReference", fhirreference.FHIRReference, False, "item", False),
+            ("quantity", "quantity", quantity.Quantity, False, None, True),
+        ])
+        return js
+
+
+class SupplyRequestRequester(backboneelement.BackboneElement):
+    """ Who/what is requesting service.
+    
+    The individual who initiated the request and has responsibility for its
+    activation.
+    """
+    
+    resource_type = "SupplyRequestRequester"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.agent = None
+        """ Individual making the request.
+        Type `FHIRReference` referencing `Practitioner, Organization, Patient, RelatedPerson, Device` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization agent is acting for.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(SupplyRequestRequester, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(SupplyRequestRequester, self).elementProperties()
+        js.extend([
+            ("agent", "agent", fhirreference.FHIRReference, False, None, True),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/supplyrequest_tests.py b/fhirclient/models/supplyrequest_tests.py
new file mode 100644
index 0000000..c53fd71
--- /dev/null
+++ b/fhirclient/models/supplyrequest_tests.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import supplyrequest
+from .fhirdate import FHIRDate
+
+
+class SupplyRequestTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("SupplyRequest", js["resourceType"])
+        return supplyrequest.SupplyRequest(js)
+    
+    def testSupplyRequest1(self):
+        inst = self.instantiate_from("supplyrequest-example-simpleorder.json")
+        self.assertIsNotNone(inst, "Must have instantiated a SupplyRequest instance")
+        self.implSupplyRequest1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("SupplyRequest", js["resourceType"])
+        inst2 = supplyrequest.SupplyRequest(js)
+        self.implSupplyRequest1(inst2)
+    
+    def implSupplyRequest1(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2016-12-31").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2016-12-31")
+        self.assertEqual(inst.category.coding[0].code, "central")
+        self.assertEqual(inst.category.coding[0].display, "Central Stock Resupply")
+        self.assertEqual(inst.id, "simpleorder")
+        self.assertEqual(inst.identifier.value, "Order10284")
+        self.assertEqual(inst.occurrenceDateTime.date, FHIRDate("2016-12-31").date)
+        self.assertEqual(inst.occurrenceDateTime.as_json(), "2016-12-31")
+        self.assertEqual(inst.orderedItem.itemCodeableConcept.coding[0].code, "BlueTubes")
+        self.assertEqual(inst.orderedItem.itemCodeableConcept.coding[0].display, "Blood collect tubes blue cap")
+        self.assertEqual(inst.orderedItem.quantity.value, 10)
+        self.assertEqual(inst.priority, "asap")
+        self.assertEqual(inst.reasonCodeableConcept.coding[0].code, "stock_low")
+        self.assertEqual(inst.reasonCodeableConcept.coding[0].display, "Refill due to low stock")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/task.py b/fhirclient/models/task.py
new file mode 100644
index 0000000..8197963
--- /dev/null
+++ b/fhirclient/models/task.py
@@ -0,0 +1,785 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Task) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class Task(domainresource.DomainResource):
+    """ A task to be performed.
+    """
+    
+    resource_type = "Task"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.authoredOn = None
+        """ Task Creation Date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.basedOn = None
+        """ Request fulfilled by this task.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.businessStatus = None
+        """ E.g. "Specimen collected", "IV prepped".
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.code = None
+        """ Task Type.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.context = None
+        """ Healthcare event during which this task originated.
+        Type `FHIRReference` referencing `Encounter, EpisodeOfCare` (represented as `dict` in JSON). """
+        
+        self.definitionReference = None
+        """ Formal definition of task.
+        Type `FHIRReference` referencing `ActivityDefinition` (represented as `dict` in JSON). """
+        
+        self.definitionUri = None
+        """ Formal definition of task.
+        Type `str`. """
+        
+        self.description = None
+        """ Human-readable explanation of task.
+        Type `str`. """
+        
+        self.executionPeriod = None
+        """ Start and end time of execution.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.focus = None
+        """ What task is acting on.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.for_fhir = None
+        """ Beneficiary of the Task.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.groupIdentifier = None
+        """ Requisition or grouper id.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Task Instance Identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.input = None
+        """ Information used to perform task.
+        List of `TaskInput` items (represented as `dict` in JSON). """
+        
+        self.intent = None
+        """ proposal | plan | order +.
+        Type `str`. """
+        
+        self.lastModified = None
+        """ Task Last Modified Date.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.note = None
+        """ Comments made about the task.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.output = None
+        """ Information produced as part of task.
+        List of `TaskOutput` items (represented as `dict` in JSON). """
+        
+        self.owner = None
+        """ Responsible individual.
+        Type `FHIRReference` referencing `Device, Organization, Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.partOf = None
+        """ Composite task.
+        List of `FHIRReference` items referencing `Task` (represented as `dict` in JSON). """
+        
+        self.performerType = None
+        """ requester | dispatcher | scheduler | performer | monitor | manager
+        | acquirer | reviewer.
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.priority = None
+        """ normal | urgent | asap | stat.
+        Type `str`. """
+        
+        self.reason = None
+        """ Why task is needed.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.relevantHistory = None
+        """ Key events in history of the Task.
+        List of `FHIRReference` items referencing `Provenance` (represented as `dict` in JSON). """
+        
+        self.requester = None
+        """ Who is asking for task to be done.
+        Type `TaskRequester` (represented as `dict` in JSON). """
+        
+        self.restriction = None
+        """ Constraints on fulfillment tasks.
+        Type `TaskRestriction` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | requested | received | accepted | +.
+        Type `str`. """
+        
+        self.statusReason = None
+        """ Reason for current status.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        super(Task, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Task, self).elementProperties()
+        js.extend([
+            ("authoredOn", "authoredOn", fhirdate.FHIRDate, False, None, False),
+            ("basedOn", "basedOn", fhirreference.FHIRReference, True, None, False),
+            ("businessStatus", "businessStatus", codeableconcept.CodeableConcept, False, None, False),
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("context", "context", fhirreference.FHIRReference, False, None, False),
+            ("definitionReference", "definitionReference", fhirreference.FHIRReference, False, "definition", False),
+            ("definitionUri", "definitionUri", str, False, "definition", False),
+            ("description", "description", str, False, None, False),
+            ("executionPeriod", "executionPeriod", period.Period, False, None, False),
+            ("focus", "focus", fhirreference.FHIRReference, False, None, False),
+            ("for_fhir", "for", fhirreference.FHIRReference, False, None, False),
+            ("groupIdentifier", "groupIdentifier", identifier.Identifier, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("input", "input", TaskInput, True, None, False),
+            ("intent", "intent", str, False, None, True),
+            ("lastModified", "lastModified", fhirdate.FHIRDate, False, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("output", "output", TaskOutput, True, None, False),
+            ("owner", "owner", fhirreference.FHIRReference, False, None, False),
+            ("partOf", "partOf", fhirreference.FHIRReference, True, None, False),
+            ("performerType", "performerType", codeableconcept.CodeableConcept, True, None, False),
+            ("priority", "priority", str, False, None, False),
+            ("reason", "reason", codeableconcept.CodeableConcept, False, None, False),
+            ("relevantHistory", "relevantHistory", fhirreference.FHIRReference, True, None, False),
+            ("requester", "requester", TaskRequester, False, None, False),
+            ("restriction", "restriction", TaskRestriction, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("statusReason", "statusReason", codeableconcept.CodeableConcept, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class TaskInput(backboneelement.BackboneElement):
+    """ Information used to perform task.
+    
+    Additional information that may be needed in the execution of the task.
+    """
+    
+    resource_type = "TaskInput"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.type = None
+        """ Label for the input.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueAddress = None
+        """ Content to use in performing the task.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.valueAge = None
+        """ Content to use in performing the task.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.valueAnnotation = None
+        """ Content to use in performing the task.
+        Type `Annotation` (represented as `dict` in JSON). """
+        
+        self.valueAttachment = None
+        """ Content to use in performing the task.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.valueBase64Binary = None
+        """ Content to use in performing the task.
+        Type `str`. """
+        
+        self.valueBoolean = None
+        """ Content to use in performing the task.
+        Type `bool`. """
+        
+        self.valueCode = None
+        """ Content to use in performing the task.
+        Type `str`. """
+        
+        self.valueCodeableConcept = None
+        """ Content to use in performing the task.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueCoding = None
+        """ Content to use in performing the task.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.valueContactPoint = None
+        """ Content to use in performing the task.
+        Type `ContactPoint` (represented as `dict` in JSON). """
+        
+        self.valueCount = None
+        """ Content to use in performing the task.
+        Type `Count` (represented as `dict` in JSON). """
+        
+        self.valueDate = None
+        """ Content to use in performing the task.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDateTime = None
+        """ Content to use in performing the task.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDecimal = None
+        """ Content to use in performing the task.
+        Type `float`. """
+        
+        self.valueDistance = None
+        """ Content to use in performing the task.
+        Type `Distance` (represented as `dict` in JSON). """
+        
+        self.valueDuration = None
+        """ Content to use in performing the task.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.valueHumanName = None
+        """ Content to use in performing the task.
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.valueId = None
+        """ Content to use in performing the task.
+        Type `str`. """
+        
+        self.valueIdentifier = None
+        """ Content to use in performing the task.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.valueInstant = None
+        """ Content to use in performing the task.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueInteger = None
+        """ Content to use in performing the task.
+        Type `int`. """
+        
+        self.valueMarkdown = None
+        """ Content to use in performing the task.
+        Type `str`. """
+        
+        self.valueMeta = None
+        """ Content to use in performing the task.
+        Type `Meta` (represented as `dict` in JSON). """
+        
+        self.valueMoney = None
+        """ Content to use in performing the task.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.valueOid = None
+        """ Content to use in performing the task.
+        Type `str`. """
+        
+        self.valuePeriod = None
+        """ Content to use in performing the task.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.valuePositiveInt = None
+        """ Content to use in performing the task.
+        Type `int`. """
+        
+        self.valueQuantity = None
+        """ Content to use in performing the task.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueRange = None
+        """ Content to use in performing the task.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.valueRatio = None
+        """ Content to use in performing the task.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.valueReference = None
+        """ Content to use in performing the task.
+        Type `FHIRReference` (represented as `dict` in JSON). """
+        
+        self.valueSampledData = None
+        """ Content to use in performing the task.
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.valueSignature = None
+        """ Content to use in performing the task.
+        Type `Signature` (represented as `dict` in JSON). """
+        
+        self.valueString = None
+        """ Content to use in performing the task.
+        Type `str`. """
+        
+        self.valueTime = None
+        """ Content to use in performing the task.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueTiming = None
+        """ Content to use in performing the task.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.valueUnsignedInt = None
+        """ Content to use in performing the task.
+        Type `int`. """
+        
+        self.valueUri = None
+        """ Content to use in performing the task.
+        Type `str`. """
+        
+        super(TaskInput, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TaskInput, self).elementProperties()
+        js.extend([
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+            ("valueAddress", "valueAddress", address.Address, False, "value", True),
+            ("valueAge", "valueAge", age.Age, False, "value", True),
+            ("valueAnnotation", "valueAnnotation", annotation.Annotation, False, "value", True),
+            ("valueAttachment", "valueAttachment", attachment.Attachment, False, "value", True),
+            ("valueBase64Binary", "valueBase64Binary", str, False, "value", True),
+            ("valueBoolean", "valueBoolean", bool, False, "value", True),
+            ("valueCode", "valueCode", str, False, "value", True),
+            ("valueCodeableConcept", "valueCodeableConcept", codeableconcept.CodeableConcept, False, "value", True),
+            ("valueCoding", "valueCoding", coding.Coding, False, "value", True),
+            ("valueContactPoint", "valueContactPoint", contactpoint.ContactPoint, False, "value", True),
+            ("valueCount", "valueCount", count.Count, False, "value", True),
+            ("valueDate", "valueDate", fhirdate.FHIRDate, False, "value", True),
+            ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", True),
+            ("valueDecimal", "valueDecimal", float, False, "value", True),
+            ("valueDistance", "valueDistance", distance.Distance, False, "value", True),
+            ("valueDuration", "valueDuration", duration.Duration, False, "value", True),
+            ("valueHumanName", "valueHumanName", humanname.HumanName, False, "value", True),
+            ("valueId", "valueId", str, False, "value", True),
+            ("valueIdentifier", "valueIdentifier", identifier.Identifier, False, "value", True),
+            ("valueInstant", "valueInstant", fhirdate.FHIRDate, False, "value", True),
+            ("valueInteger", "valueInteger", int, False, "value", True),
+            ("valueMarkdown", "valueMarkdown", str, False, "value", True),
+            ("valueMeta", "valueMeta", meta.Meta, False, "value", True),
+            ("valueMoney", "valueMoney", money.Money, False, "value", True),
+            ("valueOid", "valueOid", str, False, "value", True),
+            ("valuePeriod", "valuePeriod", period.Period, False, "value", True),
+            ("valuePositiveInt", "valuePositiveInt", int, False, "value", True),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", True),
+            ("valueRange", "valueRange", range.Range, False, "value", True),
+            ("valueRatio", "valueRatio", ratio.Ratio, False, "value", True),
+            ("valueReference", "valueReference", fhirreference.FHIRReference, False, "value", True),
+            ("valueSampledData", "valueSampledData", sampleddata.SampledData, False, "value", True),
+            ("valueSignature", "valueSignature", signature.Signature, False, "value", True),
+            ("valueString", "valueString", str, False, "value", True),
+            ("valueTime", "valueTime", fhirdate.FHIRDate, False, "value", True),
+            ("valueTiming", "valueTiming", timing.Timing, False, "value", True),
+            ("valueUnsignedInt", "valueUnsignedInt", int, False, "value", True),
+            ("valueUri", "valueUri", str, False, "value", True),
+        ])
+        return js
+
+
+class TaskOutput(backboneelement.BackboneElement):
+    """ Information produced as part of task.
+    
+    Outputs produced by the Task.
+    """
+    
+    resource_type = "TaskOutput"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.type = None
+        """ Label for output.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueAddress = None
+        """ Result of output.
+        Type `Address` (represented as `dict` in JSON). """
+        
+        self.valueAge = None
+        """ Result of output.
+        Type `Age` (represented as `dict` in JSON). """
+        
+        self.valueAnnotation = None
+        """ Result of output.
+        Type `Annotation` (represented as `dict` in JSON). """
+        
+        self.valueAttachment = None
+        """ Result of output.
+        Type `Attachment` (represented as `dict` in JSON). """
+        
+        self.valueBase64Binary = None
+        """ Result of output.
+        Type `str`. """
+        
+        self.valueBoolean = None
+        """ Result of output.
+        Type `bool`. """
+        
+        self.valueCode = None
+        """ Result of output.
+        Type `str`. """
+        
+        self.valueCodeableConcept = None
+        """ Result of output.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueCoding = None
+        """ Result of output.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.valueContactPoint = None
+        """ Result of output.
+        Type `ContactPoint` (represented as `dict` in JSON). """
+        
+        self.valueCount = None
+        """ Result of output.
+        Type `Count` (represented as `dict` in JSON). """
+        
+        self.valueDate = None
+        """ Result of output.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDateTime = None
+        """ Result of output.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueDecimal = None
+        """ Result of output.
+        Type `float`. """
+        
+        self.valueDistance = None
+        """ Result of output.
+        Type `Distance` (represented as `dict` in JSON). """
+        
+        self.valueDuration = None
+        """ Result of output.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.valueHumanName = None
+        """ Result of output.
+        Type `HumanName` (represented as `dict` in JSON). """
+        
+        self.valueId = None
+        """ Result of output.
+        Type `str`. """
+        
+        self.valueIdentifier = None
+        """ Result of output.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.valueInstant = None
+        """ Result of output.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueInteger = None
+        """ Result of output.
+        Type `int`. """
+        
+        self.valueMarkdown = None
+        """ Result of output.
+        Type `str`. """
+        
+        self.valueMeta = None
+        """ Result of output.
+        Type `Meta` (represented as `dict` in JSON). """
+        
+        self.valueMoney = None
+        """ Result of output.
+        Type `Money` (represented as `dict` in JSON). """
+        
+        self.valueOid = None
+        """ Result of output.
+        Type `str`. """
+        
+        self.valuePeriod = None
+        """ Result of output.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.valuePositiveInt = None
+        """ Result of output.
+        Type `int`. """
+        
+        self.valueQuantity = None
+        """ Result of output.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueRange = None
+        """ Result of output.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.valueRatio = None
+        """ Result of output.
+        Type `Ratio` (represented as `dict` in JSON). """
+        
+        self.valueReference = None
+        """ Result of output.
+        Type `FHIRReference` (represented as `dict` in JSON). """
+        
+        self.valueSampledData = None
+        """ Result of output.
+        Type `SampledData` (represented as `dict` in JSON). """
+        
+        self.valueSignature = None
+        """ Result of output.
+        Type `Signature` (represented as `dict` in JSON). """
+        
+        self.valueString = None
+        """ Result of output.
+        Type `str`. """
+        
+        self.valueTime = None
+        """ Result of output.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.valueTiming = None
+        """ Result of output.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.valueUnsignedInt = None
+        """ Result of output.
+        Type `int`. """
+        
+        self.valueUri = None
+        """ Result of output.
+        Type `str`. """
+        
+        super(TaskOutput, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TaskOutput, self).elementProperties()
+        js.extend([
+            ("type", "type", codeableconcept.CodeableConcept, False, None, True),
+            ("valueAddress", "valueAddress", address.Address, False, "value", True),
+            ("valueAge", "valueAge", age.Age, False, "value", True),
+            ("valueAnnotation", "valueAnnotation", annotation.Annotation, False, "value", True),
+            ("valueAttachment", "valueAttachment", attachment.Attachment, False, "value", True),
+            ("valueBase64Binary", "valueBase64Binary", str, False, "value", True),
+            ("valueBoolean", "valueBoolean", bool, False, "value", True),
+            ("valueCode", "valueCode", str, False, "value", True),
+            ("valueCodeableConcept", "valueCodeableConcept", codeableconcept.CodeableConcept, False, "value", True),
+            ("valueCoding", "valueCoding", coding.Coding, False, "value", True),
+            ("valueContactPoint", "valueContactPoint", contactpoint.ContactPoint, False, "value", True),
+            ("valueCount", "valueCount", count.Count, False, "value", True),
+            ("valueDate", "valueDate", fhirdate.FHIRDate, False, "value", True),
+            ("valueDateTime", "valueDateTime", fhirdate.FHIRDate, False, "value", True),
+            ("valueDecimal", "valueDecimal", float, False, "value", True),
+            ("valueDistance", "valueDistance", distance.Distance, False, "value", True),
+            ("valueDuration", "valueDuration", duration.Duration, False, "value", True),
+            ("valueHumanName", "valueHumanName", humanname.HumanName, False, "value", True),
+            ("valueId", "valueId", str, False, "value", True),
+            ("valueIdentifier", "valueIdentifier", identifier.Identifier, False, "value", True),
+            ("valueInstant", "valueInstant", fhirdate.FHIRDate, False, "value", True),
+            ("valueInteger", "valueInteger", int, False, "value", True),
+            ("valueMarkdown", "valueMarkdown", str, False, "value", True),
+            ("valueMeta", "valueMeta", meta.Meta, False, "value", True),
+            ("valueMoney", "valueMoney", money.Money, False, "value", True),
+            ("valueOid", "valueOid", str, False, "value", True),
+            ("valuePeriod", "valuePeriod", period.Period, False, "value", True),
+            ("valuePositiveInt", "valuePositiveInt", int, False, "value", True),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", True),
+            ("valueRange", "valueRange", range.Range, False, "value", True),
+            ("valueRatio", "valueRatio", ratio.Ratio, False, "value", True),
+            ("valueReference", "valueReference", fhirreference.FHIRReference, False, "value", True),
+            ("valueSampledData", "valueSampledData", sampleddata.SampledData, False, "value", True),
+            ("valueSignature", "valueSignature", signature.Signature, False, "value", True),
+            ("valueString", "valueString", str, False, "value", True),
+            ("valueTime", "valueTime", fhirdate.FHIRDate, False, "value", True),
+            ("valueTiming", "valueTiming", timing.Timing, False, "value", True),
+            ("valueUnsignedInt", "valueUnsignedInt", int, False, "value", True),
+            ("valueUri", "valueUri", str, False, "value", True),
+        ])
+        return js
+
+
+class TaskRequester(backboneelement.BackboneElement):
+    """ Who is asking for task to be done.
+    
+    The creator of the task.
+    """
+    
+    resource_type = "TaskRequester"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.agent = None
+        """ Individual asking for task.
+        Type `FHIRReference` referencing `Device, Organization, Patient, Practitioner, RelatedPerson` (represented as `dict` in JSON). """
+        
+        self.onBehalfOf = None
+        """ Organization individual is acting for.
+        Type `FHIRReference` referencing `Organization` (represented as `dict` in JSON). """
+        
+        super(TaskRequester, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TaskRequester, self).elementProperties()
+        js.extend([
+            ("agent", "agent", fhirreference.FHIRReference, False, None, True),
+            ("onBehalfOf", "onBehalfOf", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+class TaskRestriction(backboneelement.BackboneElement):
+    """ Constraints on fulfillment tasks.
+    
+    If the Task.focus is a request resource and the task is seeking fulfillment
+    (i.e is asking for the request to be actioned), this element identifies any
+    limitations on what parts of the referenced request should be actioned.
+    """
+    
+    resource_type = "TaskRestriction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.period = None
+        """ When fulfillment sought.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.recipient = None
+        """ For whom is fulfillment sought?.
+        List of `FHIRReference` items referencing `Patient, Practitioner, RelatedPerson, Group, Organization` (represented as `dict` in JSON). """
+        
+        self.repetitions = None
+        """ How many times to repeat.
+        Type `int`. """
+        
+        super(TaskRestriction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TaskRestriction, self).elementProperties()
+        js.extend([
+            ("period", "period", period.Period, False, None, False),
+            ("recipient", "recipient", fhirreference.FHIRReference, True, None, False),
+            ("repetitions", "repetitions", int, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import address
+except ImportError:
+    address = sys.modules[__package__ + '.address']
+try:
+    from . import age
+except ImportError:
+    age = sys.modules[__package__ + '.age']
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import attachment
+except ImportError:
+    attachment = sys.modules[__package__ + '.attachment']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactpoint
+except ImportError:
+    contactpoint = sys.modules[__package__ + '.contactpoint']
+try:
+    from . import count
+except ImportError:
+    count = sys.modules[__package__ + '.count']
+try:
+    from . import distance
+except ImportError:
+    distance = sys.modules[__package__ + '.distance']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import humanname
+except ImportError:
+    humanname = sys.modules[__package__ + '.humanname']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import meta
+except ImportError:
+    meta = sys.modules[__package__ + '.meta']
+try:
+    from . import money
+except ImportError:
+    money = sys.modules[__package__ + '.money']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
+try:
+    from . import ratio
+except ImportError:
+    ratio = sys.modules[__package__ + '.ratio']
+try:
+    from . import sampleddata
+except ImportError:
+    sampleddata = sys.modules[__package__ + '.sampleddata']
+try:
+    from . import signature
+except ImportError:
+    signature = sys.modules[__package__ + '.signature']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/task_tests.py b/fhirclient/models/task_tests.py
new file mode 100644
index 0000000..f2db2e3
--- /dev/null
+++ b/fhirclient/models/task_tests.py
@@ -0,0 +1,248 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import task
+from .fhirdate import FHIRDate
+
+
+class TaskTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("Task", js["resourceType"])
+        return task.Task(js)
+    
+    def testTask1(self):
+        inst = self.instantiate_from("task-example1.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Task instance")
+        self.implTask1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Task", js["resourceType"])
+        inst2 = task.Task(js)
+        self.implTask1(inst2)
+    
+    def implTask1(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2016-10-31T08:25:05+10:00").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2016-10-31T08:25:05+10:00")
+        self.assertEqual(inst.businessStatus.text, "waiting for specimen")
+        self.assertEqual(inst.code.text, "Lipid Panel")
+        self.assertEqual(inst.contained[0].id, "signature")
+        self.assertEqual(inst.description, "Create order for getting specimen, Set up inhouse testing,  generate order for any sendouts and submit with specimen")
+        self.assertEqual(inst.executionPeriod.start.date, FHIRDate("2016-10-31T08:25:05+10:00").date)
+        self.assertEqual(inst.executionPeriod.start.as_json(), "2016-10-31T08:25:05+10:00")
+        self.assertEqual(inst.groupIdentifier.system, "http:/goodhealth.org/accession/identifiers")
+        self.assertEqual(inst.groupIdentifier.use, "official")
+        self.assertEqual(inst.groupIdentifier.value, "G20170201-001")
+        self.assertEqual(inst.id, "example1")
+        self.assertEqual(inst.identifier[0].system, "http:/goodhealth.org/identifiers")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "20170201-001")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.lastModified.date, FHIRDate("2016-10-31T09:45:05+10:00").date)
+        self.assertEqual(inst.lastModified.as_json(), "2016-10-31T09:45:05+10:00")
+        self.assertEqual(inst.performerType[0].coding[0].code, "performer")
+        self.assertEqual(inst.performerType[0].coding[0].display, "Performer")
+        self.assertEqual(inst.performerType[0].coding[0].system, "http://hl7.org/fhir/task-performer-type")
+        self.assertEqual(inst.performerType[0].text, "Performer")
+        self.assertEqual(inst.priority, "routine")
+        self.assertEqual(inst.reason.text, "The Task.reason should only be included if there is no Task.focus or if it differs from the reason indicated on the focus")
+        self.assertEqual(inst.restriction.period.end.date, FHIRDate("2016-11-02T09:45:05+10:00").date)
+        self.assertEqual(inst.restriction.period.end.as_json(), "2016-11-02T09:45:05+10:00")
+        self.assertEqual(inst.restriction.repetitions, 1)
+        self.assertEqual(inst.status, "in-progress")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testTask2(self):
+        inst = self.instantiate_from("task-example2.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Task instance")
+        self.implTask2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Task", js["resourceType"])
+        inst2 = task.Task(js)
+        self.implTask2(inst2)
+    
+    def implTask2(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2016-10-31T08:45:05+10:00").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2016-10-31T08:45:05+10:00")
+        self.assertEqual(inst.businessStatus.text, "waiting for patient")
+        self.assertEqual(inst.code.text, "Specimen Collection")
+        self.assertEqual(inst.executionPeriod.start.date, FHIRDate("2016-10-31T08:45:05+10:00").date)
+        self.assertEqual(inst.executionPeriod.start.as_json(), "2016-10-31T08:45:05+10:00")
+        self.assertEqual(inst.groupIdentifier.system, "http:/goodhealth.org/accession/identifiers")
+        self.assertEqual(inst.groupIdentifier.use, "official")
+        self.assertEqual(inst.groupIdentifier.value, "G20170201-001")
+        self.assertEqual(inst.id, "example2")
+        self.assertEqual(inst.identifier[0].system, "http:/goodhealth.org/identifiers")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "20170201-002")
+        self.assertEqual(inst.intent, "filler-order")
+        self.assertEqual(inst.lastModified.date, FHIRDate("2016-10-31T09:45:05+10:00").date)
+        self.assertEqual(inst.lastModified.as_json(), "2016-10-31T09:45:05+10:00")
+        self.assertEqual(inst.performerType[0].coding[0].code, "performer")
+        self.assertEqual(inst.performerType[0].coding[0].display, "Performer")
+        self.assertEqual(inst.performerType[0].coding[0].system, "http://hl7.org/fhir/task-performer-type")
+        self.assertEqual(inst.performerType[0].text, "Performer")
+        self.assertEqual(inst.priority, "routine")
+        self.assertEqual(inst.restriction.period.end.date, FHIRDate("2016-11-01T09:45:05+10:00").date)
+        self.assertEqual(inst.restriction.period.end.as_json(), "2016-11-01T09:45:05+10:00")
+        self.assertEqual(inst.restriction.repetitions, 1)
+        self.assertEqual(inst.status, "accepted")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testTask3(self):
+        inst = self.instantiate_from("task-example3.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Task instance")
+        self.implTask3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Task", js["resourceType"])
+        inst2 = task.Task(js)
+        self.implTask3(inst2)
+    
+    def implTask3(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2016-03-10T22:39:32-04:00").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2016-03-10T22:39:32-04:00")
+        self.assertEqual(inst.code.text, "Refill Request")
+        self.assertEqual(inst.id, "example3")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.lastModified.date, FHIRDate("2016-03-10T22:39:32-04:00").date)
+        self.assertEqual(inst.lastModified.as_json(), "2016-03-10T22:39:32-04:00")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testTask4(self):
+        inst = self.instantiate_from("task-example4.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Task instance")
+        self.implTask4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Task", js["resourceType"])
+        inst2 = task.Task(js)
+        self.implTask4(inst2)
+    
+    def implTask4(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2016-10-31T08:45:05+10:00").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2016-10-31T08:45:05+10:00")
+        self.assertEqual(inst.code.text, "Specimen Collection")
+        self.assertEqual(inst.executionPeriod.end.date, FHIRDate("2016-10-31T14:45:05+10:00").date)
+        self.assertEqual(inst.executionPeriod.end.as_json(), "2016-10-31T14:45:05+10:00")
+        self.assertEqual(inst.executionPeriod.start.date, FHIRDate("2016-10-31T08:45:05+10:00").date)
+        self.assertEqual(inst.executionPeriod.start.as_json(), "2016-10-31T08:45:05+10:00")
+        self.assertEqual(inst.groupIdentifier.system, "http:/goodhealth.org/accession/identifiers")
+        self.assertEqual(inst.groupIdentifier.use, "official")
+        self.assertEqual(inst.groupIdentifier.value, "G20170201-001")
+        self.assertEqual(inst.id, "example4")
+        self.assertEqual(inst.identifier[0].system, "http:/goodhealth.org/identifiers")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "20170201-002")
+        self.assertEqual(inst.intent, "filler-order")
+        self.assertEqual(inst.lastModified.date, FHIRDate("2016-10-31T09:45:05+10:00").date)
+        self.assertEqual(inst.lastModified.as_json(), "2016-10-31T09:45:05+10:00")
+        self.assertEqual(inst.output[0].type.text, "collected specimen")
+        self.assertEqual(inst.performerType[0].coding[0].code, "performer")
+        self.assertEqual(inst.performerType[0].coding[0].display, "Performer")
+        self.assertEqual(inst.performerType[0].coding[0].system, "http://hl7.org/fhir/task-performer-type")
+        self.assertEqual(inst.performerType[0].text, "Performer")
+        self.assertEqual(inst.priority, "routine")
+        self.assertEqual(inst.restriction.period.end.date, FHIRDate("2016-11-01T09:45:05+10:00").date)
+        self.assertEqual(inst.restriction.period.end.as_json(), "2016-11-01T09:45:05+10:00")
+        self.assertEqual(inst.restriction.repetitions, 1)
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testTask5(self):
+        inst = self.instantiate_from("task-example5.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Task instance")
+        self.implTask5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Task", js["resourceType"])
+        inst2 = task.Task(js)
+        self.implTask5(inst2)
+    
+    def implTask5(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2016-10-31T08:25:05+10:00").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2016-10-31T08:25:05+10:00")
+        self.assertEqual(inst.businessStatus.text, "specimen received, test in progress")
+        self.assertEqual(inst.code.text, "Lipid Panel")
+        self.assertEqual(inst.description, "Create order for getting specimen, Set up inhouse testing,  generate order for any sendouts and submit with specimen")
+        self.assertEqual(inst.executionPeriod.start.date, FHIRDate("2016-10-31T08:25:05+10:00").date)
+        self.assertEqual(inst.executionPeriod.start.as_json(), "2016-10-31T08:25:05+10:00")
+        self.assertEqual(inst.groupIdentifier.system, "http:/goodhealth.org/accession/identifiers")
+        self.assertEqual(inst.groupIdentifier.use, "official")
+        self.assertEqual(inst.groupIdentifier.value, "G20170201-001")
+        self.assertEqual(inst.id, "example5")
+        self.assertEqual(inst.identifier[0].system, "http:/goodhealth.org/identifiers")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "20170201-001")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.lastModified.date, FHIRDate("2016-10-31T16:45:05+10:00").date)
+        self.assertEqual(inst.lastModified.as_json(), "2016-10-31T16:45:05+10:00")
+        self.assertEqual(inst.output[0].type.text, "collected specimen")
+        self.assertEqual(inst.performerType[0].coding[0].code, "performer")
+        self.assertEqual(inst.performerType[0].coding[0].display, "Performer")
+        self.assertEqual(inst.performerType[0].coding[0].system, "http://hl7.org/fhir/task-performer-type")
+        self.assertEqual(inst.performerType[0].text, "Performer")
+        self.assertEqual(inst.priority, "routine")
+        self.assertEqual(inst.reason.text, "The Task.reason should only be included if there is no Task.focus or if it differs from the reason indicated on the focus")
+        self.assertEqual(inst.restriction.period.end.date, FHIRDate("2016-11-02T09:45:05+10:00").date)
+        self.assertEqual(inst.restriction.period.end.as_json(), "2016-11-02T09:45:05+10:00")
+        self.assertEqual(inst.restriction.repetitions, 1)
+        self.assertEqual(inst.status, "in-progress")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testTask6(self):
+        inst = self.instantiate_from("task-example6.json")
+        self.assertIsNotNone(inst, "Must have instantiated a Task instance")
+        self.implTask6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("Task", js["resourceType"])
+        inst2 = task.Task(js)
+        self.implTask6(inst2)
+    
+    def implTask6(self, inst):
+        self.assertEqual(inst.authoredOn.date, FHIRDate("2016-10-31T08:25:05+10:00").date)
+        self.assertEqual(inst.authoredOn.as_json(), "2016-10-31T08:25:05+10:00")
+        self.assertEqual(inst.businessStatus.text, "test completed and posted")
+        self.assertEqual(inst.code.text, "Lipid Panel")
+        self.assertEqual(inst.description, "Create order for getting specimen, Set up inhouse testing,  generate order for any sendouts and submit with specimen")
+        self.assertEqual(inst.executionPeriod.end.date, FHIRDate("2016-10-31T18:45:05+10:00").date)
+        self.assertEqual(inst.executionPeriod.end.as_json(), "2016-10-31T18:45:05+10:00")
+        self.assertEqual(inst.executionPeriod.start.date, FHIRDate("2016-10-31T08:25:05+10:00").date)
+        self.assertEqual(inst.executionPeriod.start.as_json(), "2016-10-31T08:25:05+10:00")
+        self.assertEqual(inst.groupIdentifier.system, "http:/goodhealth.org/accession/identifiers")
+        self.assertEqual(inst.groupIdentifier.use, "official")
+        self.assertEqual(inst.groupIdentifier.value, "G20170201-001")
+        self.assertEqual(inst.id, "example6")
+        self.assertEqual(inst.identifier[0].system, "http:/goodhealth.org/identifiers")
+        self.assertEqual(inst.identifier[0].use, "official")
+        self.assertEqual(inst.identifier[0].value, "20170201-001")
+        self.assertEqual(inst.intent, "order")
+        self.assertEqual(inst.lastModified.date, FHIRDate("2016-10-31T18:45:05+10:00").date)
+        self.assertEqual(inst.lastModified.as_json(), "2016-10-31T18:45:05+10:00")
+        self.assertEqual(inst.output[0].type.text, "DiagnosticReport generated")
+        self.assertEqual(inst.output[1].type.text, "collected specimen")
+        self.assertEqual(inst.performerType[0].coding[0].code, "performer")
+        self.assertEqual(inst.performerType[0].coding[0].display, "Performer")
+        self.assertEqual(inst.performerType[0].coding[0].system, "http://hl7.org/fhir/task-performer-type")
+        self.assertEqual(inst.performerType[0].text, "Performer")
+        self.assertEqual(inst.priority, "routine")
+        self.assertEqual(inst.reason.text, "The Task.reason should only be included if there is no Task.focus or if it differs from the reason indicated on the focus")
+        self.assertEqual(inst.restriction.period.end.date, FHIRDate("2016-11-02T09:45:05+10:00").date)
+        self.assertEqual(inst.restriction.period.end.as_json(), "2016-11-02T09:45:05+10:00")
+        self.assertEqual(inst.restriction.repetitions, 1)
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/testreport.py b/fhirclient/models/testreport.py
new file mode 100644
index 0000000..0077d35
--- /dev/null
+++ b/fhirclient/models/testreport.py
@@ -0,0 +1,431 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/TestReport) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class TestReport(domainresource.DomainResource):
+    """ Describes the results of a TestScript execution.
+    
+    A summary of information based on the results of executing a TestScript.
+    """
+    
+    resource_type = "TestReport"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.identifier = None
+        """ External identifier.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.issued = None
+        """ When the TestScript was executed and this TestReport was generated.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.name = None
+        """ Informal name of the executed TestScript.
+        Type `str`. """
+        
+        self.participant = None
+        """ A participant in the test execution, either the execution engine, a
+        client, or a server.
+        List of `TestReportParticipant` items (represented as `dict` in JSON). """
+        
+        self.result = None
+        """ pass | fail | pending.
+        Type `str`. """
+        
+        self.score = None
+        """ The final score (percentage of tests passed) resulting from the
+        execution of the TestScript.
+        Type `float`. """
+        
+        self.setup = None
+        """ The results of the series of required setup operations before the
+        tests were executed.
+        Type `TestReportSetup` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ completed | in-progress | waiting | stopped | entered-in-error.
+        Type `str`. """
+        
+        self.teardown = None
+        """ The results of running the series of required clean up steps.
+        Type `TestReportTeardown` (represented as `dict` in JSON). """
+        
+        self.test = None
+        """ A test executed from the test script.
+        List of `TestReportTest` items (represented as `dict` in JSON). """
+        
+        self.testScript = None
+        """ Reference to the  version-specific TestScript that was executed to
+        produce this TestReport.
+        Type `FHIRReference` referencing `TestScript` (represented as `dict` in JSON). """
+        
+        self.tester = None
+        """ Name of the tester producing this report (Organization or
+        individual).
+        Type `str`. """
+        
+        super(TestReport, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestReport, self).elementProperties()
+        js.extend([
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("issued", "issued", fhirdate.FHIRDate, False, None, False),
+            ("name", "name", str, False, None, False),
+            ("participant", "participant", TestReportParticipant, True, None, False),
+            ("result", "result", str, False, None, True),
+            ("score", "score", float, False, None, False),
+            ("setup", "setup", TestReportSetup, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("teardown", "teardown", TestReportTeardown, False, None, False),
+            ("test", "test", TestReportTest, True, None, False),
+            ("testScript", "testScript", fhirreference.FHIRReference, False, None, True),
+            ("tester", "tester", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class TestReportParticipant(backboneelement.BackboneElement):
+    """ A participant in the test execution, either the execution engine, a client,
+    or a server.
+    """
+    
+    resource_type = "TestReportParticipant"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.display = None
+        """ The display name of the participant.
+        Type `str`. """
+        
+        self.type = None
+        """ test-engine | client | server.
+        Type `str`. """
+        
+        self.uri = None
+        """ The uri of the participant. An absolute URL is preferred.
+        Type `str`. """
+        
+        super(TestReportParticipant, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestReportParticipant, self).elementProperties()
+        js.extend([
+            ("display", "display", str, False, None, False),
+            ("type", "type", str, False, None, True),
+            ("uri", "uri", str, False, None, True),
+        ])
+        return js
+
+
+class TestReportSetup(backboneelement.BackboneElement):
+    """ The results of the series of required setup operations before the tests
+    were executed.
+    """
+    
+    resource_type = "TestReportSetup"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ A setup operation or assert that was executed.
+        List of `TestReportSetupAction` items (represented as `dict` in JSON). """
+        
+        super(TestReportSetup, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestReportSetup, self).elementProperties()
+        js.extend([
+            ("action", "action", TestReportSetupAction, True, None, True),
+        ])
+        return js
+
+
+class TestReportSetupAction(backboneelement.BackboneElement):
+    """ A setup operation or assert that was executed.
+    
+    Action would contain either an operation or an assertion.
+    """
+    
+    resource_type = "TestReportSetupAction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.assert_fhir = None
+        """ The assertion to perform.
+        Type `TestReportSetupActionAssert` (represented as `dict` in JSON). """
+        
+        self.operation = None
+        """ The operation to perform.
+        Type `TestReportSetupActionOperation` (represented as `dict` in JSON). """
+        
+        super(TestReportSetupAction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestReportSetupAction, self).elementProperties()
+        js.extend([
+            ("assert_fhir", "assert", TestReportSetupActionAssert, False, None, False),
+            ("operation", "operation", TestReportSetupActionOperation, False, None, False),
+        ])
+        return js
+
+
+class TestReportSetupActionAssert(backboneelement.BackboneElement):
+    """ The assertion to perform.
+    
+    The results of the assertion performed on the previous operations.
+    """
+    
+    resource_type = "TestReportSetupActionAssert"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.detail = None
+        """ A link to further details on the result.
+        Type `str`. """
+        
+        self.message = None
+        """ A message associated with the result.
+        Type `str`. """
+        
+        self.result = None
+        """ pass | skip | fail | warning | error.
+        Type `str`. """
+        
+        super(TestReportSetupActionAssert, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestReportSetupActionAssert, self).elementProperties()
+        js.extend([
+            ("detail", "detail", str, False, None, False),
+            ("message", "message", str, False, None, False),
+            ("result", "result", str, False, None, True),
+        ])
+        return js
+
+
+class TestReportSetupActionOperation(backboneelement.BackboneElement):
+    """ The operation to perform.
+    
+    The operation performed.
+    """
+    
+    resource_type = "TestReportSetupActionOperation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.detail = None
+        """ A link to further details on the result.
+        Type `str`. """
+        
+        self.message = None
+        """ A message associated with the result.
+        Type `str`. """
+        
+        self.result = None
+        """ pass | skip | fail | warning | error.
+        Type `str`. """
+        
+        super(TestReportSetupActionOperation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestReportSetupActionOperation, self).elementProperties()
+        js.extend([
+            ("detail", "detail", str, False, None, False),
+            ("message", "message", str, False, None, False),
+            ("result", "result", str, False, None, True),
+        ])
+        return js
+
+
+class TestReportTeardown(backboneelement.BackboneElement):
+    """ The results of running the series of required clean up steps.
+    
+    The results of the series of operations required to clean up after the all
+    the tests were executed (successfully or otherwise).
+    """
+    
+    resource_type = "TestReportTeardown"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ One or more teardown operations performed.
+        List of `TestReportTeardownAction` items (represented as `dict` in JSON). """
+        
+        super(TestReportTeardown, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestReportTeardown, self).elementProperties()
+        js.extend([
+            ("action", "action", TestReportTeardownAction, True, None, True),
+        ])
+        return js
+
+
+class TestReportTeardownAction(backboneelement.BackboneElement):
+    """ One or more teardown operations performed.
+    
+    The teardown action will only contain an operation.
+    """
+    
+    resource_type = "TestReportTeardownAction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.operation = None
+        """ The teardown operation performed.
+        Type `TestReportSetupActionOperation` (represented as `dict` in JSON). """
+        
+        super(TestReportTeardownAction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestReportTeardownAction, self).elementProperties()
+        js.extend([
+            ("operation", "operation", TestReportSetupActionOperation, False, None, True),
+        ])
+        return js
+
+
+class TestReportTest(backboneelement.BackboneElement):
+    """ A test executed from the test script.
+    """
+    
+    resource_type = "TestReportTest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ A test operation or assert that was performed.
+        List of `TestReportTestAction` items (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Tracking/reporting short description of the test.
+        Type `str`. """
+        
+        self.name = None
+        """ Tracking/logging name of this test.
+        Type `str`. """
+        
+        super(TestReportTest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestReportTest, self).elementProperties()
+        js.extend([
+            ("action", "action", TestReportTestAction, True, None, True),
+            ("description", "description", str, False, None, False),
+            ("name", "name", str, False, None, False),
+        ])
+        return js
+
+
+class TestReportTestAction(backboneelement.BackboneElement):
+    """ A test operation or assert that was performed.
+    
+    Action would contain either an operation or an assertion.
+    """
+    
+    resource_type = "TestReportTestAction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.assert_fhir = None
+        """ The assertion performed.
+        Type `TestReportSetupActionAssert` (represented as `dict` in JSON). """
+        
+        self.operation = None
+        """ The operation performed.
+        Type `TestReportSetupActionOperation` (represented as `dict` in JSON). """
+        
+        super(TestReportTestAction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestReportTestAction, self).elementProperties()
+        js.extend([
+            ("assert_fhir", "assert", TestReportSetupActionAssert, False, None, False),
+            ("operation", "operation", TestReportSetupActionOperation, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
diff --git a/fhirclient/models/testreport_tests.py b/fhirclient/models/testreport_tests.py
new file mode 100644
index 0000000..eb317f4
--- /dev/null
+++ b/fhirclient/models/testreport_tests.py
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import testreport
+from .fhirdate import FHIRDate
+
+
+class TestReportTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("TestReport", js["resourceType"])
+        return testreport.TestReport(js)
+    
+    def testTestReport1(self):
+        inst = self.instantiate_from("testreport-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a TestReport instance")
+        self.implTestReport1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("TestReport", js["resourceType"])
+        inst2 = testreport.TestReport(js)
+        self.implTestReport1(inst2)
+    
+    def implTestReport1(self, inst):
+        self.assertEqual(inst.id, "testreport-example")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.9878")
+        self.assertEqual(inst.issued.date, FHIRDate("2016-10-07T08:25:34-05:00").date)
+        self.assertEqual(inst.issued.as_json(), "2016-10-07T08:25:34-05:00")
+        self.assertEqual(inst.name, "TestReport Example for TestScript Example")
+        self.assertEqual(inst.participant[0].display, "Crucible")
+        self.assertEqual(inst.participant[0].type, "test-engine")
+        self.assertEqual(inst.participant[0].uri, "http://projectcrucible.org")
+        self.assertEqual(inst.participant[1].display, "HealthIntersections STU3")
+        self.assertEqual(inst.participant[1].type, "server")
+        self.assertEqual(inst.participant[1].uri, "http://fhir3.healthintersections.com.au/open")
+        self.assertEqual(inst.result, "pass")
+        self.assertEqual(inst.score, 100.0)
+        self.assertEqual(inst.setup.action[0].operation.detail, "http://projectcrucible.org/permalink/1")
+        self.assertEqual(inst.setup.action[0].operation.message, "DELETE Patient")
+        self.assertEqual(inst.setup.action[0].operation.result, "pass")
+        self.assertEqual(inst.setup.action[1].assert_fhir.detail, "http://projectcrucible.org/permalink/1")
+        self.assertEqual(inst.setup.action[1].assert_fhir.message, "HTTP 204")
+        self.assertEqual(inst.setup.action[1].assert_fhir.result, "pass")
+        self.assertEqual(inst.setup.action[2].operation.detail, "http://projectcrucible.org/permalink/1")
+        self.assertEqual(inst.setup.action[2].operation.message, "POST Patient/fixture-patient-create")
+        self.assertEqual(inst.setup.action[2].operation.result, "pass")
+        self.assertEqual(inst.setup.action[3].assert_fhir.detail, "http://projectcrucible.org/permalink/1")
+        self.assertEqual(inst.setup.action[3].assert_fhir.message, "HTTP 201")
+        self.assertEqual(inst.setup.action[3].assert_fhir.result, "pass")
+        self.assertEqual(inst.status, "completed")
+        self.assertEqual(inst.teardown.action[0].operation.detail, "http://projectcrucible.org/permalink/3")
+        self.assertEqual(inst.teardown.action[0].operation.message, "DELETE Patient/fixture-patient-create.")
+        self.assertEqual(inst.teardown.action[0].operation.result, "pass")
+        self.assertEqual(inst.test[0].action[0].operation.detail, "http://projectcrucible.org/permalink/2")
+        self.assertEqual(inst.test[0].action[0].operation.message, "GET Patient/fixture-patient-create")
+        self.assertEqual(inst.test[0].action[0].operation.result, "pass")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.detail, "http://projectcrucible.org/permalink/2")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.message, "HTTP 200")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.result, "pass")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.detail, "http://projectcrucible.org/permalink/2")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.message, "Last-Modified Present")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.result, "pass")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.detail, "http://projectcrucible.org/permalink/2")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.message, "Response is Patient")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.result, "pass")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.detail, "http://projectcrucible.org/permalink/2")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.message, "Response validates")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.result, "pass")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.detail, "http://projectcrucible.org/permalink/2")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.message, "Patient.name.family 'Chalmers'")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.result, "pass")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.detail, "http://projectcrucible.org/permalink/2")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.message, "Patient.name.given 'Peter'")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.result, "pass")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.detail, "http://projectcrucible.org/permalink/2")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.message, "Patient.name.family 'Chalmers'")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.result, "pass")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.detail, "http://projectcrucible.org/permalink/2")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.message, "Patient.name.family 'Chalmers'")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.result, "pass")
+        self.assertEqual(inst.test[0].action[9].assert_fhir.detail, "http://projectcrucible.org/permalink/2")
+        self.assertEqual(inst.test[0].action[9].assert_fhir.message, "Patient expected values.")
+        self.assertEqual(inst.test[0].action[9].assert_fhir.result, "pass")
+        self.assertEqual(inst.test[0].description, "Read a Patient and validate response.")
+        self.assertEqual(inst.test[0].id, "01-ReadPatient")
+        self.assertEqual(inst.test[0].name, "Read Patient")
+        self.assertEqual(inst.tester, "HL7 Execution Engine")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/models/testscript.py b/fhirclient/models/testscript.py
new file mode 100644
index 0000000..7cd3327
--- /dev/null
+++ b/fhirclient/models/testscript.py
@@ -0,0 +1,1353 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/TestScript) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class TestScript(domainresource.DomainResource):
+    """ Describes a set of tests.
+    
+    A structured set of tests against a FHIR server implementation to determine
+    compliance against the FHIR specification.
+    """
+    
+    resource_type = "TestScript"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the test script.
+        Type `str`. """
+        
+        self.destination = None
+        """ An abstract server representing a destination or receiver in a
+        message exchange.
+        List of `TestScriptDestination` items (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.fixture = None
+        """ Fixture in the test script - by reference (uri).
+        List of `TestScriptFixture` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Additional identifier for the test script.
+        Type `Identifier` (represented as `dict` in JSON). """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for test script (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.metadata = None
+        """ Required capability that is assumed to function correctly on the
+        FHIR server being tested.
+        Type `TestScriptMetadata` (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this test script (computer friendly).
+        Type `str`. """
+        
+        self.origin = None
+        """ An abstract server representing a client or sender in a message
+        exchange.
+        List of `TestScriptOrigin` items (represented as `dict` in JSON). """
+        
+        self.profile = None
+        """ Reference of the validation profile.
+        List of `FHIRReference` items referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this test script is defined.
+        Type `str`. """
+        
+        self.rule = None
+        """ Assert rule used within the test script.
+        List of `TestScriptRule` items (represented as `dict` in JSON). """
+        
+        self.ruleset = None
+        """ Assert ruleset used within the test script.
+        List of `TestScriptRuleset` items (represented as `dict` in JSON). """
+        
+        self.setup = None
+        """ A series of required setup operations before tests are executed.
+        Type `TestScriptSetup` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.teardown = None
+        """ A series of required clean up steps.
+        Type `TestScriptTeardown` (represented as `dict` in JSON). """
+        
+        self.test = None
+        """ A test in this script.
+        List of `TestScriptTest` items (represented as `dict` in JSON). """
+        
+        self.title = None
+        """ Name for this test script (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this test script (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.variable = None
+        """ Placeholder for evaluated elements.
+        List of `TestScriptVariable` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the test script.
+        Type `str`. """
+        
+        super(TestScript, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScript, self).elementProperties()
+        js.extend([
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("destination", "destination", TestScriptDestination, True, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("fixture", "fixture", TestScriptFixture, True, None, False),
+            ("identifier", "identifier", identifier.Identifier, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("metadata", "metadata", TestScriptMetadata, False, None, False),
+            ("name", "name", str, False, None, True),
+            ("origin", "origin", TestScriptOrigin, True, None, False),
+            ("profile", "profile", fhirreference.FHIRReference, True, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("rule", "rule", TestScriptRule, True, None, False),
+            ("ruleset", "ruleset", TestScriptRuleset, True, None, False),
+            ("setup", "setup", TestScriptSetup, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("teardown", "teardown", TestScriptTeardown, False, None, False),
+            ("test", "test", TestScriptTest, True, None, False),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, True),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("variable", "variable", TestScriptVariable, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class TestScriptDestination(backboneelement.BackboneElement):
+    """ An abstract server representing a destination or receiver in a message
+    exchange.
+    
+    An abstract server used in operations within this test script in the
+    destination element.
+    """
+    
+    resource_type = "TestScriptDestination"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.index = None
+        """ The index of the abstract destination server starting at 1.
+        Type `int`. """
+        
+        self.profile = None
+        """ FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-
+        SDC-FormProcessor.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(TestScriptDestination, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptDestination, self).elementProperties()
+        js.extend([
+            ("index", "index", int, False, None, True),
+            ("profile", "profile", coding.Coding, False, None, True),
+        ])
+        return js
+
+
+class TestScriptFixture(backboneelement.BackboneElement):
+    """ Fixture in the test script - by reference (uri).
+    
+    Fixture in the test script - by reference (uri). All fixtures are required
+    for the test script to execute.
+    """
+    
+    resource_type = "TestScriptFixture"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.autocreate = None
+        """ Whether or not to implicitly create the fixture during setup.
+        Type `bool`. """
+        
+        self.autodelete = None
+        """ Whether or not to implicitly delete the fixture during teardown.
+        Type `bool`. """
+        
+        self.resource = None
+        """ Reference of the resource.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(TestScriptFixture, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptFixture, self).elementProperties()
+        js.extend([
+            ("autocreate", "autocreate", bool, False, None, False),
+            ("autodelete", "autodelete", bool, False, None, False),
+            ("resource", "resource", fhirreference.FHIRReference, False, None, False),
+        ])
+        return js
+
+
+class TestScriptMetadata(backboneelement.BackboneElement):
+    """ Required capability that is assumed to function correctly on the FHIR
+    server being tested.
+    
+    The required capability must exist and are assumed to function correctly on
+    the FHIR server being tested.
+    """
+    
+    resource_type = "TestScriptMetadata"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.capability = None
+        """ Capabilities  that are assumed to function correctly on the FHIR
+        server being tested.
+        List of `TestScriptMetadataCapability` items (represented as `dict` in JSON). """
+        
+        self.link = None
+        """ Links to the FHIR specification.
+        List of `TestScriptMetadataLink` items (represented as `dict` in JSON). """
+        
+        super(TestScriptMetadata, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptMetadata, self).elementProperties()
+        js.extend([
+            ("capability", "capability", TestScriptMetadataCapability, True, None, True),
+            ("link", "link", TestScriptMetadataLink, True, None, False),
+        ])
+        return js
+
+
+class TestScriptMetadataCapability(backboneelement.BackboneElement):
+    """ Capabilities  that are assumed to function correctly on the FHIR server
+    being tested.
+    
+    Capabilities that must exist and are assumed to function correctly on the
+    FHIR server being tested.
+    """
+    
+    resource_type = "TestScriptMetadataCapability"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.capabilities = None
+        """ Required Capability Statement.
+        Type `FHIRReference` referencing `CapabilityStatement` (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ The expected capabilities of the server.
+        Type `str`. """
+        
+        self.destination = None
+        """ Which server these requirements apply to.
+        Type `int`. """
+        
+        self.link = None
+        """ Links to the FHIR specification.
+        List of `str` items. """
+        
+        self.origin = None
+        """ Which origin server these requirements apply to.
+        List of `int` items. """
+        
+        self.required = None
+        """ Are the capabilities required?.
+        Type `bool`. """
+        
+        self.validated = None
+        """ Are the capabilities validated?.
+        Type `bool`. """
+        
+        super(TestScriptMetadataCapability, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptMetadataCapability, self).elementProperties()
+        js.extend([
+            ("capabilities", "capabilities", fhirreference.FHIRReference, False, None, True),
+            ("description", "description", str, False, None, False),
+            ("destination", "destination", int, False, None, False),
+            ("link", "link", str, True, None, False),
+            ("origin", "origin", int, True, None, False),
+            ("required", "required", bool, False, None, False),
+            ("validated", "validated", bool, False, None, False),
+        ])
+        return js
+
+
+class TestScriptMetadataLink(backboneelement.BackboneElement):
+    """ Links to the FHIR specification.
+    
+    A link to the FHIR specification that this test is covering.
+    """
+    
+    resource_type = "TestScriptMetadataLink"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.description = None
+        """ Short description.
+        Type `str`. """
+        
+        self.url = None
+        """ URL to the specification.
+        Type `str`. """
+        
+        super(TestScriptMetadataLink, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptMetadataLink, self).elementProperties()
+        js.extend([
+            ("description", "description", str, False, None, False),
+            ("url", "url", str, False, None, True),
+        ])
+        return js
+
+
+class TestScriptOrigin(backboneelement.BackboneElement):
+    """ An abstract server representing a client or sender in a message exchange.
+    
+    An abstract server used in operations within this test script in the origin
+    element.
+    """
+    
+    resource_type = "TestScriptOrigin"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.index = None
+        """ The index of the abstract origin server starting at 1.
+        Type `int`. """
+        
+        self.profile = None
+        """ FHIR-Client | FHIR-SDC-FormFiller.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        super(TestScriptOrigin, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptOrigin, self).elementProperties()
+        js.extend([
+            ("index", "index", int, False, None, True),
+            ("profile", "profile", coding.Coding, False, None, True),
+        ])
+        return js
+
+
+class TestScriptRule(backboneelement.BackboneElement):
+    """ Assert rule used within the test script.
+    
+    Assert rule to be used in one or more asserts within the test script.
+    """
+    
+    resource_type = "TestScriptRule"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.param = None
+        """ Rule parameter template.
+        List of `TestScriptRuleParam` items (represented as `dict` in JSON). """
+        
+        self.resource = None
+        """ Assert rule resource reference.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        super(TestScriptRule, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptRule, self).elementProperties()
+        js.extend([
+            ("param", "param", TestScriptRuleParam, True, None, False),
+            ("resource", "resource", fhirreference.FHIRReference, False, None, True),
+        ])
+        return js
+
+
+class TestScriptRuleParam(backboneelement.BackboneElement):
+    """ Rule parameter template.
+    
+    Each rule template can take one or more parameters for rule evaluation.
+    """
+    
+    resource_type = "TestScriptRuleParam"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.name = None
+        """ Parameter name matching external assert rule parameter.
+        Type `str`. """
+        
+        self.value = None
+        """ Parameter value defined either explicitly or dynamically.
+        Type `str`. """
+        
+        super(TestScriptRuleParam, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptRuleParam, self).elementProperties()
+        js.extend([
+            ("name", "name", str, False, None, True),
+            ("value", "value", str, False, None, False),
+        ])
+        return js
+
+
+class TestScriptRuleset(backboneelement.BackboneElement):
+    """ Assert ruleset used within the test script.
+    
+    Contains one or more rules.  Offers a way to group rules so assertions
+    could reference the group of rules and have them all applied.
+    """
+    
+    resource_type = "TestScriptRuleset"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.resource = None
+        """ Assert ruleset resource reference.
+        Type `FHIRReference` referencing `Resource` (represented as `dict` in JSON). """
+        
+        self.rule = None
+        """ The referenced rule within the ruleset.
+        List of `TestScriptRulesetRule` items (represented as `dict` in JSON). """
+        
+        super(TestScriptRuleset, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptRuleset, self).elementProperties()
+        js.extend([
+            ("resource", "resource", fhirreference.FHIRReference, False, None, True),
+            ("rule", "rule", TestScriptRulesetRule, True, None, True),
+        ])
+        return js
+
+
+class TestScriptRulesetRule(backboneelement.BackboneElement):
+    """ The referenced rule within the ruleset.
+    
+    The referenced rule within the external ruleset template.
+    """
+    
+    resource_type = "TestScriptRulesetRule"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.param = None
+        """ Ruleset rule parameter template.
+        List of `TestScriptRulesetRuleParam` items (represented as `dict` in JSON). """
+        
+        self.ruleId = None
+        """ Id of referenced rule within the ruleset.
+        Type `str`. """
+        
+        super(TestScriptRulesetRule, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptRulesetRule, self).elementProperties()
+        js.extend([
+            ("param", "param", TestScriptRulesetRuleParam, True, None, False),
+            ("ruleId", "ruleId", str, False, None, True),
+        ])
+        return js
+
+
+class TestScriptRulesetRuleParam(backboneelement.BackboneElement):
+    """ Ruleset rule parameter template.
+    
+    Each rule template can take one or more parameters for rule evaluation.
+    """
+    
+    resource_type = "TestScriptRulesetRuleParam"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.name = None
+        """ Parameter name matching external assert ruleset rule parameter.
+        Type `str`. """
+        
+        self.value = None
+        """ Parameter value defined either explicitly or dynamically.
+        Type `str`. """
+        
+        super(TestScriptRulesetRuleParam, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptRulesetRuleParam, self).elementProperties()
+        js.extend([
+            ("name", "name", str, False, None, True),
+            ("value", "value", str, False, None, False),
+        ])
+        return js
+
+
+class TestScriptSetup(backboneelement.BackboneElement):
+    """ A series of required setup operations before tests are executed.
+    """
+    
+    resource_type = "TestScriptSetup"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ A setup operation or assert to perform.
+        List of `TestScriptSetupAction` items (represented as `dict` in JSON). """
+        
+        super(TestScriptSetup, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptSetup, self).elementProperties()
+        js.extend([
+            ("action", "action", TestScriptSetupAction, True, None, True),
+        ])
+        return js
+
+
+class TestScriptSetupAction(backboneelement.BackboneElement):
+    """ A setup operation or assert to perform.
+    
+    Action would contain either an operation or an assertion.
+    """
+    
+    resource_type = "TestScriptSetupAction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.assert_fhir = None
+        """ The assertion to perform.
+        Type `TestScriptSetupActionAssert` (represented as `dict` in JSON). """
+        
+        self.operation = None
+        """ The setup operation to perform.
+        Type `TestScriptSetupActionOperation` (represented as `dict` in JSON). """
+        
+        super(TestScriptSetupAction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptSetupAction, self).elementProperties()
+        js.extend([
+            ("assert_fhir", "assert", TestScriptSetupActionAssert, False, None, False),
+            ("operation", "operation", TestScriptSetupActionOperation, False, None, False),
+        ])
+        return js
+
+
+class TestScriptSetupActionAssert(backboneelement.BackboneElement):
+    """ The assertion to perform.
+    
+    Evaluates the results of previous operations to determine if the server
+    under test behaves appropriately.
+    """
+    
+    resource_type = "TestScriptSetupActionAssert"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.compareToSourceExpression = None
+        """ The fluentpath expression to evaluate against the source fixture.
+        Type `str`. """
+        
+        self.compareToSourceId = None
+        """ Id of the source fixture to be evaluated.
+        Type `str`. """
+        
+        self.compareToSourcePath = None
+        """ XPath or JSONPath expression to evaluate against the source fixture.
+        Type `str`. """
+        
+        self.contentType = None
+        """ xml | json | ttl | none.
+        Type `str`. """
+        
+        self.description = None
+        """ Tracking/reporting assertion description.
+        Type `str`. """
+        
+        self.direction = None
+        """ response | request.
+        Type `str`. """
+        
+        self.expression = None
+        """ The fluentpath expression to be evaluated.
+        Type `str`. """
+        
+        self.headerField = None
+        """ HTTP header field name.
+        Type `str`. """
+        
+        self.label = None
+        """ Tracking/logging assertion label.
+        Type `str`. """
+        
+        self.minimumId = None
+        """ Fixture Id of minimum content resource.
+        Type `str`. """
+        
+        self.navigationLinks = None
+        """ Perform validation on navigation links?.
+        Type `bool`. """
+        
+        self.operator = None
+        """ equals | notEquals | in | notIn | greaterThan | lessThan | empty |
+        notEmpty | contains | notContains | eval.
+        Type `str`. """
+        
+        self.path = None
+        """ XPath or JSONPath expression.
+        Type `str`. """
+        
+        self.requestMethod = None
+        """ delete | get | options | patch | post | put.
+        Type `str`. """
+        
+        self.requestURL = None
+        """ Request URL comparison value.
+        Type `str`. """
+        
+        self.resource = None
+        """ Resource type.
+        Type `str`. """
+        
+        self.response = None
+        """ okay | created | noContent | notModified | bad | forbidden |
+        notFound | methodNotAllowed | conflict | gone | preconditionFailed
+        | unprocessable.
+        Type `str`. """
+        
+        self.responseCode = None
+        """ HTTP response code to test.
+        Type `str`. """
+        
+        self.rule = None
+        """ The reference to a TestScript.rule.
+        Type `TestScriptSetupActionAssertRule` (represented as `dict` in JSON). """
+        
+        self.ruleset = None
+        """ The reference to a TestScript.ruleset.
+        Type `TestScriptSetupActionAssertRuleset` (represented as `dict` in JSON). """
+        
+        self.sourceId = None
+        """ Fixture Id of source expression or headerField.
+        Type `str`. """
+        
+        self.validateProfileId = None
+        """ Profile Id of validation profile reference.
+        Type `str`. """
+        
+        self.value = None
+        """ The value to compare to.
+        Type `str`. """
+        
+        self.warningOnly = None
+        """ Will this assert produce a warning only on error?.
+        Type `bool`. """
+        
+        super(TestScriptSetupActionAssert, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptSetupActionAssert, self).elementProperties()
+        js.extend([
+            ("compareToSourceExpression", "compareToSourceExpression", str, False, None, False),
+            ("compareToSourceId", "compareToSourceId", str, False, None, False),
+            ("compareToSourcePath", "compareToSourcePath", str, False, None, False),
+            ("contentType", "contentType", str, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("direction", "direction", str, False, None, False),
+            ("expression", "expression", str, False, None, False),
+            ("headerField", "headerField", str, False, None, False),
+            ("label", "label", str, False, None, False),
+            ("minimumId", "minimumId", str, False, None, False),
+            ("navigationLinks", "navigationLinks", bool, False, None, False),
+            ("operator", "operator", str, False, None, False),
+            ("path", "path", str, False, None, False),
+            ("requestMethod", "requestMethod", str, False, None, False),
+            ("requestURL", "requestURL", str, False, None, False),
+            ("resource", "resource", str, False, None, False),
+            ("response", "response", str, False, None, False),
+            ("responseCode", "responseCode", str, False, None, False),
+            ("rule", "rule", TestScriptSetupActionAssertRule, False, None, False),
+            ("ruleset", "ruleset", TestScriptSetupActionAssertRuleset, False, None, False),
+            ("sourceId", "sourceId", str, False, None, False),
+            ("validateProfileId", "validateProfileId", str, False, None, False),
+            ("value", "value", str, False, None, False),
+            ("warningOnly", "warningOnly", bool, False, None, False),
+        ])
+        return js
+
+
+class TestScriptSetupActionAssertRule(backboneelement.BackboneElement):
+    """ The reference to a TestScript.rule.
+    
+    The TestScript.rule this assert will evaluate.
+    """
+    
+    resource_type = "TestScriptSetupActionAssertRule"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.param = None
+        """ Rule parameter template.
+        List of `TestScriptSetupActionAssertRuleParam` items (represented as `dict` in JSON). """
+        
+        self.ruleId = None
+        """ Id of the TestScript.rule.
+        Type `str`. """
+        
+        super(TestScriptSetupActionAssertRule, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptSetupActionAssertRule, self).elementProperties()
+        js.extend([
+            ("param", "param", TestScriptSetupActionAssertRuleParam, True, None, False),
+            ("ruleId", "ruleId", str, False, None, True),
+        ])
+        return js
+
+
+class TestScriptSetupActionAssertRuleParam(backboneelement.BackboneElement):
+    """ Rule parameter template.
+    
+    Each rule template can take one or more parameters for rule evaluation.
+    """
+    
+    resource_type = "TestScriptSetupActionAssertRuleParam"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.name = None
+        """ Parameter name matching external assert rule parameter.
+        Type `str`. """
+        
+        self.value = None
+        """ Parameter value defined either explicitly or dynamically.
+        Type `str`. """
+        
+        super(TestScriptSetupActionAssertRuleParam, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptSetupActionAssertRuleParam, self).elementProperties()
+        js.extend([
+            ("name", "name", str, False, None, True),
+            ("value", "value", str, False, None, True),
+        ])
+        return js
+
+
+class TestScriptSetupActionAssertRuleset(backboneelement.BackboneElement):
+    """ The reference to a TestScript.ruleset.
+    
+    The TestScript.ruleset this assert will evaluate.
+    """
+    
+    resource_type = "TestScriptSetupActionAssertRuleset"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.rule = None
+        """ The referenced rule within the ruleset.
+        List of `TestScriptSetupActionAssertRulesetRule` items (represented as `dict` in JSON). """
+        
+        self.rulesetId = None
+        """ Id of the TestScript.ruleset.
+        Type `str`. """
+        
+        super(TestScriptSetupActionAssertRuleset, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptSetupActionAssertRuleset, self).elementProperties()
+        js.extend([
+            ("rule", "rule", TestScriptSetupActionAssertRulesetRule, True, None, False),
+            ("rulesetId", "rulesetId", str, False, None, True),
+        ])
+        return js
+
+
+class TestScriptSetupActionAssertRulesetRule(backboneelement.BackboneElement):
+    """ The referenced rule within the ruleset.
+    
+    The referenced rule within the external ruleset template.
+    """
+    
+    resource_type = "TestScriptSetupActionAssertRulesetRule"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.param = None
+        """ Rule parameter template.
+        List of `TestScriptSetupActionAssertRulesetRuleParam` items (represented as `dict` in JSON). """
+        
+        self.ruleId = None
+        """ Id of referenced rule within the ruleset.
+        Type `str`. """
+        
+        super(TestScriptSetupActionAssertRulesetRule, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptSetupActionAssertRulesetRule, self).elementProperties()
+        js.extend([
+            ("param", "param", TestScriptSetupActionAssertRulesetRuleParam, True, None, False),
+            ("ruleId", "ruleId", str, False, None, True),
+        ])
+        return js
+
+
+class TestScriptSetupActionAssertRulesetRuleParam(backboneelement.BackboneElement):
+    """ Rule parameter template.
+    
+    Each rule template can take one or more parameters for rule evaluation.
+    """
+    
+    resource_type = "TestScriptSetupActionAssertRulesetRuleParam"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.name = None
+        """ Parameter name matching external assert ruleset rule parameter.
+        Type `str`. """
+        
+        self.value = None
+        """ Parameter value defined either explicitly or dynamically.
+        Type `str`. """
+        
+        super(TestScriptSetupActionAssertRulesetRuleParam, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptSetupActionAssertRulesetRuleParam, self).elementProperties()
+        js.extend([
+            ("name", "name", str, False, None, True),
+            ("value", "value", str, False, None, True),
+        ])
+        return js
+
+
+class TestScriptSetupActionOperation(backboneelement.BackboneElement):
+    """ The setup operation to perform.
+    
+    The operation to perform.
+    """
+    
+    resource_type = "TestScriptSetupActionOperation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.accept = None
+        """ xml | json | ttl | none.
+        Type `str`. """
+        
+        self.contentType = None
+        """ xml | json | ttl | none.
+        Type `str`. """
+        
+        self.description = None
+        """ Tracking/reporting operation description.
+        Type `str`. """
+        
+        self.destination = None
+        """ Server responding to the request.
+        Type `int`. """
+        
+        self.encodeRequestUrl = None
+        """ Whether or not to send the request url in encoded format.
+        Type `bool`. """
+        
+        self.label = None
+        """ Tracking/logging operation label.
+        Type `str`. """
+        
+        self.origin = None
+        """ Server initiating the request.
+        Type `int`. """
+        
+        self.params = None
+        """ Explicitly defined path parameters.
+        Type `str`. """
+        
+        self.requestHeader = None
+        """ Each operation can have one or more header elements.
+        List of `TestScriptSetupActionOperationRequestHeader` items (represented as `dict` in JSON). """
+        
+        self.requestId = None
+        """ Fixture Id of mapped request.
+        Type `str`. """
+        
+        self.resource = None
+        """ Resource type.
+        Type `str`. """
+        
+        self.responseId = None
+        """ Fixture Id of mapped response.
+        Type `str`. """
+        
+        self.sourceId = None
+        """ Fixture Id of body for PUT and POST requests.
+        Type `str`. """
+        
+        self.targetId = None
+        """ Id of fixture used for extracting the [id],  [type], and [vid] for
+        GET requests.
+        Type `str`. """
+        
+        self.type = None
+        """ The operation code type that will be executed.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.url = None
+        """ Request URL.
+        Type `str`. """
+        
+        super(TestScriptSetupActionOperation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptSetupActionOperation, self).elementProperties()
+        js.extend([
+            ("accept", "accept", str, False, None, False),
+            ("contentType", "contentType", str, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("destination", "destination", int, False, None, False),
+            ("encodeRequestUrl", "encodeRequestUrl", bool, False, None, False),
+            ("label", "label", str, False, None, False),
+            ("origin", "origin", int, False, None, False),
+            ("params", "params", str, False, None, False),
+            ("requestHeader", "requestHeader", TestScriptSetupActionOperationRequestHeader, True, None, False),
+            ("requestId", "requestId", str, False, None, False),
+            ("resource", "resource", str, False, None, False),
+            ("responseId", "responseId", str, False, None, False),
+            ("sourceId", "sourceId", str, False, None, False),
+            ("targetId", "targetId", str, False, None, False),
+            ("type", "type", coding.Coding, False, None, False),
+            ("url", "url", str, False, None, False),
+        ])
+        return js
+
+
+class TestScriptSetupActionOperationRequestHeader(backboneelement.BackboneElement):
+    """ Each operation can have one or more header elements.
+    
+    Header elements would be used to set HTTP headers.
+    """
+    
+    resource_type = "TestScriptSetupActionOperationRequestHeader"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.field = None
+        """ HTTP header field name.
+        Type `str`. """
+        
+        self.value = None
+        """ HTTP headerfield value.
+        Type `str`. """
+        
+        super(TestScriptSetupActionOperationRequestHeader, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptSetupActionOperationRequestHeader, self).elementProperties()
+        js.extend([
+            ("field", "field", str, False, None, True),
+            ("value", "value", str, False, None, True),
+        ])
+        return js
+
+
+class TestScriptTeardown(backboneelement.BackboneElement):
+    """ A series of required clean up steps.
+    
+    A series of operations required to clean up after the all the tests are
+    executed (successfully or otherwise).
+    """
+    
+    resource_type = "TestScriptTeardown"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ One or more teardown operations to perform.
+        List of `TestScriptTeardownAction` items (represented as `dict` in JSON). """
+        
+        super(TestScriptTeardown, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptTeardown, self).elementProperties()
+        js.extend([
+            ("action", "action", TestScriptTeardownAction, True, None, True),
+        ])
+        return js
+
+
+class TestScriptTeardownAction(backboneelement.BackboneElement):
+    """ One or more teardown operations to perform.
+    
+    The teardown action will only contain an operation.
+    """
+    
+    resource_type = "TestScriptTeardownAction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.operation = None
+        """ The teardown operation to perform.
+        Type `TestScriptSetupActionOperation` (represented as `dict` in JSON). """
+        
+        super(TestScriptTeardownAction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptTeardownAction, self).elementProperties()
+        js.extend([
+            ("operation", "operation", TestScriptSetupActionOperation, False, None, True),
+        ])
+        return js
+
+
+class TestScriptTest(backboneelement.BackboneElement):
+    """ A test in this script.
+    """
+    
+    resource_type = "TestScriptTest"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.action = None
+        """ A test operation or assert to perform.
+        List of `TestScriptTestAction` items (represented as `dict` in JSON). """
+        
+        self.description = None
+        """ Tracking/reporting short description of the test.
+        Type `str`. """
+        
+        self.name = None
+        """ Tracking/logging name of this test.
+        Type `str`. """
+        
+        super(TestScriptTest, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptTest, self).elementProperties()
+        js.extend([
+            ("action", "action", TestScriptTestAction, True, None, True),
+            ("description", "description", str, False, None, False),
+            ("name", "name", str, False, None, False),
+        ])
+        return js
+
+
+class TestScriptTestAction(backboneelement.BackboneElement):
+    """ A test operation or assert to perform.
+    
+    Action would contain either an operation or an assertion.
+    """
+    
+    resource_type = "TestScriptTestAction"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.assert_fhir = None
+        """ The setup assertion to perform.
+        Type `TestScriptSetupActionAssert` (represented as `dict` in JSON). """
+        
+        self.operation = None
+        """ The setup operation to perform.
+        Type `TestScriptSetupActionOperation` (represented as `dict` in JSON). """
+        
+        super(TestScriptTestAction, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptTestAction, self).elementProperties()
+        js.extend([
+            ("assert_fhir", "assert", TestScriptSetupActionAssert, False, None, False),
+            ("operation", "operation", TestScriptSetupActionOperation, False, None, False),
+        ])
+        return js
+
+
+class TestScriptVariable(backboneelement.BackboneElement):
+    """ Placeholder for evaluated elements.
+    
+    Variable is set based either on element value in response body or on header
+    field value in the response headers.
+    """
+    
+    resource_type = "TestScriptVariable"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.defaultValue = None
+        """ Default, hard-coded, or user-defined value for this variable.
+        Type `str`. """
+        
+        self.description = None
+        """ Natural language description of the variable.
+        Type `str`. """
+        
+        self.expression = None
+        """ The fluentpath expression against the fixture body.
+        Type `str`. """
+        
+        self.headerField = None
+        """ HTTP header field name for source.
+        Type `str`. """
+        
+        self.hint = None
+        """ Hint help text for default value to enter.
+        Type `str`. """
+        
+        self.name = None
+        """ Descriptive name for this variable.
+        Type `str`. """
+        
+        self.path = None
+        """ XPath or JSONPath against the fixture body.
+        Type `str`. """
+        
+        self.sourceId = None
+        """ Fixture Id of source expression or headerField within this variable.
+        Type `str`. """
+        
+        super(TestScriptVariable, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TestScriptVariable, self).elementProperties()
+        js.extend([
+            ("defaultValue", "defaultValue", str, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("expression", "expression", str, False, None, False),
+            ("headerField", "headerField", str, False, None, False),
+            ("hint", "hint", str, False, None, False),
+            ("name", "name", str, False, None, True),
+            ("path", "path", str, False, None, False),
+            ("sourceId", "sourceId", str, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/testscript_tests.py b/fhirclient/models/testscript_tests.py
new file mode 100644
index 0000000..f6a711a
--- /dev/null
+++ b/fhirclient/models/testscript_tests.py
@@ -0,0 +1,817 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import testscript
+from .fhirdate import FHIRDate
+
+
+class TestScriptTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("TestScript", js["resourceType"])
+        return testscript.TestScript(js)
+    
+    def testTestScript1(self):
+        inst = self.instantiate_from("testscript-example-history.json")
+        self.assertIsNotNone(inst, "Must have instantiated a TestScript instance")
+        self.implTestScript1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("TestScript", js["resourceType"])
+        inst2 = testscript.TestScript(js)
+        self.implTestScript1(inst2)
+    
+    def implTestScript1(self, inst):
+        self.assertEqual(inst.contact[0].name, "Support")
+        self.assertEqual(inst.contact[0].telecom[0].system, "email")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "support at HL7.org")
+        self.assertEqual(inst.copyright, "© HL7.org 2011+")
+        self.assertEqual(inst.date.date, FHIRDate("2017-01-18").date)
+        self.assertEqual(inst.date.as_json(), "2017-01-18")
+        self.assertTrue(inst.experimental)
+        self.assertFalse(inst.fixture[0].autocreate)
+        self.assertFalse(inst.fixture[0].autodelete)
+        self.assertEqual(inst.fixture[0].id, "fixture-patient-create")
+        self.assertFalse(inst.fixture[1].autocreate)
+        self.assertFalse(inst.fixture[1].autodelete)
+        self.assertEqual(inst.fixture[1].id, "fixture-patient-update")
+        self.assertEqual(inst.id, "testscript-example-history")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.9877")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United States of America (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.metadata.capability[0].description, "Patient Update, Delete and History (Instance) Operations")
+        self.assertEqual(inst.metadata.capability[0].link[0], "http://hl7.org/fhir/http.html#update")
+        self.assertEqual(inst.metadata.capability[0].link[1], "http://hl7.org/fhir/http.html#delete")
+        self.assertEqual(inst.metadata.capability[0].link[2], "http://hl7.org/fhir/http.html#history")
+        self.assertTrue(inst.metadata.capability[0].required)
+        self.assertEqual(inst.metadata.link[0].description, "Demographics and other administrative information about an individual or animal receiving care or other health-related services.")
+        self.assertEqual(inst.metadata.link[0].url, "http://hl7.org/fhir/patient.html")
+        self.assertEqual(inst.name, "TestScript Example History")
+        self.assertEqual(inst.publisher, "HL7")
+        self.assertEqual(inst.purpose, "Patient (Conditional) Create, Update, Delete and History (Instance) Operations")
+        self.assertEqual(inst.setup.action[0].operation.accept, "json")
+        self.assertEqual(inst.setup.action[0].operation.description, "Execute a delete operation to insure the patient does not exist on the server.")
+        self.assertEqual(inst.setup.action[0].operation.label, "SetupDeletePatient")
+        self.assertEqual(inst.setup.action[0].operation.params, "/${createResourceId}")
+        self.assertEqual(inst.setup.action[0].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[0].operation.type.code, "delete")
+        self.assertEqual(inst.setup.action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[1].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK) or 204(No Content).")
+        self.assertEqual(inst.setup.action[1].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[1].assert_fhir.operator, "in")
+        self.assertEqual(inst.setup.action[1].assert_fhir.responseCode, "200,204")
+        self.assertEqual(inst.setup.action[2].operation.accept, "json")
+        self.assertEqual(inst.setup.action[2].operation.contentType, "json")
+        self.assertEqual(inst.setup.action[2].operation.description, "Create patient resource on test server using the contents of fixture-patient-create")
+        self.assertEqual(inst.setup.action[2].operation.label, "SetupCreatePatient")
+        self.assertEqual(inst.setup.action[2].operation.params, "/${createResourceId}")
+        self.assertEqual(inst.setup.action[2].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[2].operation.sourceId, "fixture-patient-create")
+        self.assertEqual(inst.setup.action[2].operation.type.code, "update")
+        self.assertEqual(inst.setup.action[2].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[3].assert_fhir.description, "Confirm that the returned HTTP status is 201(Created).")
+        self.assertEqual(inst.setup.action[3].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[3].assert_fhir.responseCode, "201")
+        self.assertEqual(inst.setup.action[4].operation.accept, "json")
+        self.assertEqual(inst.setup.action[4].operation.contentType, "json")
+        self.assertEqual(inst.setup.action[4].operation.description, "Update patient resource on test server using the contents of fixture-patient-update")
+        self.assertEqual(inst.setup.action[4].operation.label, "SetupUpdatePatient")
+        self.assertEqual(inst.setup.action[4].operation.params, "/${createResourceId}")
+        self.assertEqual(inst.setup.action[4].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[4].operation.sourceId, "fixture-patient-update")
+        self.assertEqual(inst.setup.action[4].operation.type.code, "update")
+        self.assertEqual(inst.setup.action[4].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[5].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.setup.action[5].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[5].assert_fhir.responseCode, "200")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.test[0].action[0].operation.accept, "json")
+        self.assertEqual(inst.test[0].action[0].operation.contentType, "json")
+        self.assertEqual(inst.test[0].action[0].operation.description, "Get the Patient history on the test server using the id from fixture-patient-create.")
+        self.assertEqual(inst.test[0].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[0].action[0].operation.targetId, "fixture-patient-create")
+        self.assertEqual(inst.test[0].action[0].operation.type.code, "history")
+        self.assertEqual(inst.test[0].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.response, "okay")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.description, "Confirm that the returned resource type is Bundle.")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.resource, "Bundle")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.description, "Confirm that the returned Bundle conforms to the base FHIR specification.")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.validateProfileId, "bundle-profile")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.description, "Confirm that the returned Bundle type equals 'history'.")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.operator, "equals")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.path, "fhir:Bundle/fhir:type/@value")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.value, "history")
+        self.assertEqual(inst.test[0].description, "Get the history for a known Patient and validate response.")
+        self.assertEqual(inst.test[0].id, "01-HistoryPatient")
+        self.assertEqual(inst.test[0].name, "History Patient")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/TestScript/testscript-example-history")
+        self.assertEqual(inst.variable[0].name, "createResourceId")
+        self.assertEqual(inst.variable[0].path, "Patient/id")
+        self.assertEqual(inst.variable[0].sourceId, "fixture-patient-create")
+        self.assertEqual(inst.version, "1.0")
+    
+    def testTestScript2(self):
+        inst = self.instantiate_from("testscript-example-multisystem.json")
+        self.assertIsNotNone(inst, "Must have instantiated a TestScript instance")
+        self.implTestScript2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("TestScript", js["resourceType"])
+        inst2 = testscript.TestScript(js)
+        self.implTestScript2(inst2)
+    
+    def implTestScript2(self, inst):
+        self.assertEqual(inst.contact[0].name, "Support")
+        self.assertEqual(inst.contact[0].telecom[0].system, "email")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "support at HL7.org")
+        self.assertEqual(inst.copyright, "© HL7.org 2011+")
+        self.assertEqual(inst.date.date, FHIRDate("2017-01-18").date)
+        self.assertEqual(inst.date.as_json(), "2017-01-18")
+        self.assertEqual(inst.destination[0].index, 1)
+        self.assertEqual(inst.destination[0].profile.code, "FHIR-Server")
+        self.assertEqual(inst.destination[1].index, 2)
+        self.assertEqual(inst.destination[1].profile.code, "FHIR-Server")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "testscript-example-multisystem")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.9878")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United States of America (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.metadata.capability[0].description, "Patient Read Operation")
+        self.assertEqual(inst.metadata.capability[0].destination, 1)
+        self.assertEqual(inst.metadata.capability[0].link[0], "http://hl7.org/fhir/http.html#read")
+        self.assertEqual(inst.metadata.capability[0].origin[0], 1)
+        self.assertTrue(inst.metadata.capability[0].required)
+        self.assertFalse(inst.metadata.capability[0].validated)
+        self.assertEqual(inst.metadata.capability[1].description, "Patient Read Operation")
+        self.assertEqual(inst.metadata.capability[1].destination, 2)
+        self.assertEqual(inst.metadata.capability[1].link[0], "http://hl7.org/fhir/http.html#read")
+        self.assertEqual(inst.metadata.capability[1].origin[0], 1)
+        self.assertTrue(inst.metadata.capability[1].required)
+        self.assertFalse(inst.metadata.capability[1].validated)
+        self.assertEqual(inst.metadata.link[0].description, "Demographics and other administrative information about an individual or animal receiving care or other health-related services.")
+        self.assertEqual(inst.metadata.link[0].url, "http://hl7.org/fhir/patient.html")
+        self.assertEqual(inst.name, "testscript-example-multisystem")
+        self.assertEqual(inst.origin[0].index, 1)
+        self.assertEqual(inst.origin[0].profile.code, "FHIR-Client")
+        self.assertEqual(inst.publisher, "HL7")
+        self.assertEqual(inst.purpose, "Patient Read Operation")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.test[0].action[0].operation.accept, "xml")
+        self.assertEqual(inst.test[0].action[0].operation.contentType, "xml")
+        self.assertEqual(inst.test[0].action[0].operation.description, "Read a Patient from the first destination test system and perform basic validation.")
+        self.assertEqual(inst.test[0].action[0].operation.destination, 1)
+        self.assertEqual(inst.test[0].action[0].operation.origin, 1)
+        self.assertEqual(inst.test[0].action[0].operation.params, "/${Dest1PatientResourceId}")
+        self.assertEqual(inst.test[0].action[0].operation.requestId, "request-read-patient-01")
+        self.assertEqual(inst.test[0].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[0].action[0].operation.type.code, "read")
+        self.assertEqual(inst.test[0].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.description, "Confirm that the request method GET was sent by the client system under test.")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.requestMethod, "get")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.description, "Confirm that the client requested an Accept of xml.")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.direction, "request")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.headerField, "Accept")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.operator, "contains")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.value, "xml")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.response, "okay")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.contentType, "xml")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.description, "Confirm that the returned format is XML.")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.description, "Confirm that the returned resource type is Patient.")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.resource, "Patient")
+        self.assertEqual(inst.test[0].description, "Read a Patient from the first destination test system using the user defined dynamic variable ${Dest1PatientResourceId}. Perform basic validation.")
+        self.assertEqual(inst.test[0].id, "01-ReadPatient-Destination1")
+        self.assertEqual(inst.test[0].name, "ReadPatient-Destination1")
+        self.assertEqual(inst.test[1].action[0].operation.accept, "xml")
+        self.assertEqual(inst.test[1].action[0].operation.contentType, "xml")
+        self.assertEqual(inst.test[1].action[0].operation.description, "Read a Patient from the second destination test system and perform basic validation.")
+        self.assertEqual(inst.test[1].action[0].operation.destination, 2)
+        self.assertEqual(inst.test[1].action[0].operation.origin, 1)
+        self.assertEqual(inst.test[1].action[0].operation.params, "/${Dest2PatientResourceId}")
+        self.assertEqual(inst.test[1].action[0].operation.requestHeader[0].field, "Accept-Charset")
+        self.assertEqual(inst.test[1].action[0].operation.requestHeader[0].value, "utf-8")
+        self.assertEqual(inst.test[1].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[1].action[0].operation.type.code, "read")
+        self.assertEqual(inst.test[1].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[1].action[1].assert_fhir.description, "Confirm that the client requested an Accept of xml.")
+        self.assertEqual(inst.test[1].action[1].assert_fhir.direction, "request")
+        self.assertEqual(inst.test[1].action[1].assert_fhir.headerField, "Accept")
+        self.assertEqual(inst.test[1].action[1].assert_fhir.operator, "contains")
+        self.assertEqual(inst.test[1].action[1].assert_fhir.value, "xml")
+        self.assertEqual(inst.test[1].action[2].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.test[1].action[2].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[1].action[2].assert_fhir.response, "okay")
+        self.assertEqual(inst.test[1].action[3].assert_fhir.contentType, "xml")
+        self.assertEqual(inst.test[1].action[3].assert_fhir.description, "Confirm that the returned format is XML.")
+        self.assertEqual(inst.test[1].action[3].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[1].action[4].assert_fhir.description, "Confirm that the returned resource type is Patient.")
+        self.assertEqual(inst.test[1].action[4].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[1].action[4].assert_fhir.resource, "Patient")
+        self.assertEqual(inst.test[1].description, "Read a Patient from the second destination test system using the user defined dynamic variable ${Dest2PatientResourceId}. Perform basic validation.")
+        self.assertEqual(inst.test[1].id, "02-ReadPatient-Destination2")
+        self.assertEqual(inst.test[1].name, "ReadPatient-Destination2")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Multisystem Test Script")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/TestScript/testscript-example-multisystem")
+        self.assertEqual(inst.variable[0].defaultValue, "example")
+        self.assertEqual(inst.variable[0].name, "Dest1PatientResourceId")
+        self.assertEqual(inst.variable[1].defaultValue, "example")
+        self.assertEqual(inst.variable[1].name, "Dest2PatientResourceId")
+        self.assertEqual(inst.version, "1.0")
+    
+    def testTestScript3(self):
+        inst = self.instantiate_from("testscript-example-readtest.json")
+        self.assertIsNotNone(inst, "Must have instantiated a TestScript instance")
+        self.implTestScript3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("TestScript", js["resourceType"])
+        inst2 = testscript.TestScript(js)
+        self.implTestScript3(inst2)
+    
+    def implTestScript3(self, inst):
+        self.assertEqual(inst.contact[0].name, "Support")
+        self.assertEqual(inst.contact[0].telecom[0].system, "email")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "support at HL7.org")
+        self.assertEqual(inst.copyright, "© HL7.org 2011+")
+        self.assertEqual(inst.date.date, FHIRDate("2017-01-18").date)
+        self.assertEqual(inst.date.as_json(), "2017-01-18")
+        self.assertEqual(inst.description, "TestScript example resource with ported Sprinkler basic read tests R001, R002, R003, R004. The read tests will utilize user defined dynamic variables that will hold the Patient resource id values.")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "testscript-example-readtest")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.9879")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United States of America (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.metadata.capability[0].description, "Patient Read Operation")
+        self.assertEqual(inst.metadata.capability[0].link[0], "http://hl7.org/fhir/http.html#read")
+        self.assertTrue(inst.metadata.capability[0].required)
+        self.assertEqual(inst.metadata.link[0].description, "Demographics and other administrative information about an individual or animal receiving care or other health-related services.")
+        self.assertEqual(inst.metadata.link[0].url, "http://hl7.org/fhir/patient.html")
+        self.assertEqual(inst.name, "TestScript Example Read Test")
+        self.assertEqual(inst.publisher, "HL7")
+        self.assertEqual(inst.purpose, "Patient Read Operation")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.test[0].action[0].operation.accept, "xml")
+        self.assertEqual(inst.test[0].action[0].operation.description, "Read the known Patient resource on the destination test system using the user defined dynamic variable ${KnownPatientResourceId}.")
+        self.assertEqual(inst.test[0].action[0].operation.params, "/${KnownPatientResourceId}")
+        self.assertEqual(inst.test[0].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[0].action[0].operation.type.code, "read")
+        self.assertEqual(inst.test[0].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.response, "okay")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.contentType, "xml")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.description, "Confirm that the returned format is XML.")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.description, "Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning.")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.headerField, "Last-Modified")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.operator, "notEmpty")
+        self.assertTrue(inst.test[0].action[3].assert_fhir.warningOnly)
+        self.assertEqual(inst.test[0].action[4].assert_fhir.description, "Confirm that the returned resource type is Patient.")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.resource, "Patient")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.description, "Confirm that the returned Patient conforms to the base FHIR specification.")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.validateProfileId, "patient-profile")
+        self.assertEqual(inst.test[0].description, "Read a known Patient and validate response.")
+        self.assertEqual(inst.test[0].id, "R001")
+        self.assertEqual(inst.test[0].name, "Sprinkler Read Test R001")
+        self.assertEqual(inst.test[1].action[0].operation.accept, "xml")
+        self.assertEqual(inst.test[1].action[0].operation.params, "/1")
+        self.assertEqual(inst.test[1].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[1].action[0].operation.type.code, "read")
+        self.assertEqual(inst.test[1].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[1].action[1].assert_fhir.description, "Confirm that the returned HTTP status is 404(Not Found).")
+        self.assertEqual(inst.test[1].action[1].assert_fhir.response, "notFound")
+        self.assertEqual(inst.test[1].description, "Read an unknown Resource Type and validate response.")
+        self.assertEqual(inst.test[1].id, "R002")
+        self.assertEqual(inst.test[1].name, "Sprinkler Read Test R002")
+        self.assertEqual(inst.test[2].action[0].operation.accept, "xml")
+        self.assertEqual(inst.test[2].action[0].operation.description, "Attempt to read the non-existing Patient resource on the destination test system using the user defined dynamic variable ${NonExistsPatientResourceId}.")
+        self.assertEqual(inst.test[2].action[0].operation.params, "/${NonExistsPatientResourceId}")
+        self.assertEqual(inst.test[2].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[2].action[0].operation.type.code, "read")
+        self.assertEqual(inst.test[2].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[2].action[1].assert_fhir.description, "Confirm that the returned HTTP status is 404(Not Found).")
+        self.assertEqual(inst.test[2].action[1].assert_fhir.response, "notFound")
+        self.assertEqual(inst.test[2].description, "Read a known, non-existing Patient and validate response.")
+        self.assertEqual(inst.test[2].id, "R003")
+        self.assertEqual(inst.test[2].name, "Sprinkler Read Test R003")
+        self.assertEqual(inst.test[3].action[0].operation.accept, "xml")
+        self.assertEqual(inst.test[3].action[0].operation.description, "Attempt to read a Patient resource on the destination test system using known bad formatted resource id.")
+        self.assertEqual(inst.test[3].action[0].operation.params, "/ID-may-not-contain-CAPITALS")
+        self.assertEqual(inst.test[3].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[3].action[0].operation.type.code, "read")
+        self.assertEqual(inst.test[3].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[3].action[1].assert_fhir.description, "Confirm that the returned HTTP status is 400(Bad Request).")
+        self.assertEqual(inst.test[3].action[1].assert_fhir.response, "bad")
+        self.assertEqual(inst.test[3].description, "Read a Patient using a known bad formatted resource id and validate response.")
+        self.assertEqual(inst.test[3].id, "R004")
+        self.assertEqual(inst.test[3].name, "Sprinkler Read Test R004")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/TestScript/testscript-example-readtest")
+        self.assertEqual(inst.variable[0].defaultValue, "example")
+        self.assertEqual(inst.variable[0].name, "KnownPatientResourceId")
+        self.assertEqual(inst.variable[1].defaultValue, "does-not-exist")
+        self.assertEqual(inst.variable[1].name, "NonExistsPatientResourceId")
+        self.assertEqual(inst.version, "1.0")
+    
+    def testTestScript4(self):
+        inst = self.instantiate_from("testscript-example-rule.json")
+        self.assertIsNotNone(inst, "Must have instantiated a TestScript instance")
+        self.implTestScript4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("TestScript", js["resourceType"])
+        inst2 = testscript.TestScript(js)
+        self.implTestScript4(inst2)
+    
+    def implTestScript4(self, inst):
+        self.assertEqual(inst.contact[0].name, "Support")
+        self.assertEqual(inst.contact[0].telecom[0].system, "email")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "support at HL7.org")
+        self.assertEqual(inst.copyright, "© HL7.org 2011+")
+        self.assertEqual(inst.date.date, FHIRDate("2017-01-18").date)
+        self.assertEqual(inst.date.as_json(), "2017-01-18")
+        self.assertTrue(inst.experimental)
+        self.assertFalse(inst.fixture[0].autocreate)
+        self.assertFalse(inst.fixture[0].autodelete)
+        self.assertEqual(inst.fixture[0].id, "fixture-patient-create")
+        self.assertFalse(inst.fixture[1].autocreate)
+        self.assertFalse(inst.fixture[1].autodelete)
+        self.assertEqual(inst.fixture[1].id, "fixture-patient-minimum")
+        self.assertEqual(inst.id, "testscript-example-rule")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.9880")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United States of America (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.metadata.capability[0].description, "Patient Update, Read and Delete Operations")
+        self.assertEqual(inst.metadata.capability[0].link[0], "http://hl7.org/fhir/http.html#delete")
+        self.assertEqual(inst.metadata.capability[0].link[1], "http://hl7.org/fhir/http.html#read")
+        self.assertEqual(inst.metadata.capability[0].link[2], "http://hl7.org/fhir/http.html#update")
+        self.assertTrue(inst.metadata.capability[0].required)
+        self.assertEqual(inst.metadata.link[0].description, "Demographics and other administrative information about an individual or animal receiving care or other health-related services.")
+        self.assertEqual(inst.metadata.link[0].url, "http://hl7.org/fhir/patient.html")
+        self.assertEqual(inst.name, "TestScript Example")
+        self.assertEqual(inst.publisher, "HL7")
+        self.assertEqual(inst.purpose, "Patient Conditional Create (Update), Read and Delete Operations")
+        self.assertEqual(inst.rule[0].id, "rule-responseStatusCode")
+        self.assertEqual(inst.rule[0].param[0].name, "expectedStatusCode")
+        self.assertEqual(inst.rule[0].param[0].value, "200")
+        self.assertEqual(inst.ruleset[0].id, "ruleset-responseContentTypeStatusCode")
+        self.assertEqual(inst.ruleset[0].rule[0].param[0].name, "expectedContentType")
+        self.assertEqual(inst.ruleset[0].rule[0].param[0].value, "json")
+        self.assertEqual(inst.ruleset[0].rule[0].ruleId, "RuleResponseContentType")
+        self.assertEqual(inst.ruleset[0].rule[1].param[0].name, "expectedStatusCode")
+        self.assertEqual(inst.ruleset[0].rule[1].param[0].value, "200")
+        self.assertEqual(inst.ruleset[0].rule[1].ruleId, "RuleResponseStatusCode")
+        self.assertEqual(inst.setup.action[0].operation.accept, "json")
+        self.assertEqual(inst.setup.action[0].operation.description, "Execute a delete operation to insure the patient does not exist on the server.")
+        self.assertEqual(inst.setup.action[0].operation.label, "SetupDeletePatient")
+        self.assertEqual(inst.setup.action[0].operation.params, "/${createResourceId}")
+        self.assertEqual(inst.setup.action[0].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[0].operation.type.code, "delete")
+        self.assertEqual(inst.setup.action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[1].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK) or 204(No Content).")
+        self.assertEqual(inst.setup.action[1].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[1].assert_fhir.operator, "in")
+        self.assertEqual(inst.setup.action[1].assert_fhir.responseCode, "200,204")
+        self.assertEqual(inst.setup.action[2].operation.accept, "json")
+        self.assertEqual(inst.setup.action[2].operation.contentType, "json")
+        self.assertEqual(inst.setup.action[2].operation.description, "Create patient resource on test server using the contents of fixture-patient-create")
+        self.assertEqual(inst.setup.action[2].operation.label, "SetupCreatePatient")
+        self.assertEqual(inst.setup.action[2].operation.params, "/${createResourceId}")
+        self.assertEqual(inst.setup.action[2].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[2].operation.sourceId, "fixture-patient-create")
+        self.assertEqual(inst.setup.action[2].operation.type.code, "update")
+        self.assertEqual(inst.setup.action[2].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[3].assert_fhir.description, "Confirm that the returned HTTP status is 201(Created).")
+        self.assertEqual(inst.setup.action[3].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[3].assert_fhir.label, "Setup-RuleCreateOK")
+        self.assertEqual(inst.setup.action[3].assert_fhir.rule.param[0].name, "expectedStatusCode")
+        self.assertEqual(inst.setup.action[3].assert_fhir.rule.param[0].value, "201")
+        self.assertEqual(inst.setup.action[3].assert_fhir.rule.ruleId, "rule-responseStatusCode")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.test[0].action[0].operation.description, "Read the patient resource on the test server using the id from fixture-patient-create. Prevent URL encoding of the request.")
+        self.assertFalse(inst.test[0].action[0].operation.encodeRequestUrl)
+        self.assertEqual(inst.test[0].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[0].action[0].operation.responseId, "fixture-patient-read")
+        self.assertEqual(inst.test[0].action[0].operation.targetId, "fixture-patient-create")
+        self.assertEqual(inst.test[0].action[0].operation.type.code, "read")
+        self.assertEqual(inst.test[0].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.label, "01-RuleReadPatientOK")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.rule.ruleId, "rule-responseStatusCode")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.label, "01-RuleReadPatientContentType")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.ruleset.rule[0].param[0].name, "expectedContentType")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.ruleset.rule[0].param[0].value, "XML")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.ruleset.rule[0].ruleId, "RuleResponseContentType")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.ruleset.rulesetId, "ruleset-responseResourcePatient")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.description, "Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning.")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.headerField, "Last-Modified")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.operator, "notEmpty")
+        self.assertTrue(inst.test[0].action[3].assert_fhir.warningOnly)
+        self.assertEqual(inst.test[0].action[4].assert_fhir.description, "Confirm that the returned resource type is Patient.")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.resource, "Patient")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.description, "Confirm that the returned Patient conforms to the base FHIR specification.")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.validateProfileId, "patient-profile")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.description, "Confirm that the returned Patient contains the expected family name 'Chalmers'. Uses explicit sourceId reference to read responseId fixture.")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.operator, "equals")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.path, "fhir:Patient/fhir:name/fhir:family/@value")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.sourceId, "fixture-patient-read")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.value, "Chalmers")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.description, "Confirm that the returned Patient contains the expected given name 'Peter'. Uses explicit sourceId reference to read responseId fixture.")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.operator, "equals")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.path, "fhir:Patient/fhir:name/fhir:given/@value")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.sourceId, "fixture-patient-read")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.value, "Peter")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.compareToSourceId, "fixture-patient-create")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.compareToSourcePath, "fhir:Patient/fhir:name/fhir:family/@value")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.operator, "equals")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.path, "fhir:Patient/fhir:name/fhir:family/@value")
+        self.assertEqual(inst.test[0].action[9].assert_fhir.compareToSourceId, "fixture-patient-create")
+        self.assertEqual(inst.test[0].action[9].assert_fhir.compareToSourcePath, "fhir:Patient/fhir:name/fhir:given/@value")
+        self.assertEqual(inst.test[0].action[9].assert_fhir.path, "fhir:Patient/fhir:name/fhir:given/@value")
+        self.assertEqual(inst.test[0].action[9].assert_fhir.sourceId, "fixture-patient-read")
+        self.assertEqual(inst.test[0].description, "Read a patient and validate response.")
+        self.assertEqual(inst.test[0].id, "01-ReadPatient")
+        self.assertEqual(inst.test[0].name, "Read Patient")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/TestScript/testscript-example-rule")
+        self.assertEqual(inst.variable[0].name, "createResourceId")
+        self.assertEqual(inst.variable[0].path, "Patient/id")
+        self.assertEqual(inst.variable[0].sourceId, "fixture-patient-create")
+        self.assertEqual(inst.version, "1.0")
+    
+    def testTestScript5(self):
+        inst = self.instantiate_from("testscript-example-search.json")
+        self.assertIsNotNone(inst, "Must have instantiated a TestScript instance")
+        self.implTestScript5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("TestScript", js["resourceType"])
+        inst2 = testscript.TestScript(js)
+        self.implTestScript5(inst2)
+    
+    def implTestScript5(self, inst):
+        self.assertEqual(inst.contact[0].name, "Support")
+        self.assertEqual(inst.contact[0].telecom[0].system, "email")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "support at HL7.org")
+        self.assertEqual(inst.copyright, "© HL7.org 2011+")
+        self.assertEqual(inst.date.date, FHIRDate("2017-01-18").date)
+        self.assertEqual(inst.date.as_json(), "2017-01-18")
+        self.assertEqual(inst.description, "TestScript example resource with simple Patient search test. The read tests will utilize user defined dynamic variables that will hold the Patient search parameter values.")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.fixture[0].id, "fixture-patient-create")
+        self.assertEqual(inst.id, "testscript-example-search")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.9881")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United States of America (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.metadata.capability[0].description, "Patient Search Operation")
+        self.assertEqual(inst.metadata.capability[0].link[0], "http://hl7.org/fhir/http.html#search")
+        self.assertTrue(inst.metadata.capability[0].required)
+        self.assertEqual(inst.metadata.link[0].description, "Demographics and other administrative information about an individual or animal receiving care or other health-related services.")
+        self.assertEqual(inst.metadata.link[0].url, "http://hl7.org/fhir/patient.html")
+        self.assertEqual(inst.name, "TestScript Example Search")
+        self.assertEqual(inst.publisher, "HL7")
+        self.assertEqual(inst.purpose, "Patient Search Operation")
+        self.assertEqual(inst.setup.action[0].operation.accept, "xml")
+        self.assertEqual(inst.setup.action[0].operation.description, "Test simple search to verify server support.")
+        self.assertEqual(inst.setup.action[0].operation.params, "?family=DONTEXPECTAMATCH&given=DONTEXPECTAMATCH")
+        self.assertEqual(inst.setup.action[0].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[0].operation.type.code, "search")
+        self.assertEqual(inst.setup.action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[1].assert_fhir.description, "Confirm that the request url contains the family search parameter.")
+        self.assertEqual(inst.setup.action[1].assert_fhir.direction, "request")
+        self.assertEqual(inst.setup.action[1].assert_fhir.operator, "contains")
+        self.assertEqual(inst.setup.action[1].assert_fhir.requestURL, "family")
+        self.assertEqual(inst.setup.action[2].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.setup.action[2].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[2].assert_fhir.responseCode, "200")
+        self.assertEqual(inst.setup.action[3].assert_fhir.description, "Confirm that the returned resource type is Bundle.")
+        self.assertEqual(inst.setup.action[3].assert_fhir.resource, "Bundle")
+        self.assertEqual(inst.setup.action[4].assert_fhir.description, "Confirm that the returned Bundle correctly defines the navigation links.")
+        self.assertTrue(inst.setup.action[4].assert_fhir.navigationLinks)
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.test[0].action[0].operation.accept, "xml")
+        self.assertEqual(inst.test[0].action[0].operation.contentType, "xml")
+        self.assertEqual(inst.test[0].action[0].operation.description, "Create a Patient resource and capture the returned HTTP Header Location.")
+        self.assertEqual(inst.test[0].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[0].action[0].operation.responseId, "PatientCreateResponse")
+        self.assertEqual(inst.test[0].action[0].operation.sourceId, "fixture-patient-create")
+        self.assertEqual(inst.test[0].action[0].operation.type.code, "create")
+        self.assertEqual(inst.test[0].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.description, "Confirm that the returned HTTP status is 201(Created).")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.response, "created")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.description, "Confirm that the returned HTTP Header Location is present.")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.headerField, "Location")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.operator, "notEmpty")
+        self.assertEqual(inst.test[0].action[3].operation.accept, "xml")
+        self.assertEqual(inst.test[0].action[3].operation.description, "Read the created Patient using the captured Location URL value.")
+        self.assertEqual(inst.test[0].action[3].operation.type.code, "read")
+        self.assertEqual(inst.test[0].action[3].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[0].action[3].operation.url, "${PatientCreateLocation}")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.response, "okay")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.description, "Confirm that the returned resource type is Patient.")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.resource, "Patient")
+        self.assertEqual(inst.test[0].description, "Create a Patient resource and capture the returned HTTP Header Location. Then search for (read) that Patient using the Location URL value and validate the response.")
+        self.assertEqual(inst.test[0].id, "01-PatientCreateSearch")
+        self.assertEqual(inst.test[0].name, "Patient Create Search")
+        self.assertEqual(inst.test[1].action[0].operation.accept, "xml")
+        self.assertEqual(inst.test[1].action[0].operation.description, "Search for Patient resources on the destination test system.")
+        self.assertEqual(inst.test[1].action[0].operation.params, "?family=${PatientSearchFamilyName}&given=${PatientSearchGivenName}")
+        self.assertEqual(inst.test[1].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[1].action[0].operation.type.code, "search")
+        self.assertEqual(inst.test[1].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[1].action[1].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.test[1].action[1].assert_fhir.response, "okay")
+        self.assertEqual(inst.test[1].action[2].assert_fhir.contentType, "xml")
+        self.assertEqual(inst.test[1].action[2].assert_fhir.description, "Confirm that the returned format is XML.")
+        self.assertEqual(inst.test[1].action[3].assert_fhir.description, "Confirm that the returned resource type is Bundle.")
+        self.assertEqual(inst.test[1].action[3].assert_fhir.resource, "Bundle")
+        self.assertEqual(inst.test[1].action[4].assert_fhir.description, "Confirm that the returned Bundle conforms to the base FHIR specification.")
+        self.assertEqual(inst.test[1].action[4].assert_fhir.validateProfileId, "bundle-profile")
+        self.assertEqual(inst.test[1].action[5].assert_fhir.description, "Confirm that the returned Bundle type equals 'searchset'.")
+        self.assertEqual(inst.test[1].action[5].assert_fhir.operator, "equals")
+        self.assertEqual(inst.test[1].action[5].assert_fhir.path, "fhir:Bundle/fhir:type/@value")
+        self.assertEqual(inst.test[1].action[5].assert_fhir.value, "searchset")
+        self.assertEqual(inst.test[1].action[6].assert_fhir.description, "Confirm that the returned Bundle total is greater than or equal to the number of returned entries.")
+        self.assertEqual(inst.test[1].action[6].assert_fhir.expression, "Bundle.total.toInteger() >= entry.count()")
+        self.assertEqual(inst.test[1].description, "Search for Patient resources using the user defined dynamic variables ${PatientSearchFamilyName} and ${PatientSearchGivenName} and validate response.")
+        self.assertEqual(inst.test[1].id, "02-PatientSearchDynamic")
+        self.assertEqual(inst.test[1].name, "Patient Search Dynamic")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/TestScript/testscript-example-search")
+        self.assertEqual(inst.variable[0].headerField, "Location")
+        self.assertEqual(inst.variable[0].name, "PatientCreateLocation")
+        self.assertEqual(inst.variable[0].sourceId, "PatientCreateResponse")
+        self.assertEqual(inst.variable[1].description, "Enter patient search criteria for a known family name on the target system")
+        self.assertEqual(inst.variable[1].hint, "[Family name]")
+        self.assertEqual(inst.variable[1].name, "PatientSearchFamilyName")
+        self.assertEqual(inst.variable[2].description, "Enter patient search criteria for a known given name on the target system")
+        self.assertEqual(inst.variable[2].hint, "[Given name]")
+        self.assertEqual(inst.variable[2].name, "PatientSearchGivenName")
+        self.assertEqual(inst.variable[3].description, "Evaluate the returned Patient searchset Bundle.total value")
+        self.assertEqual(inst.variable[3].expression, "Bundle.total.toInteger()")
+        self.assertEqual(inst.variable[3].name, "PatientSearchBundleTotal")
+        self.assertEqual(inst.version, "1.0")
+    
+    def testTestScript6(self):
+        inst = self.instantiate_from("testscript-example-update.json")
+        self.assertIsNotNone(inst, "Must have instantiated a TestScript instance")
+        self.implTestScript6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("TestScript", js["resourceType"])
+        inst2 = testscript.TestScript(js)
+        self.implTestScript6(inst2)
+    
+    def implTestScript6(self, inst):
+        self.assertEqual(inst.contact[0].name, "Support")
+        self.assertEqual(inst.contact[0].telecom[0].system, "email")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "support at HL7.org")
+        self.assertEqual(inst.copyright, "© HL7.org 2011+")
+        self.assertEqual(inst.date.date, FHIRDate("2017-01-18").date)
+        self.assertEqual(inst.date.as_json(), "2017-01-18")
+        self.assertEqual(inst.description, "TestScript example resource with setup to delete if present and create a new instance of a Patient; and single test definition to update that Patient with various asserts.")
+        self.assertTrue(inst.experimental)
+        self.assertFalse(inst.fixture[0].autocreate)
+        self.assertFalse(inst.fixture[0].autodelete)
+        self.assertEqual(inst.fixture[0].id, "fixture-patient-create")
+        self.assertFalse(inst.fixture[1].autocreate)
+        self.assertFalse(inst.fixture[1].autodelete)
+        self.assertEqual(inst.fixture[1].id, "fixture-patient-update")
+        self.assertEqual(inst.id, "testscript-example-update")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.9882")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United States of America (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.metadata.capability[0].description, "Patient Update and Delete Operations")
+        self.assertEqual(inst.metadata.capability[0].link[0], "http://hl7.org/fhir/http.html#update")
+        self.assertEqual(inst.metadata.capability[0].link[1], "http://hl7.org/fhir/http.html#delete")
+        self.assertTrue(inst.metadata.capability[0].required)
+        self.assertEqual(inst.metadata.link[0].description, "Demographics and other administrative information about an individual or animal receiving care or other health-related services.")
+        self.assertEqual(inst.metadata.link[0].url, "http://hl7.org/fhir/patient.html")
+        self.assertEqual(inst.name, "TestScript Example Update")
+        self.assertEqual(inst.publisher, "HL7")
+        self.assertEqual(inst.purpose, "Patient (Conditional) Create, Update, Delete Operations")
+        self.assertEqual(inst.setup.action[0].operation.accept, "xml")
+        self.assertEqual(inst.setup.action[0].operation.description, "Execute a delete operation to insure the patient does not exist on the server.")
+        self.assertEqual(inst.setup.action[0].operation.label, "SetupDeletePatient")
+        self.assertEqual(inst.setup.action[0].operation.params, "/${createResourceId}")
+        self.assertEqual(inst.setup.action[0].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[0].operation.type.code, "delete")
+        self.assertEqual(inst.setup.action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[1].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK) or 204(No Content).")
+        self.assertEqual(inst.setup.action[1].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[1].assert_fhir.operator, "in")
+        self.assertEqual(inst.setup.action[1].assert_fhir.responseCode, "200,204")
+        self.assertEqual(inst.setup.action[2].operation.accept, "xml")
+        self.assertEqual(inst.setup.action[2].operation.contentType, "xml")
+        self.assertEqual(inst.setup.action[2].operation.description, "Create patient resource on test server using the contents of fixture-patient-create")
+        self.assertEqual(inst.setup.action[2].operation.label, "SetupCreatePatient")
+        self.assertEqual(inst.setup.action[2].operation.params, "/${createResourceId}")
+        self.assertEqual(inst.setup.action[2].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[2].operation.sourceId, "fixture-patient-create")
+        self.assertEqual(inst.setup.action[2].operation.type.code, "update")
+        self.assertEqual(inst.setup.action[2].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[3].assert_fhir.description, "Confirm that the returned HTTP status is 201(Created).")
+        self.assertEqual(inst.setup.action[3].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[3].assert_fhir.responseCode, "201")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.test[0].action[0].operation.accept, "xml")
+        self.assertEqual(inst.test[0].action[0].operation.contentType, "xml")
+        self.assertEqual(inst.test[0].action[0].operation.description, "Update patient resource on test server using the contents of fixture-patient-update")
+        self.assertEqual(inst.test[0].action[0].operation.label, "SetupUpdatePatient")
+        self.assertEqual(inst.test[0].action[0].operation.params, "/${createResourceId}")
+        self.assertEqual(inst.test[0].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[0].action[0].operation.sourceId, "fixture-patient-update")
+        self.assertEqual(inst.test[0].action[0].operation.type.code, "update")
+        self.assertEqual(inst.test[0].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.response, "okay")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.contentType, "xml")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.description, "Confirm that the returned format is XML.")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.description, "Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning.")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.headerField, "Last-Modified")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.operator, "notEmpty")
+        self.assertTrue(inst.test[0].action[3].assert_fhir.warningOnly)
+        self.assertEqual(inst.test[0].description, "Update a Patient and validate response.")
+        self.assertEqual(inst.test[0].id, "01-UpdatePatient")
+        self.assertEqual(inst.test[0].name, "Update Patient")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/TestScript/testscript-example-update")
+        self.assertEqual(inst.variable[0].name, "createResourceId")
+        self.assertEqual(inst.variable[0].path, "Patient/id")
+        self.assertEqual(inst.variable[0].sourceId, "fixture-patient-create")
+        self.assertEqual(inst.version, "1.0")
+    
+    def testTestScript7(self):
+        inst = self.instantiate_from("testscript-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a TestScript instance")
+        self.implTestScript7(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("TestScript", js["resourceType"])
+        inst2 = testscript.TestScript(js)
+        self.implTestScript7(inst2)
+    
+    def implTestScript7(self, inst):
+        self.assertEqual(inst.contact[0].name, "Support")
+        self.assertEqual(inst.contact[0].telecom[0].system, "email")
+        self.assertEqual(inst.contact[0].telecom[0].use, "work")
+        self.assertEqual(inst.contact[0].telecom[0].value, "support at HL7.org")
+        self.assertEqual(inst.copyright, "© HL7.org 2011+")
+        self.assertEqual(inst.date.date, FHIRDate("2017-01-18").date)
+        self.assertEqual(inst.date.as_json(), "2017-01-18")
+        self.assertEqual(inst.description, "TestScript example resource with setup to delete if present and create a new instance of a Patient; and single test definition to read the created Patient with various asserts.")
+        self.assertTrue(inst.experimental)
+        self.assertFalse(inst.fixture[0].autocreate)
+        self.assertFalse(inst.fixture[0].autodelete)
+        self.assertEqual(inst.fixture[0].id, "fixture-patient-create")
+        self.assertFalse(inst.fixture[1].autocreate)
+        self.assertFalse(inst.fixture[1].autodelete)
+        self.assertEqual(inst.fixture[1].id, "fixture-patient-minimum")
+        self.assertEqual(inst.id, "testscript-example")
+        self.assertEqual(inst.identifier.system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier.value, "urn:oid:1.3.6.1.4.1.21367.2005.3.7.9876")
+        self.assertEqual(inst.jurisdiction[0].coding[0].code, "US")
+        self.assertEqual(inst.jurisdiction[0].coding[0].display, "United States of America (the)")
+        self.assertEqual(inst.jurisdiction[0].coding[0].system, "urn:iso:std:iso:3166")
+        self.assertEqual(inst.metadata.capability[0].description, "Patient Update, Read and Delete Operations")
+        self.assertEqual(inst.metadata.capability[0].link[0], "http://hl7.org/fhir/http.html#delete")
+        self.assertEqual(inst.metadata.capability[0].link[1], "http://hl7.org/fhir/http.html#read")
+        self.assertEqual(inst.metadata.capability[0].link[2], "http://hl7.org/fhir/http.html#update")
+        self.assertTrue(inst.metadata.capability[0].required)
+        self.assertEqual(inst.metadata.link[0].description, "Demographics and other administrative information about an individual or animal receiving care or other health-related services.")
+        self.assertEqual(inst.metadata.link[0].url, "http://hl7.org/fhir/patient.html")
+        self.assertEqual(inst.name, "TestScript Example")
+        self.assertEqual(inst.publisher, "HL7")
+        self.assertEqual(inst.purpose, "Patient Conditional Create (Update), Read and Delete Operations")
+        self.assertEqual(inst.setup.action[0].operation.accept, "json")
+        self.assertEqual(inst.setup.action[0].operation.description, "Execute a delete operation to insure the patient does not exist on the server.")
+        self.assertEqual(inst.setup.action[0].operation.label, "SetupDeletePatient")
+        self.assertEqual(inst.setup.action[0].operation.params, "/${createResourceId}")
+        self.assertEqual(inst.setup.action[0].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[0].operation.type.code, "delete")
+        self.assertEqual(inst.setup.action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[1].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK) or 204(No Content).")
+        self.assertEqual(inst.setup.action[1].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[1].assert_fhir.operator, "in")
+        self.assertEqual(inst.setup.action[1].assert_fhir.responseCode, "200,204")
+        self.assertEqual(inst.setup.action[2].operation.accept, "json")
+        self.assertEqual(inst.setup.action[2].operation.contentType, "json")
+        self.assertEqual(inst.setup.action[2].operation.description, "Create patient resource on test server using the contents of fixture-patient-create")
+        self.assertEqual(inst.setup.action[2].operation.label, "SetupCreatePatient")
+        self.assertEqual(inst.setup.action[2].operation.params, "/${createResourceId}")
+        self.assertEqual(inst.setup.action[2].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[2].operation.sourceId, "fixture-patient-create")
+        self.assertEqual(inst.setup.action[2].operation.type.code, "update")
+        self.assertEqual(inst.setup.action[2].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[3].assert_fhir.description, "Confirm that the returned HTTP status is 201(Created).")
+        self.assertEqual(inst.setup.action[3].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[3].assert_fhir.responseCode, "201")
+        self.assertEqual(inst.setup.action[4].operation.description, "Read the created patient resource on the test server using the id from fixture-patient-create. Verify contents.")
+        self.assertEqual(inst.setup.action[4].operation.resource, "Patient")
+        self.assertEqual(inst.setup.action[4].operation.targetId, "fixture-patient-create")
+        self.assertEqual(inst.setup.action[4].operation.type.code, "read")
+        self.assertEqual(inst.setup.action[4].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.setup.action[5].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.setup.action[5].assert_fhir.direction, "response")
+        self.assertEqual(inst.setup.action[5].assert_fhir.response, "okay")
+        self.assertEqual(inst.setup.action[6].assert_fhir.compareToSourceExpression, "Patient.name.first().family")
+        self.assertEqual(inst.setup.action[6].assert_fhir.compareToSourceId, "fixture-patient-create")
+        self.assertEqual(inst.setup.action[6].assert_fhir.description, "Confirm that the returned Patient contains the expected family name 'Chalmers'. Uses explicit compareToSourceId reference to fixture-patient-create used to create the Patient.")
+        self.assertEqual(inst.setup.action[6].assert_fhir.operator, "equals")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.teardown.action[0].operation.description, "Delete the patient resource on the test server using the id from fixture-patient-create.")
+        self.assertEqual(inst.teardown.action[0].operation.resource, "Patient")
+        self.assertEqual(inst.teardown.action[0].operation.targetId, "fixture-patient-create")
+        self.assertEqual(inst.teardown.action[0].operation.type.code, "delete")
+        self.assertEqual(inst.teardown.action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[0].action[0].operation.description, "Read the patient resource on the test server using the id from fixture-patient-create. Prevent URL encoding of the request.")
+        self.assertFalse(inst.test[0].action[0].operation.encodeRequestUrl)
+        self.assertEqual(inst.test[0].action[0].operation.resource, "Patient")
+        self.assertEqual(inst.test[0].action[0].operation.responseId, "fixture-patient-read")
+        self.assertEqual(inst.test[0].action[0].operation.targetId, "fixture-patient-create")
+        self.assertEqual(inst.test[0].action[0].operation.type.code, "read")
+        self.assertEqual(inst.test[0].action[0].operation.type.system, "http://hl7.org/fhir/testscript-operation-codes")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.description, "Confirm that the returned HTTP status is 200(OK).")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.label, "01-ReadPatientOK")
+        self.assertEqual(inst.test[0].action[1].assert_fhir.response, "okay")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.description, "Confirm that the returned HTTP Header Last-Modified is present. Warning only as the server may not support versioning.")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.direction, "response")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.headerField, "Last-Modified")
+        self.assertEqual(inst.test[0].action[2].assert_fhir.operator, "notEmpty")
+        self.assertTrue(inst.test[0].action[2].assert_fhir.warningOnly)
+        self.assertEqual(inst.test[0].action[3].assert_fhir.description, "Confirm that the returned resource type is Patient.")
+        self.assertEqual(inst.test[0].action[3].assert_fhir.resource, "Patient")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.description, "Confirm that the returned Patient conforms to the base FHIR specification.")
+        self.assertEqual(inst.test[0].action[4].assert_fhir.validateProfileId, "patient-profile")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.description, "Confirm that the returned Patient contains the expected family name 'Chalmers'. Uses explicit sourceId reference to read responseId fixture.")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.operator, "equals")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.path, "fhir:Patient/fhir:name/fhir:family/@value")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.sourceId, "fixture-patient-read")
+        self.assertEqual(inst.test[0].action[5].assert_fhir.value, "Chalmers")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.description, "Confirm that the returned Patient contains the expected given name 'Peter'. Uses explicit sourceId reference to read responseId fixture.")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.operator, "equals")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.path, "fhir:Patient/fhir:name/fhir:given/@value")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.sourceId, "fixture-patient-read")
+        self.assertEqual(inst.test[0].action[6].assert_fhir.value, "Peter")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.compareToSourceId, "fixture-patient-create")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.compareToSourcePath, "fhir:Patient/fhir:name/fhir:family/@value")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.operator, "equals")
+        self.assertEqual(inst.test[0].action[7].assert_fhir.path, "fhir:Patient/fhir:name/fhir:family/@value")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.compareToSourceId, "fixture-patient-create")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.compareToSourcePath, "fhir:Patient/fhir:name/fhir:given/@value")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.path, "fhir:Patient/fhir:name/fhir:given/@value")
+        self.assertEqual(inst.test[0].action[8].assert_fhir.sourceId, "fixture-patient-read")
+        self.assertEqual(inst.test[0].action[9].assert_fhir.description, "Confirm that the returned resource contains the expected retained elements and values. Warning only to provide users with reviewable results.")
+        self.assertEqual(inst.test[0].action[9].assert_fhir.minimumId, "fixture-patient-minimum")
+        self.assertTrue(inst.test[0].action[9].assert_fhir.warningOnly)
+        self.assertEqual(inst.test[0].description, "Read a Patient and validate response.")
+        self.assertEqual(inst.test[0].id, "01-ReadPatient")
+        self.assertEqual(inst.test[0].name, "Read Patient")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/TestScript/testscript-example")
+        self.assertEqual(inst.useContext[0].code.code, "focus")
+        self.assertEqual(inst.useContext[0].code.system, "http://hl7.org/fhir/usage-context-type")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].code, "positive")
+        self.assertEqual(inst.useContext[0].valueCodeableConcept.coding[0].system, "http://hl7.org/fhir/variant-state")
+        self.assertEqual(inst.variable[0].name, "createResourceId")
+        self.assertEqual(inst.variable[0].path, "Patient/id")
+        self.assertEqual(inst.variable[0].sourceId, "fixture-patient-create")
+        self.assertEqual(inst.version, "1.0")
+
diff --git a/fhirclient/models/timing.py b/fhirclient/models/timing.py
new file mode 100644
index 0000000..051db4f
--- /dev/null
+++ b/fhirclient/models/timing.py
@@ -0,0 +1,184 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Timing) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class Timing(element.Element):
+    """ A timing schedule that specifies an event that may occur multiple times.
+    
+    Specifies an event that may occur multiple times. Timing schedules are used
+    to record when things are planned, expected or requested to occur. The most
+    common usage is in dosage instructions for medications. They are also used
+    when planning care of various kinds, and may be used for reporting the
+    schedule to which past regular activities were carried out.
+    """
+    
+    resource_type = "Timing"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ BID | TID | QID | AM | PM | QD | QOD | Q4H | Q6H +.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.event = None
+        """ When the event occurs.
+        List of `FHIRDate` items (represented as `str` in JSON). """
+        
+        self.repeat = None
+        """ When the event is to occur.
+        Type `TimingRepeat` (represented as `dict` in JSON). """
+        
+        super(Timing, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(Timing, self).elementProperties()
+        js.extend([
+            ("code", "code", codeableconcept.CodeableConcept, False, None, False),
+            ("event", "event", fhirdate.FHIRDate, True, None, False),
+            ("repeat", "repeat", TimingRepeat, False, None, False),
+        ])
+        return js
+
+
+class TimingRepeat(element.Element):
+    """ When the event is to occur.
+    
+    A set of rules that describe when the event is scheduled.
+    """
+    
+    resource_type = "TimingRepeat"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.boundsDuration = None
+        """ Length/Range of lengths, or (Start and/or end) limits.
+        Type `Duration` (represented as `dict` in JSON). """
+        
+        self.boundsPeriod = None
+        """ Length/Range of lengths, or (Start and/or end) limits.
+        Type `Period` (represented as `dict` in JSON). """
+        
+        self.boundsRange = None
+        """ Length/Range of lengths, or (Start and/or end) limits.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        self.count = None
+        """ Number of times to repeat.
+        Type `int`. """
+        
+        self.countMax = None
+        """ Maximum number of times to repeat.
+        Type `int`. """
+        
+        self.dayOfWeek = None
+        """ mon | tue | wed | thu | fri | sat | sun.
+        List of `str` items. """
+        
+        self.duration = None
+        """ How long when it happens.
+        Type `float`. """
+        
+        self.durationMax = None
+        """ How long when it happens (Max).
+        Type `float`. """
+        
+        self.durationUnit = None
+        """ s | min | h | d | wk | mo | a - unit of time (UCUM).
+        Type `str`. """
+        
+        self.frequency = None
+        """ Event occurs frequency times per period.
+        Type `int`. """
+        
+        self.frequencyMax = None
+        """ Event occurs up to frequencyMax times per period.
+        Type `int`. """
+        
+        self.offset = None
+        """ Minutes from event (before or after).
+        Type `int`. """
+        
+        self.period = None
+        """ Event occurs frequency times per period.
+        Type `float`. """
+        
+        self.periodMax = None
+        """ Upper limit of period (3-4 hours).
+        Type `float`. """
+        
+        self.periodUnit = None
+        """ s | min | h | d | wk | mo | a - unit of time (UCUM).
+        Type `str`. """
+        
+        self.timeOfDay = None
+        """ Time of day for action.
+        List of `FHIRDate` items (represented as `str` in JSON). """
+        
+        self.when = None
+        """ Regular life events the event is tied to.
+        List of `str` items. """
+        
+        super(TimingRepeat, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TimingRepeat, self).elementProperties()
+        js.extend([
+            ("boundsDuration", "boundsDuration", duration.Duration, False, "bounds", False),
+            ("boundsPeriod", "boundsPeriod", period.Period, False, "bounds", False),
+            ("boundsRange", "boundsRange", range.Range, False, "bounds", False),
+            ("count", "count", int, False, None, False),
+            ("countMax", "countMax", int, False, None, False),
+            ("dayOfWeek", "dayOfWeek", str, True, None, False),
+            ("duration", "duration", float, False, None, False),
+            ("durationMax", "durationMax", float, False, None, False),
+            ("durationUnit", "durationUnit", str, False, None, False),
+            ("frequency", "frequency", int, False, None, False),
+            ("frequencyMax", "frequencyMax", int, False, None, False),
+            ("offset", "offset", int, False, None, False),
+            ("period", "period", float, False, None, False),
+            ("periodMax", "periodMax", float, False, None, False),
+            ("periodUnit", "periodUnit", str, False, None, False),
+            ("timeOfDay", "timeOfDay", fhirdate.FHIRDate, True, None, False),
+            ("when", "when", str, True, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import duration
+except ImportError:
+    duration = sys.modules[__package__ + '.duration']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import period
+except ImportError:
+    period = sys.modules[__package__ + '.period']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
diff --git a/fhirclient/models/triggerdefinition.py b/fhirclient/models/triggerdefinition.py
new file mode 100644
index 0000000..f5529fd
--- /dev/null
+++ b/fhirclient/models/triggerdefinition.py
@@ -0,0 +1,87 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/TriggerDefinition) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class TriggerDefinition(element.Element):
+    """ Defines an expected trigger for a module.
+    
+    A description of a triggering event.
+    """
+    
+    resource_type = "TriggerDefinition"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.eventData = None
+        """ Triggering data of the event.
+        Type `DataRequirement` (represented as `dict` in JSON). """
+        
+        self.eventName = None
+        """ Triggering event name.
+        Type `str`. """
+        
+        self.eventTimingDate = None
+        """ Timing of the event.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.eventTimingDateTime = None
+        """ Timing of the event.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.eventTimingReference = None
+        """ Timing of the event.
+        Type `FHIRReference` referencing `Schedule` (represented as `dict` in JSON). """
+        
+        self.eventTimingTiming = None
+        """ Timing of the event.
+        Type `Timing` (represented as `dict` in JSON). """
+        
+        self.type = None
+        """ named-event | periodic | data-added | data-modified | data-removed
+        | data-accessed | data-access-ended.
+        Type `str`. """
+        
+        super(TriggerDefinition, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(TriggerDefinition, self).elementProperties()
+        js.extend([
+            ("eventData", "eventData", datarequirement.DataRequirement, False, None, False),
+            ("eventName", "eventName", str, False, None, False),
+            ("eventTimingDate", "eventTimingDate", fhirdate.FHIRDate, False, "eventTiming", False),
+            ("eventTimingDateTime", "eventTimingDateTime", fhirdate.FHIRDate, False, "eventTiming", False),
+            ("eventTimingReference", "eventTimingReference", fhirreference.FHIRReference, False, "eventTiming", False),
+            ("eventTimingTiming", "eventTimingTiming", timing.Timing, False, "eventTiming", False),
+            ("type", "type", str, False, None, True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import datarequirement
+except ImportError:
+    datarequirement = sys.modules[__package__ + '.datarequirement']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import timing
+except ImportError:
+    timing = sys.modules[__package__ + '.timing']
diff --git a/fhirclient/models/usagecontext.py b/fhirclient/models/usagecontext.py
new file mode 100644
index 0000000..79e419f
--- /dev/null
+++ b/fhirclient/models/usagecontext.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/UsageContext) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import element
+
+class UsageContext(element.Element):
+    """ Describes the context of use for a conformance or knowledge resource.
+    
+    Specifies clinical/business/etc metadata that can be used to retrieve,
+    index and/or categorize an artifact. This metadata can either be specific
+    to the applicable population (e.g., age category, DRG) or the specific
+    context of care (e.g., venue, care setting, provider of care).
+    """
+    
+    resource_type = "UsageContext"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Type of context being specified.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.valueCodeableConcept = None
+        """ Value that defines the context.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.valueQuantity = None
+        """ Value that defines the context.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.valueRange = None
+        """ Value that defines the context.
+        Type `Range` (represented as `dict` in JSON). """
+        
+        super(UsageContext, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(UsageContext, self).elementProperties()
+        js.extend([
+            ("code", "code", coding.Coding, False, None, True),
+            ("valueCodeableConcept", "valueCodeableConcept", codeableconcept.CodeableConcept, False, "value", True),
+            ("valueQuantity", "valueQuantity", quantity.Quantity, False, "value", True),
+            ("valueRange", "valueRange", range.Range, False, "value", True),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
+try:
+    from . import range
+except ImportError:
+    range = sys.modules[__package__ + '.range']
diff --git a/fhirclient/models/valueset.py b/fhirclient/models/valueset.py
new file mode 100644
index 0000000..c02ae6f
--- /dev/null
+++ b/fhirclient/models/valueset.py
@@ -0,0 +1,562 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/ValueSet) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class ValueSet(domainresource.DomainResource):
+    """ A set of codes drawn from one or more code systems.
+    
+    A value set specifies a set of codes drawn from one or more code systems.
+    """
+    
+    resource_type = "ValueSet"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.compose = None
+        """ Definition of the content of the value set (CLD).
+        Type `ValueSetCompose` (represented as `dict` in JSON). """
+        
+        self.contact = None
+        """ Contact details for the publisher.
+        List of `ContactDetail` items (represented as `dict` in JSON). """
+        
+        self.copyright = None
+        """ Use and/or publishing restrictions.
+        Type `str`. """
+        
+        self.date = None
+        """ Date this was last changed.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.description = None
+        """ Natural language description of the value set.
+        Type `str`. """
+        
+        self.expansion = None
+        """ Used when the value set is "expanded".
+        Type `ValueSetExpansion` (represented as `dict` in JSON). """
+        
+        self.experimental = None
+        """ For testing purposes, not real usage.
+        Type `bool`. """
+        
+        self.extensible = None
+        """ Whether this is intended to be used with an extensible binding.
+        Type `bool`. """
+        
+        self.identifier = None
+        """ Additional identifier for the value set.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.immutable = None
+        """ Indicates whether or not any change to the content logical
+        definition may occur.
+        Type `bool`. """
+        
+        self.jurisdiction = None
+        """ Intended jurisdiction for value set (if applicable).
+        List of `CodeableConcept` items (represented as `dict` in JSON). """
+        
+        self.name = None
+        """ Name for this value set (computer friendly).
+        Type `str`. """
+        
+        self.publisher = None
+        """ Name of the publisher (organization or individual).
+        Type `str`. """
+        
+        self.purpose = None
+        """ Why this value set is defined.
+        Type `str`. """
+        
+        self.status = None
+        """ draft | active | retired | unknown.
+        Type `str`. """
+        
+        self.title = None
+        """ Name for this value set (human friendly).
+        Type `str`. """
+        
+        self.url = None
+        """ Logical URI to reference this value set (globally unique).
+        Type `str`. """
+        
+        self.useContext = None
+        """ Context the content is intended to support.
+        List of `UsageContext` items (represented as `dict` in JSON). """
+        
+        self.version = None
+        """ Business version of the value set.
+        Type `str`. """
+        
+        super(ValueSet, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ValueSet, self).elementProperties()
+        js.extend([
+            ("compose", "compose", ValueSetCompose, False, None, False),
+            ("contact", "contact", contactdetail.ContactDetail, True, None, False),
+            ("copyright", "copyright", str, False, None, False),
+            ("date", "date", fhirdate.FHIRDate, False, None, False),
+            ("description", "description", str, False, None, False),
+            ("expansion", "expansion", ValueSetExpansion, False, None, False),
+            ("experimental", "experimental", bool, False, None, False),
+            ("extensible", "extensible", bool, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("immutable", "immutable", bool, False, None, False),
+            ("jurisdiction", "jurisdiction", codeableconcept.CodeableConcept, True, None, False),
+            ("name", "name", str, False, None, False),
+            ("publisher", "publisher", str, False, None, False),
+            ("purpose", "purpose", str, False, None, False),
+            ("status", "status", str, False, None, True),
+            ("title", "title", str, False, None, False),
+            ("url", "url", str, False, None, False),
+            ("useContext", "useContext", usagecontext.UsageContext, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class ValueSetCompose(backboneelement.BackboneElement):
+    """ Definition of the content of the value set (CLD).
+    
+    A set of criteria that define the content logical definition of the value
+    set by including or excluding codes from outside this value set. This I
+    also known as the "Content Logical Definition" (CLD).
+    """
+    
+    resource_type = "ValueSetCompose"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.exclude = None
+        """ Explicitly exclude codes from a code system or other value sets.
+        List of `ValueSetComposeInclude` items (represented as `dict` in JSON). """
+        
+        self.inactive = None
+        """ Whether inactive codes are in the value set.
+        Type `bool`. """
+        
+        self.include = None
+        """ Include one or more codes from a code system or other value set(s).
+        List of `ValueSetComposeInclude` items (represented as `dict` in JSON). """
+        
+        self.lockedDate = None
+        """ Fixed date for version-less references (transitive).
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        super(ValueSetCompose, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ValueSetCompose, self).elementProperties()
+        js.extend([
+            ("exclude", "exclude", ValueSetComposeInclude, True, None, False),
+            ("inactive", "inactive", bool, False, None, False),
+            ("include", "include", ValueSetComposeInclude, True, None, True),
+            ("lockedDate", "lockedDate", fhirdate.FHIRDate, False, None, False),
+        ])
+        return js
+
+
+class ValueSetComposeInclude(backboneelement.BackboneElement):
+    """ Include one or more codes from a code system or other value set(s).
+    """
+    
+    resource_type = "ValueSetComposeInclude"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.concept = None
+        """ A concept defined in the system.
+        List of `ValueSetComposeIncludeConcept` items (represented as `dict` in JSON). """
+        
+        self.filter = None
+        """ Select codes/concepts by their properties (including relationships).
+        List of `ValueSetComposeIncludeFilter` items (represented as `dict` in JSON). """
+        
+        self.system = None
+        """ The system the codes come from.
+        Type `str`. """
+        
+        self.valueSet = None
+        """ Select only contents included in this value set.
+        List of `str` items. """
+        
+        self.version = None
+        """ Specific version of the code system referred to.
+        Type `str`. """
+        
+        super(ValueSetComposeInclude, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ValueSetComposeInclude, self).elementProperties()
+        js.extend([
+            ("concept", "concept", ValueSetComposeIncludeConcept, True, None, False),
+            ("filter", "filter", ValueSetComposeIncludeFilter, True, None, False),
+            ("system", "system", str, False, None, False),
+            ("valueSet", "valueSet", str, True, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+class ValueSetComposeIncludeConcept(backboneelement.BackboneElement):
+    """ A concept defined in the system.
+    
+    Specifies a concept to be included or excluded.
+    """
+    
+    resource_type = "ValueSetComposeIncludeConcept"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.code = None
+        """ Code or expression from system.
+        Type `str`. """
+        
+        self.designation = None
+        """ Additional representations for this concept.
+        List of `ValueSetComposeIncludeConceptDesignation` items (represented as `dict` in JSON). """
+        
+        self.display = None
+        """ Text to display for this code for this value set in this valueset.
+        Type `str`. """
+        
+        super(ValueSetComposeIncludeConcept, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ValueSetComposeIncludeConcept, self).elementProperties()
+        js.extend([
+            ("code", "code", str, False, None, True),
+            ("designation", "designation", ValueSetComposeIncludeConceptDesignation, True, None, False),
+            ("display", "display", str, False, None, False),
+        ])
+        return js
+
+
+class ValueSetComposeIncludeConceptDesignation(backboneelement.BackboneElement):
+    """ Additional representations for this concept.
+    
+    Additional representations for this concept when used in this value set -
+    other languages, aliases, specialized purposes, used for particular
+    purposes, etc.
+    """
+    
+    resource_type = "ValueSetComposeIncludeConceptDesignation"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.language = None
+        """ Human language of the designation.
+        Type `str`. """
+        
+        self.use = None
+        """ Details how this designation would be used.
+        Type `Coding` (represented as `dict` in JSON). """
+        
+        self.value = None
+        """ The text value for this designation.
+        Type `str`. """
+        
+        super(ValueSetComposeIncludeConceptDesignation, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ValueSetComposeIncludeConceptDesignation, self).elementProperties()
+        js.extend([
+            ("language", "language", str, False, None, False),
+            ("use", "use", coding.Coding, False, None, False),
+            ("value", "value", str, False, None, True),
+        ])
+        return js
+
+
+class ValueSetComposeIncludeFilter(backboneelement.BackboneElement):
+    """ Select codes/concepts by their properties (including relationships).
+    
+    Select concepts by specify a matching criteria based on the properties
+    (including relationships) defined by the system. If multiple filters are
+    specified, they SHALL all be true.
+    """
+    
+    resource_type = "ValueSetComposeIncludeFilter"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.op = None
+        """ = | is-a | descendent-of | is-not-a | regex | in | not-in |
+        generalizes | exists.
+        Type `str`. """
+        
+        self.property = None
+        """ A property defined by the code system.
+        Type `str`. """
+        
+        self.value = None
+        """ Code from the system, or regex criteria, or boolean value for
+        exists.
+        Type `str`. """
+        
+        super(ValueSetComposeIncludeFilter, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ValueSetComposeIncludeFilter, self).elementProperties()
+        js.extend([
+            ("op", "op", str, False, None, True),
+            ("property", "property", str, False, None, True),
+            ("value", "value", str, False, None, True),
+        ])
+        return js
+
+
+class ValueSetExpansion(backboneelement.BackboneElement):
+    """ Used when the value set is "expanded".
+    
+    A value set can also be "expanded", where the value set is turned into a
+    simple collection of enumerated codes. This element holds the expansion, if
+    it has been performed.
+    """
+    
+    resource_type = "ValueSetExpansion"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.contains = None
+        """ Codes in the value set.
+        List of `ValueSetExpansionContains` items (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Uniquely identifies this expansion.
+        Type `str`. """
+        
+        self.offset = None
+        """ Offset at which this resource starts.
+        Type `int`. """
+        
+        self.parameter = None
+        """ Parameter that controlled the expansion process.
+        List of `ValueSetExpansionParameter` items (represented as `dict` in JSON). """
+        
+        self.timestamp = None
+        """ Time ValueSet expansion happened.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.total = None
+        """ Total number of codes in the expansion.
+        Type `int`. """
+        
+        super(ValueSetExpansion, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ValueSetExpansion, self).elementProperties()
+        js.extend([
+            ("contains", "contains", ValueSetExpansionContains, True, None, False),
+            ("identifier", "identifier", str, False, None, True),
+            ("offset", "offset", int, False, None, False),
+            ("parameter", "parameter", ValueSetExpansionParameter, True, None, False),
+            ("timestamp", "timestamp", fhirdate.FHIRDate, False, None, True),
+            ("total", "total", int, False, None, False),
+        ])
+        return js
+
+
+class ValueSetExpansionContains(backboneelement.BackboneElement):
+    """ Codes in the value set.
+    
+    The codes that are contained in the value set expansion.
+    """
+    
+    resource_type = "ValueSetExpansionContains"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.abstract = None
+        """ If user cannot select this entry.
+        Type `bool`. """
+        
+        self.code = None
+        """ Code - if blank, this is not a selectable code.
+        Type `str`. """
+        
+        self.contains = None
+        """ Codes contained under this entry.
+        List of `ValueSetExpansionContains` items (represented as `dict` in JSON). """
+        
+        self.designation = None
+        """ Additional representations for this item.
+        List of `ValueSetComposeIncludeConceptDesignation` items (represented as `dict` in JSON). """
+        
+        self.display = None
+        """ User display for the concept.
+        Type `str`. """
+        
+        self.inactive = None
+        """ If concept is inactive in the code system.
+        Type `bool`. """
+        
+        self.system = None
+        """ System value for the code.
+        Type `str`. """
+        
+        self.version = None
+        """ Version in which this code/display is defined.
+        Type `str`. """
+        
+        super(ValueSetExpansionContains, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ValueSetExpansionContains, self).elementProperties()
+        js.extend([
+            ("abstract", "abstract", bool, False, None, False),
+            ("code", "code", str, False, None, False),
+            ("contains", "contains", ValueSetExpansionContains, True, None, False),
+            ("designation", "designation", ValueSetComposeIncludeConceptDesignation, True, None, False),
+            ("display", "display", str, False, None, False),
+            ("inactive", "inactive", bool, False, None, False),
+            ("system", "system", str, False, None, False),
+            ("version", "version", str, False, None, False),
+        ])
+        return js
+
+
+class ValueSetExpansionParameter(backboneelement.BackboneElement):
+    """ Parameter that controlled the expansion process.
+    
+    A parameter that controlled the expansion process. These parameters may be
+    used by users of expanded value sets to check whether the expansion is
+    suitable for a particular purpose, or to pick the correct expansion.
+    """
+    
+    resource_type = "ValueSetExpansionParameter"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.name = None
+        """ Name as assigned by the server.
+        Type `str`. """
+        
+        self.valueBoolean = None
+        """ Value of the named parameter.
+        Type `bool`. """
+        
+        self.valueCode = None
+        """ Value of the named parameter.
+        Type `str`. """
+        
+        self.valueDecimal = None
+        """ Value of the named parameter.
+        Type `float`. """
+        
+        self.valueInteger = None
+        """ Value of the named parameter.
+        Type `int`. """
+        
+        self.valueString = None
+        """ Value of the named parameter.
+        Type `str`. """
+        
+        self.valueUri = None
+        """ Value of the named parameter.
+        Type `str`. """
+        
+        super(ValueSetExpansionParameter, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(ValueSetExpansionParameter, self).elementProperties()
+        js.extend([
+            ("name", "name", str, False, None, True),
+            ("valueBoolean", "valueBoolean", bool, False, "value", False),
+            ("valueCode", "valueCode", str, False, "value", False),
+            ("valueDecimal", "valueDecimal", float, False, "value", False),
+            ("valueInteger", "valueInteger", int, False, "value", False),
+            ("valueString", "valueString", str, False, "value", False),
+            ("valueUri", "valueUri", str, False, "value", False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import coding
+except ImportError:
+    coding = sys.modules[__package__ + '.coding']
+try:
+    from . import contactdetail
+except ImportError:
+    contactdetail = sys.modules[__package__ + '.contactdetail']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import usagecontext
+except ImportError:
+    usagecontext = sys.modules[__package__ + '.usagecontext']
diff --git a/fhirclient/models/valueset_tests.py b/fhirclient/models/valueset_tests.py
new file mode 100644
index 0000000..1da5645
--- /dev/null
+++ b/fhirclient/models/valueset_tests.py
@@ -0,0 +1,294 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import valueset
+from .fhirdate import FHIRDate
+
+
+class ValueSetTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("ValueSet", js["resourceType"])
+        return valueset.ValueSet(js)
+    
+    def testValueSet1(self):
+        inst = self.instantiate_from("valueset-example-expansion.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ValueSet instance")
+        self.implValueSet1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ValueSet", js["resourceType"])
+        inst2 = valueset.ValueSet(js)
+        self.implValueSet1(inst2)
+    
+    def implValueSet1(self, inst):
+        self.assertEqual(inst.compose.include[0].filter[0].op, "=")
+        self.assertEqual(inst.compose.include[0].filter[0].property, "parent")
+        self.assertEqual(inst.compose.include[0].filter[0].value, "LP43571-6")
+        self.assertEqual(inst.compose.include[0].system, "http://loinc.org")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.copyright, "This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at http://loinc.org/terms-of-use.")
+        self.assertEqual(inst.date.date, FHIRDate("2015-06-22").date)
+        self.assertEqual(inst.date.as_json(), "2015-06-22")
+        self.assertEqual(inst.description, "This is an example value set that includes all the LOINC codes for serum/plasma cholesterol from v2.36.")
+        self.assertEqual(inst.expansion.contains[0].code, "14647-2")
+        self.assertEqual(inst.expansion.contains[0].display, "Cholesterol [Moles/volume] in Serum or Plasma")
+        self.assertEqual(inst.expansion.contains[0].system, "http://loinc.org")
+        self.assertEqual(inst.expansion.contains[0].version, "2.50")
+        self.assertTrue(inst.expansion.contains[1].abstract)
+        self.assertEqual(inst.expansion.contains[1].contains[0].code, "2093-3")
+        self.assertEqual(inst.expansion.contains[1].contains[0].display, "Cholesterol [Mass/volume] in Serum or Plasma")
+        self.assertEqual(inst.expansion.contains[1].contains[0].system, "http://loinc.org")
+        self.assertEqual(inst.expansion.contains[1].contains[0].version, "2.50")
+        self.assertEqual(inst.expansion.contains[1].contains[1].code, "48620-9")
+        self.assertEqual(inst.expansion.contains[1].contains[1].display, "Cholesterol [Mass/volume] in Serum or Plasma ultracentrifugate")
+        self.assertEqual(inst.expansion.contains[1].contains[1].system, "http://loinc.org")
+        self.assertEqual(inst.expansion.contains[1].contains[1].version, "2.50")
+        self.assertEqual(inst.expansion.contains[1].contains[2].code, "9342-7")
+        self.assertEqual(inst.expansion.contains[1].contains[2].display, "Cholesterol [Percentile]")
+        self.assertEqual(inst.expansion.contains[1].contains[2].system, "http://loinc.org")
+        self.assertEqual(inst.expansion.contains[1].contains[2].version, "2.50")
+        self.assertEqual(inst.expansion.contains[1].display, "Cholesterol codes")
+        self.assertTrue(inst.expansion.contains[2].abstract)
+        self.assertEqual(inst.expansion.contains[2].contains[0].code, "2096-6")
+        self.assertEqual(inst.expansion.contains[2].contains[0].display, "Cholesterol/Triglyceride [Mass Ratio] in Serum or Plasma")
+        self.assertEqual(inst.expansion.contains[2].contains[0].system, "http://loinc.org")
+        self.assertEqual(inst.expansion.contains[2].contains[0].version, "2.50")
+        self.assertEqual(inst.expansion.contains[2].contains[1].code, "35200-5")
+        self.assertEqual(inst.expansion.contains[2].contains[1].display, "Cholesterol/Triglyceride [Mass Ratio] in Serum or Plasma")
+        self.assertEqual(inst.expansion.contains[2].contains[1].system, "http://loinc.org")
+        self.assertEqual(inst.expansion.contains[2].contains[1].version, "2.50")
+        self.assertEqual(inst.expansion.contains[2].contains[2].code, "48089-7")
+        self.assertEqual(inst.expansion.contains[2].contains[2].display, "Cholesterol/Apolipoprotein B [Molar ratio] in Serum or Plasma")
+        self.assertEqual(inst.expansion.contains[2].contains[2].system, "http://loinc.org")
+        self.assertEqual(inst.expansion.contains[2].contains[2].version, "2.50")
+        self.assertEqual(inst.expansion.contains[2].contains[3].code, "55838-7")
+        self.assertEqual(inst.expansion.contains[2].contains[3].display, "Cholesterol/Phospholipid [Molar ratio] in Serum or Plasma")
+        self.assertEqual(inst.expansion.contains[2].contains[3].system, "http://loinc.org")
+        self.assertEqual(inst.expansion.contains[2].contains[3].version, "2.50")
+        self.assertEqual(inst.expansion.contains[2].display, "Cholesterol Ratios")
+        self.assertEqual(inst.expansion.extension[0].url, "http://hl7.org/fhir/StructureDefinition/valueset-expansionSource")
+        self.assertEqual(inst.expansion.extension[0].valueUri, "http://hl7.org/fhir/ValueSet/example-extensional")
+        self.assertEqual(inst.expansion.identifier, "urn:uuid:42316ff8-2714-4680-9980-f37a6d1a71bc")
+        self.assertEqual(inst.expansion.offset, 0)
+        self.assertEqual(inst.expansion.parameter[0].name, "version")
+        self.assertEqual(inst.expansion.parameter[0].valueString, "2.50")
+        self.assertEqual(inst.expansion.timestamp.date, FHIRDate("2015-06-22T13:56:07Z").date)
+        self.assertEqual(inst.expansion.timestamp.as_json(), "2015-06-22T13:56:07Z")
+        self.assertEqual(inst.expansion.total, 8)
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "example-expansion")
+        self.assertEqual(inst.meta.profile[0], "http://hl7.org/fhir/StructureDefinition/shareablevalueset")
+        self.assertEqual(inst.name, "LOINC Codes for Cholesterol in Serum/Plasma")
+        self.assertEqual(inst.publisher, "FHIR Project team")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/ValueSet/example-expansion")
+        self.assertEqual(inst.version, "20150622")
+    
+    def testValueSet2(self):
+        inst = self.instantiate_from("valueset-example-inactive.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ValueSet instance")
+        self.implValueSet2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ValueSet", js["resourceType"])
+        inst2 = valueset.ValueSet(js)
+        self.implValueSet2(inst2)
+    
+    def implValueSet2(self, inst):
+        self.assertTrue(inst.compose.inactive)
+        self.assertEqual(inst.compose.include[0].filter[0].op, "descendent-of")
+        self.assertEqual(inst.compose.include[0].filter[0].property, "concept")
+        self.assertEqual(inst.compose.include[0].filter[0].value, "_ActMoodPredicate")
+        self.assertEqual(inst.compose.include[0].system, "http://hl7.org/fhir/v3/ActMood")
+        self.assertEqual(inst.description, "HL7 v3 ActMood Prdicate codes, including inactive codes")
+        self.assertEqual(inst.expansion.contains[0].code, "CRT")
+        self.assertEqual(inst.expansion.contains[0].display, "criterion")
+        self.assertTrue(inst.expansion.contains[0].inactive)
+        self.assertEqual(inst.expansion.contains[0].system, "http://hl7.org/fhir/v3/ActMood")
+        self.assertEqual(inst.expansion.contains[1].code, "EXPEC")
+        self.assertEqual(inst.expansion.contains[1].contains[0].code, "GOL")
+        self.assertEqual(inst.expansion.contains[1].contains[0].display, "goal")
+        self.assertEqual(inst.expansion.contains[1].contains[0].system, "http://hl7.org/fhir/v3/ActMood")
+        self.assertEqual(inst.expansion.contains[1].contains[1].code, "RSK")
+        self.assertEqual(inst.expansion.contains[1].contains[1].display, "risk")
+        self.assertEqual(inst.expansion.contains[1].contains[1].system, "http://hl7.org/fhir/v3/ActMood")
+        self.assertEqual(inst.expansion.contains[1].display, "expectation")
+        self.assertEqual(inst.expansion.contains[1].system, "http://hl7.org/fhir/v3/ActMood")
+        self.assertEqual(inst.expansion.contains[2].code, "OPT")
+        self.assertEqual(inst.expansion.contains[2].display, "option")
+        self.assertEqual(inst.expansion.contains[2].system, "http://hl7.org/fhir/v3/ActMood")
+        self.assertEqual(inst.expansion.identifier, "urn:uuid:46c00b3f-003a-4f31-9d4b-ea2de58b2a99")
+        self.assertEqual(inst.expansion.timestamp.date, FHIRDate("2017-02-26T10:00:00Z").date)
+        self.assertEqual(inst.expansion.timestamp.as_json(), "2017-02-26T10:00:00Z")
+        self.assertEqual(inst.id, "inactive")
+        self.assertEqual(inst.name, "Example-inactive")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.title, "Example with inactive codes")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/ValueSet/inactive")
+    
+    def testValueSet3(self):
+        inst = self.instantiate_from("valueset-example-intensional.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ValueSet instance")
+        self.implValueSet3(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ValueSet", js["resourceType"])
+        inst2 = valueset.ValueSet(js)
+        self.implValueSet3(inst2)
+    
+    def implValueSet3(self, inst):
+        self.assertEqual(inst.compose.exclude[0].concept[0].code, "5932-9")
+        self.assertEqual(inst.compose.exclude[0].concept[0].display, "Cholesterol [Presence] in Blood by Test strip")
+        self.assertEqual(inst.compose.exclude[0].system, "http://loinc.org")
+        self.assertEqual(inst.compose.include[0].filter[0].op, "=")
+        self.assertEqual(inst.compose.include[0].filter[0].property, "parent")
+        self.assertEqual(inst.compose.include[0].filter[0].value, "LP43571-6")
+        self.assertEqual(inst.compose.include[0].system, "http://loinc.org")
+        self.assertEqual(inst.contact[0].name, "FHIR project team")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.copyright, "This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at http://loinc.org/terms-of-use")
+        self.assertEqual(inst.date.date, FHIRDate("2015-06-22").date)
+        self.assertEqual(inst.date.as_json(), "2015-06-22")
+        self.assertEqual(inst.description, "This is an example value set that includes all the LOINC codes for serum/plasma cholesterol from v2.36.")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "example-intensional")
+        self.assertEqual(inst.identifier[0].system, "http://acme.com/identifiers/valuesets")
+        self.assertEqual(inst.identifier[0].value, "loinc-cholesterol-ext")
+        self.assertEqual(inst.meta.profile[0], "http://hl7.org/fhir/StructureDefinition/shareablevalueset")
+        self.assertEqual(inst.name, "LOINC Codes for Cholesterol in Serum/Plasma")
+        self.assertEqual(inst.publisher, "HL7 International")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/ValueSet/example-intensional")
+        self.assertEqual(inst.version, "20150622")
+    
+    def testValueSet4(self):
+        inst = self.instantiate_from("valueset-example-yesnodontknow.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ValueSet instance")
+        self.implValueSet4(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ValueSet", js["resourceType"])
+        inst2 = valueset.ValueSet(js)
+        self.implValueSet4(inst2)
+    
+    def implValueSet4(self, inst):
+        self.assertEqual(inst.compose.include[0].valueSet[0], "http://hl7.org/fhir/ValueSet/v2-0136")
+        self.assertEqual(inst.compose.include[1].concept[0].code, "asked")
+        self.assertEqual(inst.compose.include[1].concept[0].display, "Don't know")
+        self.assertEqual(inst.compose.include[1].system, "http://hl7.org/fhir/data-absent-reason")
+        self.assertEqual(inst.description, "For Capturing simple yes-no-don't know answers")
+        self.assertEqual(inst.expansion.contains[0].code, "Y")
+        self.assertEqual(inst.expansion.contains[0].display, "Yes")
+        self.assertEqual(inst.expansion.contains[0].system, "http://hl7.org/fhir/v2/0136")
+        self.assertEqual(inst.expansion.contains[1].code, "N")
+        self.assertEqual(inst.expansion.contains[1].display, "No")
+        self.assertEqual(inst.expansion.contains[1].system, "http://hl7.org/fhir/v2/0136")
+        self.assertEqual(inst.expansion.contains[2].code, "asked")
+        self.assertEqual(inst.expansion.contains[2].display, "Don't know")
+        self.assertEqual(inst.expansion.contains[2].system, "http://hl7.org/fhir/data-absent-reason")
+        self.assertEqual(inst.expansion.identifier, "urn:uuid:bf99fe50-2c2b-41ad-bd63-bee6919810b4")
+        self.assertEqual(inst.expansion.timestamp.date, FHIRDate("2015-07-14T10:00:00Z").date)
+        self.assertEqual(inst.expansion.timestamp.as_json(), "2015-07-14T10:00:00Z")
+        self.assertEqual(inst.id, "yesnodontknow")
+        self.assertEqual(inst.name, "Yes/No/Don't Know")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/ValueSet/yesnodontknow")
+    
+    def testValueSet5(self):
+        inst = self.instantiate_from("valueset-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ValueSet instance")
+        self.implValueSet5(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ValueSet", js["resourceType"])
+        inst2 = valueset.ValueSet(js)
+        self.implValueSet5(inst2)
+    
+    def implValueSet5(self, inst):
+        self.assertTrue(inst.compose.inactive)
+        self.assertEqual(inst.compose.include[0].concept[0].code, "14647-2")
+        self.assertEqual(inst.compose.include[0].concept[0].display, "Cholesterol [Moles/Volume]")
+        self.assertEqual(inst.compose.include[0].concept[1].code, "2093-3")
+        self.assertEqual(inst.compose.include[0].concept[1].display, "Cholesterol [Mass/Volume]")
+        self.assertEqual(inst.compose.include[0].concept[2].code, "35200-5")
+        self.assertEqual(inst.compose.include[0].concept[2].display, "Cholesterol [Mass Or Moles/Volume]")
+        self.assertEqual(inst.compose.include[0].concept[3].code, "9342-7")
+        self.assertEqual(inst.compose.include[0].concept[3].display, "Cholesterol [Percentile]")
+        self.assertEqual(inst.compose.include[0].system, "http://loinc.org")
+        self.assertEqual(inst.compose.include[0].version, "2.36")
+        self.assertEqual(inst.compose.lockedDate.date, FHIRDate("2012-06-13").date)
+        self.assertEqual(inst.compose.lockedDate.as_json(), "2012-06-13")
+        self.assertEqual(inst.contact[0].name, "FHIR project team")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.copyright, "This content from LOINC ® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at http://loinc.org/terms-of-use.")
+        self.assertEqual(inst.date.date, FHIRDate("2015-06-22").date)
+        self.assertEqual(inst.date.as_json(), "2015-06-22")
+        self.assertEqual(inst.description, "This is an example value set that includes all the LOINC codes for serum/plasma cholesterol from v2.36.")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.id, "example-extensional")
+        self.assertEqual(inst.identifier[0].system, "http://acme.com/identifiers/valuesets")
+        self.assertEqual(inst.identifier[0].value, "loinc-cholesterol-int")
+        self.assertEqual(inst.meta.profile[0], "http://hl7.org/fhir/StructureDefinition/shareablevalueset")
+        self.assertEqual(inst.name, "LOINC Codes for Cholesterol in Serum/Plasma")
+        self.assertEqual(inst.publisher, "HL7 International")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/ValueSet/example-extensional")
+        self.assertEqual(inst.version, "20150622")
+    
+    def testValueSet6(self):
+        inst = self.instantiate_from("valueset-list-example-codes.json")
+        self.assertIsNotNone(inst, "Must have instantiated a ValueSet instance")
+        self.implValueSet6(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("ValueSet", js["resourceType"])
+        inst2 = valueset.ValueSet(js)
+        self.implValueSet6(inst2)
+    
+    def implValueSet6(self, inst):
+        self.assertEqual(inst.compose.include[0].system, "http://hl7.org/fhir/list-example-use-codes")
+        self.assertEqual(inst.contact[0].telecom[0].system, "url")
+        self.assertEqual(inst.contact[0].telecom[0].value, "http://hl7.org/fhir")
+        self.assertEqual(inst.date.date, FHIRDate("2017-03-21T21:41:32+00:00").date)
+        self.assertEqual(inst.date.as_json(), "2017-03-21T21:41:32+00:00")
+        self.assertEqual(inst.description, "Example use codes for the List resource - typical kinds of use.")
+        self.assertTrue(inst.experimental)
+        self.assertEqual(inst.extension[0].url, "http://hl7.org/fhir/StructureDefinition/structuredefinition-ballot-status")
+        self.assertEqual(inst.extension[0].valueString, "Informative")
+        self.assertEqual(inst.extension[1].url, "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm")
+        self.assertEqual(inst.extension[1].valueInteger, 1)
+        self.assertEqual(inst.extension[2].url, "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg")
+        self.assertEqual(inst.extension[2].valueCode, "fhir")
+        self.assertEqual(inst.id, "list-example-codes")
+        self.assertEqual(inst.identifier[0].system, "urn:ietf:rfc:3986")
+        self.assertEqual(inst.identifier[0].value, "urn:oid:2.16.840.1.113883.4.642.3.307")
+        self.assertTrue(inst.immutable)
+        self.assertEqual(inst.meta.lastUpdated.date, FHIRDate("2017-03-21T21:41:32.180+00:00").date)
+        self.assertEqual(inst.meta.lastUpdated.as_json(), "2017-03-21T21:41:32.180+00:00")
+        self.assertEqual(inst.meta.profile[0], "http://hl7.org/fhir/StructureDefinition/shareablevalueset")
+        self.assertEqual(inst.name, "Example Use Codes for List")
+        self.assertEqual(inst.publisher, "FHIR Project")
+        self.assertEqual(inst.status, "draft")
+        self.assertEqual(inst.text.status, "generated")
+        self.assertEqual(inst.url, "http://hl7.org/fhir/ValueSet/list-example-codes")
+        self.assertEqual(inst.version, "3.0.0")
+
diff --git a/fhirclient/models/visionprescription.py b/fhirclient/models/visionprescription.py
new file mode 100644
index 0000000..99014da
--- /dev/null
+++ b/fhirclient/models/visionprescription.py
@@ -0,0 +1,207 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/VisionPrescription) on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+from . import domainresource
+
+class VisionPrescription(domainresource.DomainResource):
+    """ Prescription for vision correction products for a patient.
+    
+    An authorization for the supply of glasses and/or contact lenses to a
+    patient.
+    """
+    
+    resource_type = "VisionPrescription"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.dateWritten = None
+        """ When prescription was authorized.
+        Type `FHIRDate` (represented as `str` in JSON). """
+        
+        self.dispense = None
+        """ Vision supply authorization.
+        List of `VisionPrescriptionDispense` items (represented as `dict` in JSON). """
+        
+        self.encounter = None
+        """ Created during encounter / admission / stay.
+        Type `FHIRReference` referencing `Encounter` (represented as `dict` in JSON). """
+        
+        self.identifier = None
+        """ Business identifier.
+        List of `Identifier` items (represented as `dict` in JSON). """
+        
+        self.patient = None
+        """ Who prescription is for.
+        Type `FHIRReference` referencing `Patient` (represented as `dict` in JSON). """
+        
+        self.prescriber = None
+        """ Who authorizes the vision product.
+        Type `FHIRReference` referencing `Practitioner` (represented as `dict` in JSON). """
+        
+        self.reasonCodeableConcept = None
+        """ Reason or indication for writing the prescription.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.reasonReference = None
+        """ Reason or indication for writing the prescription.
+        Type `FHIRReference` referencing `Condition` (represented as `dict` in JSON). """
+        
+        self.status = None
+        """ active | cancelled | draft | entered-in-error.
+        Type `str`. """
+        
+        super(VisionPrescription, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(VisionPrescription, self).elementProperties()
+        js.extend([
+            ("dateWritten", "dateWritten", fhirdate.FHIRDate, False, None, False),
+            ("dispense", "dispense", VisionPrescriptionDispense, True, None, False),
+            ("encounter", "encounter", fhirreference.FHIRReference, False, None, False),
+            ("identifier", "identifier", identifier.Identifier, True, None, False),
+            ("patient", "patient", fhirreference.FHIRReference, False, None, False),
+            ("prescriber", "prescriber", fhirreference.FHIRReference, False, None, False),
+            ("reasonCodeableConcept", "reasonCodeableConcept", codeableconcept.CodeableConcept, False, "reason", False),
+            ("reasonReference", "reasonReference", fhirreference.FHIRReference, False, "reason", False),
+            ("status", "status", str, False, None, False),
+        ])
+        return js
+
+
+from . import backboneelement
+
+class VisionPrescriptionDispense(backboneelement.BackboneElement):
+    """ Vision supply authorization.
+    
+    Deals with details of the dispense part of the supply specification.
+    """
+    
+    resource_type = "VisionPrescriptionDispense"
+    
+    def __init__(self, jsondict=None, strict=True):
+        """ Initialize all valid properties.
+        
+        :raises: FHIRValidationError on validation errors, unless strict is False
+        :param dict jsondict: A JSON dictionary to use for initialization
+        :param bool strict: If True (the default), invalid variables will raise a TypeError
+        """
+        
+        self.add = None
+        """ Lens add.
+        Type `float`. """
+        
+        self.axis = None
+        """ Lens axis.
+        Type `int`. """
+        
+        self.backCurve = None
+        """ Contact lens back curvature.
+        Type `float`. """
+        
+        self.base = None
+        """ up | down | in | out.
+        Type `str`. """
+        
+        self.brand = None
+        """ Brand required.
+        Type `str`. """
+        
+        self.color = None
+        """ Color required.
+        Type `str`. """
+        
+        self.cylinder = None
+        """ Lens cylinder.
+        Type `float`. """
+        
+        self.diameter = None
+        """ Contact lens diameter.
+        Type `float`. """
+        
+        self.duration = None
+        """ Lens wear duration.
+        Type `Quantity` (represented as `dict` in JSON). """
+        
+        self.eye = None
+        """ right | left.
+        Type `str`. """
+        
+        self.note = None
+        """ Notes for coatings.
+        List of `Annotation` items (represented as `dict` in JSON). """
+        
+        self.power = None
+        """ Contact lens power.
+        Type `float`. """
+        
+        self.prism = None
+        """ Lens prism.
+        Type `float`. """
+        
+        self.product = None
+        """ Product to be supplied.
+        Type `CodeableConcept` (represented as `dict` in JSON). """
+        
+        self.sphere = None
+        """ Lens sphere.
+        Type `float`. """
+        
+        super(VisionPrescriptionDispense, self).__init__(jsondict=jsondict, strict=strict)
+    
+    def elementProperties(self):
+        js = super(VisionPrescriptionDispense, self).elementProperties()
+        js.extend([
+            ("add", "add", float, False, None, False),
+            ("axis", "axis", int, False, None, False),
+            ("backCurve", "backCurve", float, False, None, False),
+            ("base", "base", str, False, None, False),
+            ("brand", "brand", str, False, None, False),
+            ("color", "color", str, False, None, False),
+            ("cylinder", "cylinder", float, False, None, False),
+            ("diameter", "diameter", float, False, None, False),
+            ("duration", "duration", quantity.Quantity, False, None, False),
+            ("eye", "eye", str, False, None, False),
+            ("note", "note", annotation.Annotation, True, None, False),
+            ("power", "power", float, False, None, False),
+            ("prism", "prism", float, False, None, False),
+            ("product", "product", codeableconcept.CodeableConcept, False, None, False),
+            ("sphere", "sphere", float, False, None, False),
+        ])
+        return js
+
+
+import sys
+try:
+    from . import annotation
+except ImportError:
+    annotation = sys.modules[__package__ + '.annotation']
+try:
+    from . import codeableconcept
+except ImportError:
+    codeableconcept = sys.modules[__package__ + '.codeableconcept']
+try:
+    from . import fhirdate
+except ImportError:
+    fhirdate = sys.modules[__package__ + '.fhirdate']
+try:
+    from . import fhirreference
+except ImportError:
+    fhirreference = sys.modules[__package__ + '.fhirreference']
+try:
+    from . import identifier
+except ImportError:
+    identifier = sys.modules[__package__ + '.identifier']
+try:
+    from . import quantity
+except ImportError:
+    quantity = sys.modules[__package__ + '.quantity']
diff --git a/fhirclient/models/visionprescription_tests.py b/fhirclient/models/visionprescription_tests.py
new file mode 100644
index 0000000..fc559cf
--- /dev/null
+++ b/fhirclient/models/visionprescription_tests.py
@@ -0,0 +1,112 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+#  Generated from FHIR 3.0.0.11832 on 2017-03-22.
+#  2017, SMART Health IT.
+
+
+import os
+import io
+import unittest
+import json
+from . import visionprescription
+from .fhirdate import FHIRDate
+
+
+class VisionPrescriptionTests(unittest.TestCase):
+    def instantiate_from(self, filename):
+        datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or ''
+        with io.open(os.path.join(datadir, filename), 'r', encoding='utf-8') as handle:
+            js = json.load(handle)
+            self.assertEqual("VisionPrescription", js["resourceType"])
+        return visionprescription.VisionPrescription(js)
+    
+    def testVisionPrescription1(self):
+        inst = self.instantiate_from("visionprescription-example-1.json")
+        self.assertIsNotNone(inst, "Must have instantiated a VisionPrescription instance")
+        self.implVisionPrescription1(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("VisionPrescription", js["resourceType"])
+        inst2 = visionprescription.VisionPrescription(js)
+        self.implVisionPrescription1(inst2)
+    
+    def implVisionPrescription1(self, inst):
+        self.assertEqual(inst.dateWritten.date, FHIRDate("2014-06-15").date)
+        self.assertEqual(inst.dateWritten.as_json(), "2014-06-15")
+        self.assertEqual(inst.dispense[0].add, 1.75)
+        self.assertEqual(inst.dispense[0].axis, 160)
+        self.assertEqual(inst.dispense[0].backCurve, 8.7)
+        self.assertEqual(inst.dispense[0].brand, "OphthaGuard")
+        self.assertEqual(inst.dispense[0].color, "green")
+        self.assertEqual(inst.dispense[0].cylinder, -2.25)
+        self.assertEqual(inst.dispense[0].diameter, 14.0)
+        self.assertEqual(inst.dispense[0].duration.code, "month")
+        self.assertEqual(inst.dispense[0].duration.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.dispense[0].duration.unit, "month")
+        self.assertEqual(inst.dispense[0].duration.value, 1)
+        self.assertEqual(inst.dispense[0].eye, "right")
+        self.assertEqual(inst.dispense[0].note[0].text, "Shade treatment for extreme light sensitivity")
+        self.assertEqual(inst.dispense[0].power, -2.75)
+        self.assertEqual(inst.dispense[0].product.coding[0].code, "contact")
+        self.assertEqual(inst.dispense[0].product.coding[0].system, "http://hl7.org/fhir/ex-visionprescriptionproduct")
+        self.assertEqual(inst.dispense[1].add, 1.75)
+        self.assertEqual(inst.dispense[1].axis, 160)
+        self.assertEqual(inst.dispense[1].backCurve, 8.7)
+        self.assertEqual(inst.dispense[1].brand, "OphthaGuard")
+        self.assertEqual(inst.dispense[1].color, "green")
+        self.assertEqual(inst.dispense[1].cylinder, -3.5)
+        self.assertEqual(inst.dispense[1].diameter, 14.0)
+        self.assertEqual(inst.dispense[1].duration.code, "month")
+        self.assertEqual(inst.dispense[1].duration.system, "http://unitsofmeasure.org")
+        self.assertEqual(inst.dispense[1].duration.unit, "month")
+        self.assertEqual(inst.dispense[1].duration.value, 1)
+        self.assertEqual(inst.dispense[1].eye, "left")
+        self.assertEqual(inst.dispense[1].note[0].text, "Shade treatment for extreme light sensitivity")
+        self.assertEqual(inst.dispense[1].power, -2.75)
+        self.assertEqual(inst.dispense[1].product.coding[0].code, "contact")
+        self.assertEqual(inst.dispense[1].product.coding[0].system, "http://hl7.org/fhir/ex-visionprescriptionproduct")
+        self.assertEqual(inst.id, "33124")
+        self.assertEqual(inst.identifier[0].system, "http://www.happysight.com/prescription")
+        self.assertEqual(inst.identifier[0].value, "15014")
+        self.assertEqual(inst.reasonCodeableConcept.coding[0].code, "myopia")
+        self.assertEqual(inst.reasonCodeableConcept.coding[0].system, "http://samplevisionreasoncodes.com")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.div, "<div xmlns=\"http://www.w3.org/1999/xhtml\">Sample Contract Lens prescription</div>")
+        self.assertEqual(inst.text.status, "generated")
+    
+    def testVisionPrescription2(self):
+        inst = self.instantiate_from("visionprescription-example.json")
+        self.assertIsNotNone(inst, "Must have instantiated a VisionPrescription instance")
+        self.implVisionPrescription2(inst)
+        
+        js = inst.as_json()
+        self.assertEqual("VisionPrescription", js["resourceType"])
+        inst2 = visionprescription.VisionPrescription(js)
+        self.implVisionPrescription2(inst2)
+    
+    def implVisionPrescription2(self, inst):
+        self.assertEqual(inst.dateWritten.date, FHIRDate("2014-06-15").date)
+        self.assertEqual(inst.dateWritten.as_json(), "2014-06-15")
+        self.assertEqual(inst.dispense[0].add, 2.0)
+        self.assertEqual(inst.dispense[0].base, "down")
+        self.assertEqual(inst.dispense[0].eye, "right")
+        self.assertEqual(inst.dispense[0].prism, 0.5)
+        self.assertEqual(inst.dispense[0].product.coding[0].code, "lens")
+        self.assertEqual(inst.dispense[0].product.coding[0].system, "http://hl7.org/fhir/ex-visionprescriptionproduct")
+        self.assertEqual(inst.dispense[0].sphere, -2.0)
+        self.assertEqual(inst.dispense[1].add, 2.0)
+        self.assertEqual(inst.dispense[1].axis, 180)
+        self.assertEqual(inst.dispense[1].base, "up")
+        self.assertEqual(inst.dispense[1].cylinder, -0.5)
+        self.assertEqual(inst.dispense[1].eye, "left")
+        self.assertEqual(inst.dispense[1].prism, 0.5)
+        self.assertEqual(inst.dispense[1].product.coding[0].code, "lens")
+        self.assertEqual(inst.dispense[1].product.coding[0].system, "http://hl7.org/fhir/ex-visionprescriptionproduct")
+        self.assertEqual(inst.dispense[1].sphere, -1.0)
+        self.assertEqual(inst.id, "33123")
+        self.assertEqual(inst.identifier[0].system, "http://www.happysight.com/prescription")
+        self.assertEqual(inst.identifier[0].value, "15013")
+        self.assertEqual(inst.status, "active")
+        self.assertEqual(inst.text.status, "generated")
+
diff --git a/fhirclient/server.py b/fhirclient/server.py
new file mode 100644
index 0000000..68ce8d5
--- /dev/null
+++ b/fhirclient/server.py
@@ -0,0 +1,309 @@
+# -*- coding: utf-8 -*-
+
+import json
+import requests
+import urllib
+import logging
+try:                                # Python 2.x
+    import urlparse
+except ImportError as e:            # Python 3
+    import urllib.parse as urlparse
+
+from auth import FHIRAuth
+
+FHIRJSONMimeType = 'application/fhir+json'
+
+logger = logging.getLogger(__name__)
+
+
+class FHIRUnauthorizedException(Exception):
+    """ Indicating a 401 response.
+    """
+    def __init__(self, response):
+        self.response = response
+
+
+class FHIRPermissionDeniedException(Exception):
+    """ Indicating a 403 response.
+    """
+    def __init__(self, response):
+        self.response = response
+
+
+class FHIRNotFoundException(Exception):
+    """ Indicating a 404 response.
+    """
+    def __init__(self, response):
+        self.response = response
+
+
+class FHIRServer(object):
+    """ Handles talking to a FHIR server.
+    """
+    
+    def __init__(self, client, base_uri=None, state=None):
+        self.client = client
+        self.auth = None
+        self.base_uri = None
+
+        # Use a single requests Session for all "requests"
+        self.session = requests.Session()
+        
+        # A URI can't possibly be less than 11 chars
+        # make sure we end with "/", otherwise the last path component will be
+        # lost when creating URLs with urllib
+        if base_uri is not None and len(base_uri) > 10:
+            self.base_uri = base_uri if '/' == base_uri[-1] else base_uri + '/'
+        self._capability = None
+        if state is not None:
+            self.from_state(state)
+        if not self.base_uri or len(self.base_uri) <= 10:
+            raise Exception("FHIRServer must be initialized with `base_uri` or `state` containing the base-URI, but neither happened")
+    
+    def should_save_state(self):
+        if self.client is not None:
+            self.client.save_state()
+    
+    
+    # MARK: Server CapabilityStatement
+    
+    @property
+    def capabilityStatement(self):
+        self.get_capability()
+        return self._capability
+    
+    def get_capability(self, force=False):
+        """ Returns the server's CapabilityStatement, retrieving it if needed
+        or forced.
+        """
+        if self._capability is None or force:
+            logger.info('Fetching CapabilityStatement from {0}'.format(self.base_uri))
+            from models import capabilitystatement
+            conf = capabilitystatement.CapabilityStatement.read_from('metadata', self)
+            self._capability = conf
+            
+            security = None
+            try:
+                security = conf.rest[0].security
+            except Exception as e:
+                logger.info("No REST security statement found in server capability statement")
+            
+            settings = {
+                'aud': self.base_uri,
+                'app_id': self.client.app_id if self.client is not None else None,
+                'app_secret': self.client.app_secret if self.client is not None else None,
+                'redirect_uri': self.client.redirect if self.client is not None else None,
+            }
+            self.auth = FHIRAuth.from_capability_security(security, settings)
+            self.should_save_state()
+    
+    
+    # MARK: Authorization
+    
+    @property
+    def desired_scope(self):
+        return self.client.desired_scope if self.client is not None else None
+    
+    @property
+    def launch_token(self):
+        return self.client.launch_token if self.client is not None else None
+    
+    @property
+    def authorize_uri(self):
+        if self.auth is None:
+            self.get_capability()
+        return self.auth.authorize_uri(self)
+    
+    def handle_callback(self, url):
+        if self.auth is None:
+            raise Exception("Not ready to handle callback, I do not have an auth instance")
+        return self.auth.handle_callback(url, self)
+    
+    def reauthorize(self):
+        if self.auth is None:
+            raise Exception("Not ready to reauthorize, I do not have an auth instance")
+        return self.auth.reauthorize(self) if self.auth is not None else None
+    
+    
+    # MARK: Requests
+    
+    @property
+    def ready(self):
+        """ Check whether the server is ready to make calls, i.e. is has
+        fetched its capability statement and its `auth` instance is ready.
+        
+        :returns: True if the server can make authenticated calls
+        """
+        return self.auth.ready if self.auth is not None else False
+    
+    def prepare(self):
+        """ Check whether the server is ready to make calls, i.e. is has
+        fetched its capability statement and its `auth` instance is ready.
+        This method will fetch the capability statement if it hasn't already
+        been fetched.
+        
+        :returns: True if the server can make authenticated calls
+        """
+        if self.auth is None:
+            self.get_capability()
+        return self.auth.ready if self.auth is not None else False
+    
+    def request_json(self, path, nosign=False):
+        """ Perform a request for JSON data against the server's base with the
+        given relative path.
+        
+        :param str path: The path to append to `base_uri`
+        :param bool nosign: If set to True, the request will not be signed
+        :throws: Exception on HTTP status >= 400
+        :returns: Decoded JSON response
+        """
+        headers = {'Accept': 'application/json'}
+        res = self._get(path, headers, nosign)
+        
+        return res.json()
+    
+    def request_data(self, path, headers={}, nosign=False):
+        """ Perform a data request data against the server's base with the
+        given relative path.
+        """
+        res = self._get(path, None, nosign)
+        return res.content
+    
+    def _get(self, path, headers={}, nosign=False):
+        """ Issues a GET request.
+        
+        :returns: The response object
+        """
+        assert self.base_uri and path
+        url = urlparse.urljoin(self.base_uri, path)
+        
+        headers = {
+            'Accept': FHIRJSONMimeType,
+            'Accept-Charset': 'UTF-8',
+        }
+        if not nosign and self.auth is not None and self.auth.can_sign_headers():
+            headers = self.auth.signed_headers(headers)
+        
+        # perform the request but intercept 401 responses, raising our own Exception
+        res = self.session.get(url, headers=headers)
+        self.raise_for_status(res)
+        return res
+    
+    def put_json(self, path, resource_json, nosign=False):
+        """ Performs a PUT request of the given JSON, which should represent a
+        resource, to the given relative path.
+        
+        :param str path: The path to append to `base_uri`
+        :param dict resource_json: The JSON representing the resource
+        :param bool nosign: If set to True, the request will not be signed
+        :throws: Exception on HTTP status >= 400
+        :returns: The response object
+        """
+        url = urlparse.urljoin(self.base_uri, path)
+        headers = {
+            'Content-type': FHIRJSONMimeType,
+            'Accept': FHIRJSONMimeType,
+            'Accept-Charset': 'UTF-8',
+        }
+        if not nosign and self.auth is not None and self.auth.can_sign_headers():
+            headers = self.auth.signed_headers(headers)
+        
+        # perform the request but intercept 401 responses, raising our own Exception
+        res = self.session.put(url, headers=headers, data=json.dumps(resource_json))
+        self.raise_for_status(res)
+        return res
+    
+    def post_json(self, path, resource_json, nosign=False):
+        """ Performs a POST of the given JSON, which should represent a
+        resource, to the given relative path.
+        
+        :param str path: The path to append to `base_uri`
+        :param dict resource_json: The JSON representing the resource
+        :param bool nosign: If set to True, the request will not be signed
+        :throws: Exception on HTTP status >= 400
+        :returns: The response object
+        """
+        url = urlparse.urljoin(self.base_uri, path)
+        headers = {
+            'Content-type': FHIRJSONMimeType,
+            'Accept': FHIRJSONMimeType,
+            'Accept-Charset': 'UTF-8',
+        }
+        if not nosign and self.auth is not None and self.auth.can_sign_headers():
+            headers = self.auth.signed_headers(headers)
+        
+        # perform the request but intercept 401 responses, raising our own Exception
+        res = self.session.post(url, headers=headers, data=json.dumps(resource_json))
+        self.raise_for_status(res)
+        return res
+    
+    def post_as_form(self, url, formdata, auth=None):
+        """ Performs a POST request with form-data, expecting to receive JSON.
+        This method is used in the OAuth2 token exchange and thus doesn't
+        request fhir+json.
+        
+        :throws: Exception on HTTP status >= 400
+        :returns: The response object
+        """
+        headers = {
+            'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
+            'Accept': 'application/json',
+        }
+        res = self.session.post(url, data=formdata, auth=auth)
+        self.raise_for_status(res)
+        return res
+    
+    def delete_json(self, path, nosign=False):
+        """ Issues a DELETE command against the given relative path, accepting
+        a JSON response.
+        
+        :param str path: The relative URL path to issue a DELETE against
+        :param bool nosign: If set to True, the request will not be signed
+        :returns: The response object
+        """
+        url = urlparse.urljoin(self.base_uri, path)
+        headers = {
+            'Accept': FHIRJSONMimeType,
+            'Accept-Charset': 'UTF-8',
+        }
+        if not nosign and self.auth is not None and self.auth.can_sign_headers():
+            headers = self.auth.signed_headers(headers)
+        
+        # perform the request but intercept 401 responses, raising our own Exception
+        res = self.session.delete(url)
+        self.raise_for_status(res)
+        return res
+    
+    def raise_for_status(self, response):
+        if response.status_code < 400:
+            return
+        
+        if 401 == response.status_code:
+            raise FHIRUnauthorizedException(response)
+        elif 403 == response.status_code:
+            raise FHIRPermissionDeniedException(response)
+        elif 404 == response.status_code:
+            raise FHIRNotFoundException(response)
+        else:
+            response.raise_for_status()
+    
+    
+    # MARK: State Handling
+    
+    @property
+    def state(self):
+        """ Return current state.
+        """
+        return {
+            'base_uri': self.base_uri,
+            'auth_type': self.auth.auth_type if self.auth is not None else 'none',
+            'auth': self.auth.state if self.auth is not None else None,
+        }
+    
+    def from_state(self, state):
+        """ Update ivars from given state information.
+        """
+        assert state
+        self.base_uri = state.get('base_uri') or self.base_uri
+        self.auth = FHIRAuth.create(state.get('auth_type'), state=state.get('auth'))
+    
diff --git a/fhirclient/server_tests.py b/fhirclient/server_tests.py
new file mode 100644
index 0000000..f2a43fe
--- /dev/null
+++ b/fhirclient/server_tests.py
@@ -0,0 +1,73 @@
+# -*- coding: utf-8 -*-
+
+
+import os
+import io
+import json
+import shutil
+import server
+import unittest
+import models.fhirabstractbase as fabst
+
+
+class TestServer(unittest.TestCase):
+    
+    def tearDown(self):
+        if os.path.exists('metadata'):
+            os.remove('metadata')
+    
+    def testValidCapabilityStatement(self):
+        shutil.copyfile('test_metadata_valid.json', 'metadata')
+        mock = MockServer()
+        mock.get_capability()
+        
+        self.assertIsNotNone(mock.auth._registration_uri)
+        self.assertIsNotNone(mock.auth._authorize_uri)
+        self.assertIsNotNone(mock.auth._token_uri)
+    
+    def testStateConservation(self):
+        shutil.copyfile('test_metadata_valid.json', 'metadata')
+        mock = MockServer()
+        self.assertIsNotNone(mock.capabilityStatement)
+        
+        fhir = server.FHIRServer(None, state=mock.state)
+        self.assertIsNotNone(fhir.auth._registration_uri)
+        self.assertIsNotNone(fhir.auth._authorize_uri)
+        self.assertIsNotNone(fhir.auth._token_uri)
+    
+    def testInvalidCapabilityStatement(self):
+        shutil.copyfile('test_metadata_invalid.json', 'metadata')
+        mock = MockServer()
+        try:
+            mock.get_capability()
+            self.assertTrue(False, "Must have thrown exception")
+        except fabst.FHIRValidationError as e:
+            self.assertTrue(4 == len(e.errors))
+            self.assertEqual("date:", str(e.errors[0])[:5])
+            self.assertEqual("format:", str(e.errors[1])[:7])
+            self.assertEqual("rest.0:", str(e.errors[2])[:7])
+            self.assertEqual("operation.1:", str(e.errors[2].errors[0])[:12])
+            self.assertEqual("definition:", str(e.errors[2].errors[0].errors[0])[:11])
+            self.assertEqual("reference:", str(e.errors[2].errors[0].errors[0].errors[0])[:10])
+            self.assertEqual("Wrong type <class 'dict'>", str(e.errors[2].errors[0].errors[0].errors[0].errors[0])[:25])
+            self.assertEqual("security:", str(e.errors[2].errors[1])[:9])
+            self.assertEqual("service.0:", str(e.errors[2].errors[1].errors[0])[:10])
+            self.assertEqual("coding.0:", str(e.errors[2].errors[1].errors[0].errors[0])[:9])
+            self.assertEqual("Superfluous entry \"systems\"", str(e.errors[2].errors[1].errors[0].errors[0].errors[0])[:27])
+            self.assertEqual("Superfluous entry \"formats\"", str(e.errors[3])[:27])
+
+
+class MockServer(server.FHIRServer):
+    """ Reads local files.
+    """
+    
+    def __init__(self):
+        super().__init__(None, base_uri='https://fhir.smarthealthit.org')
+    
+    def request_json(self, path, nosign=False):
+        assert path
+        with io.open(path, encoding='utf-8') as handle:
+            return json.load(handle)
+        
+        return None
+    
diff --git a/fhirclient/test_bundle.json b/fhirclient/test_bundle.json
new file mode 100644
index 0000000..d525c2b
--- /dev/null
+++ b/fhirclient/test_bundle.json
@@ -0,0 +1,78 @@
+{
+	"resourceType": "Bundle",
+	"type": "collection",
+	"entry": [
+		{
+			"fullUrl": "https://fhir.smarthealthit.org/Patient/23",
+			"resource": {
+				"resourceType": "Patient",
+				"id": "23",
+				"name": [
+					{
+						"given": ["Darth"],
+						"family": "Vader"
+					},
+					{
+						"given": ["Anakin"],
+						"family": "Skywalker"
+					}
+				]
+			}
+		},
+		{
+			"fullUrl": "urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d",
+			"resource": {
+				"resourceType": "Patient",
+				"name": [
+					{
+						"given": ["Ben"],
+						"family": "Kenobi"
+					},
+					{
+						"given": ["Obi-Wan"],
+						"family": "Kenobi"
+					}
+				]
+			}
+		},
+		{
+			"fullUrl": "https://fhir.smarthealthit.org/Observation/123",
+			"resource": {
+				"resourceType": "Observation",
+				"id": "123",
+				"subject": {
+					"reference": "Patient/23"
+				},
+				"code": {},
+				"status": "active",
+				"comment": "Observation 123, referencing subject relatively"
+			}
+		},
+		{
+			"fullUrl": "https://fhir.smarthealthit.org/Observation/56",
+			"resource": {
+				"resourceType": "Observation",
+				"id": "56",
+				"subject": {
+					"reference": "urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d"
+				},
+				"code": {},
+				"status": "active",
+				"comment": "Observation 56, referencing subject via UUID"
+			}
+		},
+		{
+			"fullUrl": "https://fhir.smarthealthit.org/Observation/34",
+			"resource": {
+				"resourceType": "Observation",
+				"id": "34",
+				"subject": {
+					"reference": "https://fhir.smarthealthit.org/dev/Patient/99"
+				},
+				"code": {},
+				"status": "active",
+				"comment": "Observation 34 with absolute subject reference to different endpoint"
+			}
+		}
+	]
+}
diff --git a/fhirclient/test_contained_resource.json b/fhirclient/test_contained_resource.json
new file mode 100644
index 0000000..e3c0633
--- /dev/null
+++ b/fhirclient/test_contained_resource.json
@@ -0,0 +1,181 @@
+{
+  "resourceType": "Questionnaire",
+  "id": "qs1",
+  "contained": [
+    {
+      "resourceType": "ValueSet",
+      "id": "vs2",
+      "name": "Type options for Observation.subject",
+      "status": "active",
+      "description": "Type options for Observation.subject",
+      "expansion": {
+        "identifier": "urn:uuid:5200236f-20ea-40b1-9a6b-b22301238b9c",
+        "timestamp": "2015-10-24T07:43:40+11:00",
+        "contains": [
+          {
+            "system": "http://hl7.org/fhir/resource-types",
+            "code": "Patient",
+            "display": "Patient"
+          },
+          {
+            "system": "http://hl7.org/fhir/resource-types",
+            "code": "Group",
+            "display": "Group"
+          },
+          {
+            "system": "http://hl7.org/fhir/resource-types",
+            "code": "Device",
+            "display": "Device"
+          },
+          {
+            "system": "http://hl7.org/fhir/resource-types",
+            "code": "Location",
+            "display": "Location"
+          }
+        ]
+      }
+    }
+  ],
+  "identifier": [
+    {
+      "system": "urn:ietf:rfc:3986"
+    }
+  ],
+  "status": "draft",
+  "date": "2012-05-12T00:00:00+10:00",
+  "publisher": "Grahame Grieve",
+  "item": [
+    {
+      "linkId": "Observation",
+      "type": "group",
+      "text": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
+      "required": true,
+      "repeats": false,
+      "item": [
+        {
+          "extension": [
+            {
+              "url": "http://hl7.org/fhir/Profile/questionnaire-extensions#flyover",
+              "valueString": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID."
+            },
+            {
+              "url": "http://www.healthintersections.com.au/fhir/Profile/metadata#type",
+              "valueString": "string"
+            }
+          ],
+          "linkId": "Observation.id",
+          "type": "group",
+          "required": false,
+          "repeats": true,
+          "item": [
+            {
+              "linkId": "Observation.id.value",
+              "text": "Logical id of this artifact",
+              "type": "string",
+              "required": false,
+              "repeats": false
+            }
+          ]
+        },
+        {
+          "extension": [
+            {
+              "url": "http://hl7.org/fhir/Profile/questionnaire-extensions#flyover",
+              "valueString": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource."
+            }
+          ],
+          "linkId": "Observation.meta",
+          "type": "group",
+          "text": "Metadata about the resource",
+          "required": false,
+          "repeats": true
+        },
+        {
+          "extension": [
+            {
+              "url": "http://hl7.org/fhir/Profile/questionnaire-extensions#flyover",
+              "valueString": "Triglyceride."
+            },
+            {
+              "url": "http://www.healthintersections.com.au/fhir/Profile/metadata#type",
+              "valueString": "CodeableConcept"
+            }
+          ],
+          "linkId": "Observation.code",
+          "type": "group",
+          "text": "Triglyceride",
+          "required": true,
+          "repeats": true,
+          "item": [
+            {
+              "linkId": "Observation.code.coding",
+              "text": "code:",
+              "type": "open-choice",
+              "required": false,
+              "repeats": false
+            },
+            {
+              "linkId": "Observation.code.text",
+              "text": "text:",
+              "type": "string",
+              "required": false,
+              "repeats": false
+            }
+          ]
+        },
+        {
+          "extension": [
+            {
+              "url": "http://hl7.org/fhir/Profile/questionnaire-extensions#flyover",
+              "valueString": "The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed.  Comments: Indirect characteristics may be those of a specimen, fetus, donor,  other observer (for example a relative or EMT), or any observation made about the subject. One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be m [...]
+            }
+          ],
+          "linkId": "Observation.subject",
+          "type": "group",
+          "text": "Who and/or what this is about",
+          "required": false,
+          "repeats": true,
+          "item": [
+            {
+              "linkId": "Observation.subject._type",
+              "text": "type",
+              "type": "choice",
+              "required": false,
+              "repeats": false,
+              "options": {
+                "reference": "#vs2"
+              },
+              "item": [
+                {
+                  "extension": [
+                    {
+                      "url": "http://www.healthintersections.com.au/fhir/Profile/metadata#type",
+                      "valueString": "Reference"
+                    }
+                  ],
+                  "linkId": "Observation.subject._Patient",
+                  "type": "group",
+                  "item": [
+                    {
+                      "extension": [
+                        {
+                          "url": "http://www.healthintersections.com.au/fhir/Profile/metadata#reference",
+                          "valueString": "/Patient?subject=$subj&patient=$subj&encounter=$encounter"
+                        }
+                      ],
+                      "linkId": "Observation.subject._Patient.value",
+                      "text": "Patient",
+                      "type": "reference",
+                      "required": false,
+                      "repeats": false
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
diff --git a/fhirclient/test_metadata_invalid.json b/fhirclient/test_metadata_invalid.json
new file mode 100644
index 0000000..8a1f098
--- /dev/null
+++ b/fhirclient/test_metadata_invalid.json
@@ -0,0 +1,57 @@
+{
+    "acceptUnknown": "no",
+    "date": ["2014-10-29T11:42:32.193-00:00"],
+    "description": "Describes capabilities of this SMART on FHIR server",
+    "fhirVersion": "0.0.82",
+    "format": 66,
+    "formats": [
+        "xml",
+        "json"
+    ],
+    "url": "https://fhir-api.smarthealthit.org/metadata",
+    "name": "SMART on FHIR CapabilityStatement",
+    "kind": "instance",
+    "publisher": "SMART on FHIR",
+    "resourceType": "CapabilityStatement",
+    "rest": [
+        {
+            "documentation": "All the functionality defined in FHIR",
+            "mode": "server",
+            "operation": [
+                {
+                    "name": "transaction",
+                    "definition": {
+                        "reference": "#op-trans"
+                    }
+                },
+                {
+                    "name": "history-system",
+                    "definition": {
+                        "reference": {"key": "#op-hist"}
+                    }
+                }
+            ],
+            "resource": [],
+            "security": {
+                "description": "SMART on FHIR uses OAuth2 for authorization",
+                "service": [
+                    {
+                        "coding": [
+                            {
+                                "code": "OAuth2",
+                                "systems": "http://hl7.org/fhir/vs/restful-security-service"
+                            }
+                        ],
+                        "text": "OAuth version 2 (see oauth.net)."
+                    }
+                ]
+            }
+        }
+    ],
+    "status": "draft",
+    "text": {
+        "div": "<div>Generated CapabilityStatement -- see structured representation.</div>",
+        "status": "generated"
+    },
+    "version": "0.0.82.????"
+}
diff --git a/fhirclient/test_metadata_valid.json b/fhirclient/test_metadata_valid.json
new file mode 100644
index 0000000..e79ec4d
--- /dev/null
+++ b/fhirclient/test_metadata_valid.json
@@ -0,0 +1,70 @@
+{
+    "acceptUnknown": "no",
+    "date": "2014-10-29T11:42:32.193-00:00",
+    "description": "Describes capabilities of this SMART on FHIR server",
+    "fhirVersion": "0.0.82",
+    "format": [
+        "xml",
+        "json"
+    ],
+    "url": "https://fhir-api.smarthealthit.org/metadata",
+    "name": "SMART on FHIR CapabilityStatement",
+    "kind": "instance",
+    "publisher": "SMART on FHIR",
+    "resourceType": "CapabilityStatement",
+    "rest": [
+        {
+            "documentation": "All the functionality defined in FHIR",
+            "mode": "server",
+            "operation": [
+                {
+                    "name": "transaction",
+                    "definition": {
+                        "reference": "#op-trans"
+                    }
+                },
+                {
+                    "name": "history-system",
+                    "definition": {
+                        "reference": "#op-hist"
+                    }
+                }
+            ],
+            "resource": [],
+            "security": {
+                "description": "SMART on FHIR uses OAuth2 for authorization",
+                "extension": [
+                    {
+                        "url": "http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris#register",
+                        "valueUri": "https://authorize.smarthealthit.org/register"
+                    },
+                    {
+                        "url": "http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris#authorize",
+                        "valueUri": "https://authorize.smarthealthit.org/authorize"
+                    },
+                    {
+                        "url": "http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris#token",
+                        "valueUri": "https://authorize.smarthealthit.org/token"
+                    }
+                ],
+                "service": [
+                    {
+                        "coding": [
+                            {
+                                "code": "OAuth2",
+                                "system": "http://hl7.org/fhir/vs/restful-security-service"
+                            }
+                        ],
+                        "text": "OAuth version 2 (see oauth.net)."
+                    }
+                ]
+            }
+        }
+    ],
+    "status": "draft",
+    "text": {
+        "div": "<div>Generated CapabilityStatement -- see structured representation.</div>",
+        "status": "generated"
+    },
+    "version": "0.0.82.????"
+}
diff --git a/fhirclient/test_relative_reference.json b/fhirclient/test_relative_reference.json
new file mode 100644
index 0000000..7f0d4aa
--- /dev/null
+++ b/fhirclient/test_relative_reference.json
@@ -0,0 +1,64 @@
+{
+  "resourceType": "Questionnaire",
+  "id": "qs1",
+  "identifier": [
+    {
+      "system": "urn:ietf:rfc:3986"
+    }
+  ],
+  "status": "draft",
+  "date": "2012-05-12T00:00:00+10:00",
+  "publisher": "Grahame Grieve",
+  "item": [
+    {
+      "linkId": "Observation",
+      "type": "group",
+      "text": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
+      "required": true,
+      "repeats": false,
+      "item": [
+        {
+          "linkId": "Observation.subject",
+          "type": "group",
+          "text": "Who and/or what this is about",
+          "required": false,
+          "repeats": true,
+          "item": [
+            {
+              "linkId": "Observation.subject._type",
+              "type": "group",
+              "text": "type",
+              "type": "choice",
+              "required": false,
+              "repeats": false,
+              "options": {
+                "reference": "ValueSet/vs2r"
+              },
+              "item": [
+                {
+                  "linkId": "Observation.subject._Patient",
+                  "type": "question",
+                  "item": [
+                    {
+                      "extension": [
+                        {
+                          "url": "http://www.healthintersections.com.au/fhir/Profile/metadata#reference",
+                          "valueString": "/Patient?subject=$subj&patient=$subj&encounter=$encounter"
+                        }
+                      ],
+                      "linkId": "Observation.subject._Patient.value",
+                      "text": "Patient",
+                      "type": "reference",
+                      "required": false,
+                      "repeats": false
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
diff --git a/flask_app.py b/flask_app.py
new file mode 100644
index 0000000..cd2a713
--- /dev/null
+++ b/flask_app.py
@@ -0,0 +1,114 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from fhirclient import client
+from fhirclient.models.medication import Medication
+from fhirclient.models.medicationrequest import MedicationRequest
+
+from flask import Flask, request, redirect, session
+
+# app setup
+smart_defaults = {
+    'app_id': 'my_web_app',
+    'api_base': 'https://fhir-api-dstu2.smarthealthit.org',
+    'redirect_uri': 'http://localhost:8000/fhir-app/',
+}
+
+app = Flask(__name__)
+
+def _save_state(state):
+    session['state'] = state
+
+def _get_smart():
+    state = session.get('state')
+    if state:
+        return client.FHIRClient(state=state, save_func=_save_state)
+    else:
+        return client.FHIRClient(settings=smart_defaults, save_func=_save_state)
+
+def _logout():
+    if 'state' in session:
+        smart = _get_smart()
+        smart.reset_patient()
+
+def _reset():
+    if 'state' in session:
+        del session['state']
+
+def _get_prescriptions(smart):
+    bundle = MedicationRequest.where({'patient': smart.patient_id}).perform(smart.server)
+    pres = [be.resource for be in bundle.entry] if bundle is not None and bundle.entry is not None else None
+    if pres is not None and len(pres) > 0:
+        return pres
+    return None
+
+def _med_name(prescription):
+    if prescription.medicationCodeableConcept and prescription.medicationCodeableConcept.coding[0].display:
+        return prescription.medicationCodeableConcept.coding[0].display
+    if prescription.text and prescription.text.div:
+        return prescription.text.div
+    return "Unnamed Medication(TM)"
+
+
+# views
+
+ at app.route('/')
+ at app.route('/index.html')
+def index():
+    """ The app's main page.
+    """
+    smart = _get_smart()
+    body = "<h1>Hello</h1>"
+    
+    if smart.ready and smart.patient is not None:       # "ready" may be true but the access token may have expired, making smart.patient = None
+        name = smart.human_name(smart.patient.name[0] if smart.patient.name and len(smart.patient.name) > 0 else 'Unknown')
+        
+        # generate simple body text
+        body += "<p>You are authorized and ready to make API requests for <em>{0}</em>.</p>".format(name)
+        pres = _get_prescriptions(smart)
+        if pres is not None:
+            body += "<p>{0} prescriptions: <ul><li>{1}</li></ul></p>".format("His" if 'male' == smart.patient.gender else "Her", '</li><li>'.join([_med_name(p) for p in pres]))
+        else:
+            body += "<p>(There are no prescriptions for {0})</p>".format("him" if 'male' == smart.patient.gender else "her")
+        body += """<p><a href="/logout">Change patient</a></p>"""
+    else:
+        auth_url = smart.authorize_url
+        if auth_url is not None:
+            body += """<p>Please <a href="{0}">authorize</a>.</p>""".format(auth_url)
+        else:
+            body += """<p>Running against a no-auth server, nothing to demo here. """
+        body += """<p><a href="/reset" style="font-size:small;">Reset</a></p>"""
+    return body
+
+
+ at app.route('/fhir-app/')
+def callback():
+    """ OAuth2 callback interception.
+    """
+    smart = _get_smart()
+    try:
+        smart.handle_callback(request.url)
+    except Exception as e:
+        return """<h1>Authorization Error</h1><p>{0}</p><p><a href="/">Start over</a></p>""".format(e)
+    return redirect('/')
+
+
+ at app.route('/logout')
+def logout():
+    _logout()
+    return redirect('/')
+
+
+ at app.route('/reset')
+def reset():
+    _reset()
+    return redirect('/')
+
+
+# start the app
+if '__main__' == __name__:
+    import flaskbeaker
+    flaskbeaker.FlaskBeaker.setup_app(app)
+    
+    logging.basicConfig(level=logging.DEBUG)
+    app.run(debug=True, port=8000)
diff --git a/flaskbeaker.py b/flaskbeaker.py
new file mode 100644
index 0000000..daf3d2c
--- /dev/null
+++ b/flaskbeaker.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+from flask.sessions import SessionInterface
+from beaker.middleware import SessionMiddleware
+
+
+class FlaskBeaker(SessionInterface):
+    """ Beaker session interface class for Beaker sessions in Flask apps.
+    Stolen from http://flask.pocoo.org/snippets/121/ (public domain)
+    """
+    @classmethod
+    def setup_app(cls, app, session_opts=None):
+        if session_opts is None:
+            session_opts = {
+                'session.type': 'file',
+                'session.timeout': 3600,
+                'session.cookie_expires': 3600,
+                'session.data_dir': './session_data',
+                'session.auto': True
+            }
+        
+        app.wsgi_app = SessionMiddleware(app.wsgi_app, session_opts)
+        app.session_interface = cls()
+    
+    def open_session(self, app, request):
+        session = request.environ['beaker.session']
+        return session
+    
+    def save_session(self, app, session, response):
+        session.save()
diff --git a/generate_models.sh b/generate_models.sh
new file mode 100755
index 0000000..9a162da
--- /dev/null
+++ b/generate_models.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [ ! -e fhir-parser ]; then
+	git submodule update --init --recursive
+fi
+cp fhir-parser-resources/settings.py fhir-parser/settings.py
+cd fhir-parser
+./generate.py $1
+cd ..
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..96e0a5d
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,6 @@
+pip>=1.4
+setuptools>=0.9
+wheel>=0.21
+bumpversion>=0.3
+isodate>=0.5
+requests>=2.4
diff --git a/requirements_flask_app.txt b/requirements_flask_app.txt
new file mode 100644
index 0000000..bd747cf
--- /dev/null
+++ b/requirements_flask_app.txt
@@ -0,0 +1,8 @@
+Beaker==1.7.0
+Flask==0.10.1
+Jinja2==2.7.3
+MarkupSafe==0.23
+Werkzeug==0.10.4
+isodate==0.5.1
+itsdangerous==0.24
+requests==2.7.0
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..0e320e8
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,8 @@
+[pytest]
+addopts = --cov pem --cov-report term-missing
+minversion = 2.5
+strict = true
+
+[wheel]
+# Since we're a pure Python package, we can mark our wheels as universal.
+universal = 1
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..6f7c22f
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,56 @@
+import codecs
+import os
+import re
+
+from setuptools import setup, find_packages
+
+def read(*parts):
+    """
+    Build an absolute path from *parts* and and return the contents of the
+    resulting file.  Assume UTF-8 encoding.
+    """
+    here = os.path.abspath(os.path.dirname(__file__))
+    with codecs.open(os.path.join(here, *parts), 'rb', 'utf-8') as f:
+        return f.read()
+
+def find_version(*file_paths):
+    """
+    Build a path from *file_paths* and search for a ``__version__``
+    string inside.
+    """
+    version_file = read(*file_paths)
+    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
+                              version_file, re.M)
+    if version_match:
+        return version_match.group(1)
+    raise RuntimeError("Unable to find version string.")
+
+setup(
+    name='fhirclient',
+    version=find_version("fhirclient/client.py"),
+    description='A flexible client for FHIR servers supporting the SMART on FHIR protocol',
+    long_description=(read('README.md') + '\n\n' +
+                      read('AUTHORS.md')),
+    keywords='smart fhir healthcare medical-informatics clinical-informatics biomedical-informatics',
+    url='https://github.com/smart-on-fhir/client-py/',
+    license="APACHE2",
+    author="SMART Platforms Team",
+    author_email='support at smarthealthit.org',
+    packages=find_packages(exclude=['test*', '*_tests.py']),
+    install_requires=['requests', 'isodate'],
+    classifiers=[
+        'Development Status :: 4 - Beta',
+        'Intended Audience :: Developers',
+        'Natural Language :: English',
+        'License :: OSI Approved :: Apache Software License',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python',
+        'Programming Language :: Python :: 2',
+        'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3',
+        'Programming Language :: Python :: 3.3',
+        'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
+        'Topic :: Software Development :: Libraries :: Python Modules',
+    ],
+)
diff --git a/test_models.sh b/test_models.sh
new file mode 100755
index 0000000..3441ab6
--- /dev/null
+++ b/test_models.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# set this to a relative path, from inside the fhirclient/models directory, to the downloaded FHIR spec directory
+export FHIR_UNITTEST_DATADIR="../fhir-parser/downloads"
+
+cd fhirclient
+
+if [ ! -e $FHIR_UNITTEST_DATADIR ]; then
+	echo Unit tests depend on the downloaded FHIR spec, which is not present at $FHIR_UNITTEST_DATADIR. Cannot run unit tests.
+	exit 1
+fi
+echo 'import isodate' | python 2>/dev/null
+if [ $? -ne 0 ]; then
+	echo You need to have the 'isodate' module installed in order to run the tests
+	exit 1
+fi
+
+#python -m unittest discover ./models '*_tests.py'		# ImportError
+tests=(models/*_tests.py)
+python -m unittest ${tests[@]}
+
+# couple of custom tests
+echo 'import requests' | python 2>/dev/null
+if [ $? -eq 0 ]; then
+	python -m unittest server_tests.py fhirreference_tests.py
+else
+	echo "You don't have the 'requests' module installed, will skip extra tests"
+fi
+
+cd ..
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..b43ed2d
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,24 @@
+[tox]
+envlist = py27, py33, py34, py35, pypy
+[testenv]
+deps=
+    certifi
+    pytest
+    pytest-cov
+    pretend
+    pyopenssl
+commands=
+    py.test test_fhirclient.py
+
+[testenv:py33]
+deps=
+    certifi
+    pytest
+    pytest-cov
+    pretend
+    coverage
+    pyopenssl
+
+[testenv:py34]
+deps=
+    {[testenv:py33]deps}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-fhirclient.git



More information about the debian-med-commit mailing list