diff --git a/packages/fhir-4/.eslintrc.json b/packages/fhir-4/.eslintrc.json
new file mode 100644
index 000000000..f7a0ddac8
--- /dev/null
+++ b/packages/fhir-4/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "../../.eslintrc.json"
+}
\ No newline at end of file
diff --git a/packages/fhir-4/.gitignore b/packages/fhir-4/.gitignore
new file mode 100644
index 000000000..e093490da
--- /dev/null
+++ b/packages/fhir-4/.gitignore
@@ -0,0 +1,3 @@
+spec/
+schema/
+!types
\ No newline at end of file
diff --git a/packages/fhir-4/CHANGELOG.md b/packages/fhir-4/CHANGELOG.md
new file mode 100644
index 000000000..7fa4ab16f
--- /dev/null
+++ b/packages/fhir-4/CHANGELOG.md
@@ -0,0 +1,5 @@
+# @openfn/language-fhir-4
+
+## 1.0.0
+
+Initial release.
diff --git a/packages/fhir-4/LICENSE b/packages/fhir-4/LICENSE
new file mode 100644
index 000000000..94a9ed024
--- /dev/null
+++ b/packages/fhir-4/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/packages/fhir-4/LICENSE.LESSER b/packages/fhir-4/LICENSE.LESSER
new file mode 100644
index 000000000..65c5ca88a
--- /dev/null
+++ b/packages/fhir-4/LICENSE.LESSER
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/packages/fhir-4/README.md b/packages/fhir-4/README.md
new file mode 100644
index 000000000..c367a33d1
--- /dev/null
+++ b/packages/fhir-4/README.md
@@ -0,0 +1,31 @@
+# language-fhir-4
+
+An OpenFn adaptor for building integration jobs for use with the fhir-4 API.
+
+This adaptor has been auto-generated from a FHIR spec. Do not modify generated
+code or changes will be lost.
+
+## Documentation
+
+View the [docs site](https://docs.openfn.org/adaptors/packages/fhir-4-docs)
+for full technical documentation.
+
+### Configuration
+
+View the
+[configuration-schema](https://docs.openfn.org/adaptors/packages/fhir-4-configuration-schema/)
+for required and optional `configuration` properties.
+
+## Development
+
+Clone the [adaptors monorepo](https://github.com/OpenFn/adaptors). Follow the
+"Getting Started" guide inside to get set up.
+
+Run tests using `pnpm run test`
+
+Build the adaptor using `pnpm build`.
+
+Re-generate the adaptor source with `pnpm generate-fhir fhir-4`
+
+To update the spec an re-generate, run `pnpm generate-fhir fhir-4 --respec`.
+You can update the spec url with `--spec ` or by modifying package.json
diff --git a/packages/fhir-4/assets/rectangle.png b/packages/fhir-4/assets/rectangle.png
new file mode 100644
index 000000000..a6d14a6d7
Binary files /dev/null and b/packages/fhir-4/assets/rectangle.png differ
diff --git a/packages/fhir-4/assets/square.png b/packages/fhir-4/assets/square.png
new file mode 100644
index 000000000..c6281fdbc
Binary files /dev/null and b/packages/fhir-4/assets/square.png differ
diff --git a/packages/fhir-4/build/mappings.js b/packages/fhir-4/build/mappings.js
new file mode 100644
index 000000000..9f273b14f
--- /dev/null
+++ b/packages/fhir-4/build/mappings.js
@@ -0,0 +1,12 @@
+// Add resource and profile mappings here to improve your generated adaptor
+
+export default {
+ include: [],
+ exclude: [],
+ overrides: {},
+ // No value sets for now
+ // Note: when generating from the base fhir spec, valuesets are actually in the core bundle
+ valueSets: [
+ /*'http://hl7.org/fhir'*/
+ ],
+};
diff --git a/packages/fhir-4/configuration-schema.json b/packages/fhir-4/configuration-schema.json
new file mode 100644
index 000000000..a1bb22040
--- /dev/null
+++ b/packages/fhir-4/configuration-schema.json
@@ -0,0 +1,64 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "baseUrl": {
+ "title": "Base Url",
+ "type": "string",
+ "description": "The baseUrl",
+ "examples": [
+ "https://hapi.fhir.org"
+ ]
+ },
+ "apiPath": {
+ "title": "API Path",
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "placeholder": "R4",
+ "description": "FHIR api path",
+ "minLength": 1,
+ "examples": [
+ "baseR4",
+ "R3",
+ "R4"
+ ]
+ },
+ "username": {
+ "title": "Username",
+ "type": "string",
+ "description": "Username",
+ "examples": [
+ "openfn_test"
+ ]
+ },
+ "password": {
+ "title": "Password",
+ "type": "string",
+ "description": "Password",
+ "writeOnly": true,
+ "examples": [
+ "@some(!)Str0ngp4ss0w0rd"
+ ]
+ },
+ "access_token": {
+ "title": "Access Token",
+ "type": "string",
+ "description": "Your FHIR access token",
+ "writeOnly": true,
+ "minLength": 1,
+ "examples": [
+ "the-long-access-token-from-your-auth"
+ ]
+ }
+ },
+ "required": [
+ "baseUrl",
+ "apiPath"
+ ]
+}
\ No newline at end of file
diff --git a/packages/fhir-4/package.json b/packages/fhir-4/package.json
new file mode 100644
index 000000000..20edf9c02
--- /dev/null
+++ b/packages/fhir-4/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "@openfn/language-fhir-4",
+ "version": "0.1.0",
+ "description": "OpenFn fhir-4 adaptor",
+ "scripts": {
+ "build": "pnpm clean && build-adaptor fhir-4 src ast docs",
+ "build:src": "pnpm generate-fhir fhir-4",
+ "build:spec": "pnpm generate-fhir fhir-4 --respec",
+ "test": "mocha --experimental-specifier-resolution=node --no-warnings",
+ "test:watch": "mocha -w --experimental-specifier-resolution=node --no-warnings",
+ "clean": "rimraf dist docs",
+ "pack": "pnpm pack --pack-destination ../../dist",
+ "lint": "eslint src"
+ },
+ "author": "Open Function Group",
+ "license": "LGPLv3",
+ "type": "module",
+ "fhir": {
+ "specUrl": "https://hl7.org/fhir/R4B/definitions.json.zip",
+ "adaptorGeneratedDate": "2025-01-14T16:36:09.668Z",
+ "generatorVersion": "0.2.3"
+ },
+ "dependencies": {
+ "@openfn/language-common": "workspace:*"
+ },
+ "devDependencies": {
+ "assertion-error": "2.0.0",
+ "chai": "4.3.6",
+ "deep-eql": "4.1.1",
+ "esno": "^0.16.3",
+ "mocha": "^10.7.3",
+ "rimraf": "3.0.2",
+ "undici": "^5.22.1",
+ "typescript": "4.8.4"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/openfn/adaptors.git"
+ },
+ "types": "types/index.d.ts",
+ "main": "dist/index.cjs",
+ "exports": {
+ ".": {
+ "import": "./dist/index.js",
+ "types": "./types/index.d.ts",
+ "require": "./dist/index.cjs"
+ },
+ "./package.json": "./package.json"
+ },
+ "files": [
+ "dist/",
+ "types/",
+ "ast.json",
+ "configuration-schema.json"
+ ]
+}
\ No newline at end of file
diff --git a/packages/fhir-4/src/Adaptor.js b/packages/fhir-4/src/Adaptor.js
new file mode 100644
index 000000000..c38100563
--- /dev/null
+++ b/packages/fhir-4/src/Adaptor.js
@@ -0,0 +1,19 @@
+import { expandReferences } from '@openfn/language-common/util';
+import * as util from './Utils';
+
+// TODO: export your main operations here
+// Can we auto-generate any thing here?
+
+export {
+ dataPath,
+ dataValue,
+ dateFns,
+ cursor,
+ each,
+ field,
+ fields,
+ fn,
+ lastReferenceValue,
+ merge,
+ sourceValue,
+} from '@openfn/language-common';
diff --git a/packages/fhir-4/src/builders.js b/packages/fhir-4/src/builders.js
new file mode 100644
index 000000000..30d7c0885
--- /dev/null
+++ b/packages/fhir-4/src/builders.js
@@ -0,0 +1,28436 @@
+
+// THIS FILE WAS AUTO-GENERATED
+// DO NOT MAKE CHANGES MANUALLY OR THEY WILL BE LOST
+// SEE THE README FILE FOR DETAILS
+
+import * as util from "./utils.js";
+import _ from "lodash";
+
+/**
+ * Create a FHIR Account resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function account(type, props) {
+ const mappings = {
+ "Account": account_Account
+ };
+
+ return mappings[type](props)
+}
+
+function account_Account(props) {
+ const resource = {
+ resourceType: "Account",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.subject)) {
+ if (!Array.isArray(props.subject)) { props.subject = [props.subject]; }
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.servicePeriod)) {
+ resource.servicePeriod = props.servicePeriod;
+ }
+
+ if (!_.isNil(props.coverage)) {
+ let src = props.coverage;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.coverage = [];
+
+ for (let item of src) {
+ let _coverage = {};
+
+ if (!_.isNil(item.id)) {
+ _coverage.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _coverage.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.coverage)) {
+ _coverage.coverage = item.coverage;
+ }
+
+ if (!_.isNil(item.priority)) {
+ _coverage.priority = item.priority;
+ }
+
+ resource.coverage.push(_coverage);
+ }
+ }
+
+ if (!_.isNil(props.owner)) {
+ resource.owner = util.reference(props.owner);
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.guarantor)) {
+ let src = props.guarantor;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.guarantor = [];
+
+ for (let item of src) {
+ let _guarantor = {};
+
+ if (!_.isNil(item.id)) {
+ _guarantor.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _guarantor.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.party)) {
+ _guarantor.party = item.party;
+ }
+
+ if (!_.isNil(item.onHold)) {
+ _guarantor.onHold = item.onHold;
+ }
+
+ if (!_.isNil(item.period)) {
+ _guarantor.period = item.period;
+ }
+
+ resource.guarantor.push(_guarantor);
+ }
+ }
+
+ if (!_.isNil(props.partOf)) {
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Account"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ActivityDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function activityDefinition(type, props) {
+ const mappings = {
+ "ActivityDefinition": activityDefinition_ActivityDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function activityDefinition_ActivityDefinition(props) {
+ const resource = {
+ resourceType: "ActivityDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.subtitle)) {
+ resource.subtitle = props.subtitle;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.subject)) {
+ util.composite(resource, "subject", props.subject);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.usage)) {
+ resource.usage = props.usage;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.topic)) {
+ resource.topic = props.topic;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.library)) {
+ resource.library = props.library;
+ }
+
+ if (!_.isNil(props.kind)) {
+ resource.kind = props.kind;
+ }
+
+ if (!_.isNil(props.profile)) {
+ resource.profile = props.profile;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.intent)) {
+ resource.intent = props.intent;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.doNotPerform)) {
+ resource.doNotPerform = props.doNotPerform;
+ }
+
+ if (!_.isNil(props.timing)) {
+ util.composite(resource, "timing", props.timing);
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.participant)) {
+ let src = props.participant;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.participant = [];
+
+ for (let item of src) {
+ let _participant = {};
+
+ if (!_.isNil(item.id)) {
+ _participant.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _participant.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _participant.type = item.type;
+ }
+
+ if (!_.isNil(item.role)) {
+ _participant.role = item.role;
+ }
+
+ resource.participant.push(_participant);
+ }
+ }
+
+ if (!_.isNil(props.product)) {
+ util.composite(resource, "product", props.product);
+ }
+
+ if (!_.isNil(props.quantity)) {
+ resource.quantity = props.quantity;
+ }
+
+ if (!_.isNil(props.dosage)) {
+ resource.dosage = props.dosage;
+ }
+
+ if (!_.isNil(props.bodySite)) {
+ resource.bodySite = props.bodySite;
+ }
+
+ if (!_.isNil(props.specimenRequirement)) {
+ if (!Array.isArray(props.specimenRequirement)) { props.specimenRequirement = [props.specimenRequirement]; }
+ resource.specimenRequirement = util.reference(props.specimenRequirement);
+ }
+
+ if (!_.isNil(props.observationRequirement)) {
+ if (!Array.isArray(props.observationRequirement)) { props.observationRequirement = [props.observationRequirement]; }
+ resource.observationRequirement = util.reference(props.observationRequirement);
+ }
+
+ if (!_.isNil(props.observationResultRequirement)) {
+ if (!Array.isArray(props.observationResultRequirement)) { props.observationResultRequirement = [props.observationResultRequirement]; }
+ resource.observationResultRequirement = util.reference(props.observationResultRequirement);
+ }
+
+ if (!_.isNil(props.transform)) {
+ resource.transform = props.transform;
+ }
+
+ if (!_.isNil(props.dynamicValue)) {
+ let src = props.dynamicValue;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.dynamicValue = [];
+
+ for (let item of src) {
+ let _dynamicValue = {};
+
+ if (!_.isNil(item.id)) {
+ _dynamicValue.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _dynamicValue.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.path)) {
+ _dynamicValue.path = item.path;
+ }
+
+ if (!_.isNil(item.expression)) {
+ _dynamicValue.expression = item.expression;
+ }
+
+ resource.dynamicValue.push(_dynamicValue);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ActivityDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR AdministrableProductDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function administrableProductDefinition(type, props) {
+ const mappings = {
+ "AdministrableProductDefinition": administrableProductDefinition_AdministrableProductDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function administrableProductDefinition_AdministrableProductDefinition(props) {
+ const resource = {
+ resourceType: "AdministrableProductDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.formOf)) {
+ if (!Array.isArray(props.formOf)) { props.formOf = [props.formOf]; }
+ resource.formOf = util.reference(props.formOf);
+ }
+
+ if (!_.isNil(props.administrableDoseForm)) {
+ resource.administrableDoseForm = props.administrableDoseForm;
+ }
+
+ if (!_.isNil(props.unitOfPresentation)) {
+ resource.unitOfPresentation = props.unitOfPresentation;
+ }
+
+ if (!_.isNil(props.producedFrom)) {
+ if (!Array.isArray(props.producedFrom)) { props.producedFrom = [props.producedFrom]; }
+ resource.producedFrom = util.reference(props.producedFrom);
+ }
+
+ if (!_.isNil(props.ingredient)) {
+ resource.ingredient = props.ingredient;
+ }
+
+ if (!_.isNil(props.device)) {
+ resource.device = util.reference(props.device);
+ }
+
+ if (!_.isNil(props.property)) {
+ let src = props.property;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.property = [];
+
+ for (let item of src) {
+ let _property = {};
+
+ if (!_.isNil(item.id)) {
+ _property.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _property.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _property.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _property.value = item.value;
+ }
+
+ if (!_.isNil(item.status)) {
+ _property.status = item.status;
+ }
+
+ resource.property.push(_property);
+ }
+ }
+
+ if (!_.isNil(props.routeOfAdministration)) {
+ let src = props.routeOfAdministration;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.routeOfAdministration = [];
+
+ for (let item of src) {
+ let _routeOfAdministration = {};
+
+ if (!_.isNil(item.id)) {
+ _routeOfAdministration.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _routeOfAdministration.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _routeOfAdministration.code = item.code;
+ }
+
+ if (!_.isNil(item.firstDose)) {
+ _routeOfAdministration.firstDose = item.firstDose;
+ }
+
+ if (!_.isNil(item.maxSingleDose)) {
+ _routeOfAdministration.maxSingleDose = item.maxSingleDose;
+ }
+
+ if (!_.isNil(item.maxDosePerDay)) {
+ _routeOfAdministration.maxDosePerDay = item.maxDosePerDay;
+ }
+
+ if (!_.isNil(item.maxDosePerTreatmentPeriod)) {
+ _routeOfAdministration.maxDosePerTreatmentPeriod = item.maxDosePerTreatmentPeriod;
+ }
+
+ if (!_.isNil(item.maxTreatmentPeriod)) {
+ _routeOfAdministration.maxTreatmentPeriod = item.maxTreatmentPeriod;
+ }
+
+ if (!_.isNil(item.targetSpecies)) {
+ _routeOfAdministration.targetSpecies = item.targetSpecies;
+ }
+
+ resource.routeOfAdministration.push(_routeOfAdministration);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/AdministrableProductDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR AdverseEvent resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function adverseEvent(type, props) {
+ const mappings = {
+ "AdverseEvent": adverseEvent_AdverseEvent
+ };
+
+ return mappings[type](props)
+}
+
+function adverseEvent_AdverseEvent(props) {
+ const resource = {
+ resourceType: "AdverseEvent",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.actuality)) {
+ resource.actuality = props.actuality;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.event)) {
+ resource.event = props.event;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.detected)) {
+ resource.detected = props.detected;
+ }
+
+ if (!_.isNil(props.recordedDate)) {
+ resource.recordedDate = props.recordedDate;
+ }
+
+ if (!_.isNil(props.resultingCondition)) {
+ if (!Array.isArray(props.resultingCondition)) { props.resultingCondition = [props.resultingCondition]; }
+ resource.resultingCondition = util.reference(props.resultingCondition);
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.seriousness)) {
+ resource.seriousness = props.seriousness;
+ }
+
+ if (!_.isNil(props.severity)) {
+ resource.severity = props.severity;
+ }
+
+ if (!_.isNil(props.outcome)) {
+ resource.outcome = props.outcome;
+ }
+
+ if (!_.isNil(props.recorder)) {
+ resource.recorder = util.reference(props.recorder);
+ }
+
+ if (!_.isNil(props.contributor)) {
+ if (!Array.isArray(props.contributor)) { props.contributor = [props.contributor]; }
+ resource.contributor = util.reference(props.contributor);
+ }
+
+ if (!_.isNil(props.suspectEntity)) {
+ let src = props.suspectEntity;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.suspectEntity = [];
+
+ for (let item of src) {
+ let _suspectEntity = {};
+
+ if (!_.isNil(item.id)) {
+ _suspectEntity.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _suspectEntity.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.instance)) {
+ _suspectEntity.instance = item.instance;
+ }
+
+ if (!_.isNil(item.causality)) {
+ _suspectEntity.causality = item.causality;
+ }
+
+ resource.suspectEntity.push(_suspectEntity);
+ }
+ }
+
+ if (!_.isNil(props.subjectMedicalHistory)) {
+ if (!Array.isArray(props.subjectMedicalHistory)) { props.subjectMedicalHistory = [props.subjectMedicalHistory]; }
+ resource.subjectMedicalHistory = util.reference(props.subjectMedicalHistory);
+ }
+
+ if (!_.isNil(props.referenceDocument)) {
+ if (!Array.isArray(props.referenceDocument)) { props.referenceDocument = [props.referenceDocument]; }
+ resource.referenceDocument = util.reference(props.referenceDocument);
+ }
+
+ if (!_.isNil(props.study)) {
+ if (!Array.isArray(props.study)) { props.study = [props.study]; }
+ resource.study = util.reference(props.study);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/AdverseEvent"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR AllergyIntolerance resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function allergyIntolerance(type, props) {
+ const mappings = {
+ "AllergyIntolerance": allergyIntolerance_AllergyIntolerance
+ };
+
+ return mappings[type](props)
+}
+
+function allergyIntolerance_AllergyIntolerance(props) {
+ const resource = {
+ resourceType: "AllergyIntolerance",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.clinicalStatus)) {
+ resource.clinicalStatus = props.clinicalStatus;
+ }
+
+ if (!_.isNil(props.verificationStatus)) {
+ resource.verificationStatus = props.verificationStatus;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.criticality)) {
+ resource.criticality = props.criticality;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.onset)) {
+ util.composite(resource, "onset", props.onset);
+ }
+
+ if (!_.isNil(props.recordedDate)) {
+ resource.recordedDate = props.recordedDate;
+ }
+
+ if (!_.isNil(props.recorder)) {
+ resource.recorder = util.reference(props.recorder);
+ }
+
+ if (!_.isNil(props.asserter)) {
+ resource.asserter = util.reference(props.asserter);
+ }
+
+ if (!_.isNil(props.lastOccurrence)) {
+ resource.lastOccurrence = props.lastOccurrence;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.reaction)) {
+ let src = props.reaction;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.reaction = [];
+
+ for (let item of src) {
+ let _reaction = {};
+
+ if (!_.isNil(item.id)) {
+ _reaction.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _reaction.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.substance)) {
+ _reaction.substance = item.substance;
+ }
+
+ if (!_.isNil(item.manifestation)) {
+ _reaction.manifestation = item.manifestation;
+ }
+
+ if (!_.isNil(item.description)) {
+ _reaction.description = item.description;
+ }
+
+ if (!_.isNil(item.onset)) {
+ _reaction.onset = item.onset;
+ }
+
+ if (!_.isNil(item.severity)) {
+ _reaction.severity = item.severity;
+ }
+
+ if (!_.isNil(item.exposureRoute)) {
+ _reaction.exposureRoute = item.exposureRoute;
+ }
+
+ if (!_.isNil(item.note)) {
+ _reaction.note = item.note;
+ }
+
+ resource.reaction.push(_reaction);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Appointment resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function appointment(type, props) {
+ const mappings = {
+ "Appointment": appointment_Appointment
+ };
+
+ return mappings[type](props)
+}
+
+function appointment_Appointment(props) {
+ const resource = {
+ resourceType: "Appointment",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.cancelationReason)) {
+ resource.cancelationReason = props.cancelationReason;
+ }
+
+ if (!_.isNil(props.serviceCategory)) {
+ resource.serviceCategory = props.serviceCategory;
+ }
+
+ if (!_.isNil(props.serviceType)) {
+ resource.serviceType = props.serviceType;
+ }
+
+ if (!_.isNil(props.specialty)) {
+ resource.specialty = props.specialty;
+ }
+
+ if (!_.isNil(props.appointmentType)) {
+ resource.appointmentType = props.appointmentType;
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.supportingInformation)) {
+ if (!Array.isArray(props.supportingInformation)) { props.supportingInformation = [props.supportingInformation]; }
+ resource.supportingInformation = util.reference(props.supportingInformation);
+ }
+
+ if (!_.isNil(props.start)) {
+ resource.start = props.start;
+ }
+
+ if (!_.isNil(props.end)) {
+ resource.end = props.end;
+ }
+
+ if (!_.isNil(props.minutesDuration)) {
+ resource.minutesDuration = props.minutesDuration;
+ }
+
+ if (!_.isNil(props.slot)) {
+ if (!Array.isArray(props.slot)) { props.slot = [props.slot]; }
+ resource.slot = util.reference(props.slot);
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.comment)) {
+ resource.comment = props.comment;
+ }
+
+ if (!_.isNil(props.patientInstruction)) {
+ resource.patientInstruction = props.patientInstruction;
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.participant)) {
+ let src = props.participant;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.participant = [];
+
+ for (let item of src) {
+ let _participant = {};
+
+ if (!_.isNil(item.id)) {
+ _participant.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _participant.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _participant.type = item.type;
+ }
+
+ if (!_.isNil(item.actor)) {
+ _participant.actor = item.actor;
+ }
+
+ if (!_.isNil(item.required)) {
+ _participant.required = item.required;
+ }
+
+ if (!_.isNil(item.status)) {
+ _participant.status = item.status;
+ }
+
+ if (!_.isNil(item.period)) {
+ _participant.period = item.period;
+ }
+
+ resource.participant.push(_participant);
+ }
+ }
+
+ if (!_.isNil(props.requestedPeriod)) {
+ resource.requestedPeriod = props.requestedPeriod;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Appointment"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR AppointmentResponse resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function appointmentResponse(type, props) {
+ const mappings = {
+ "AppointmentResponse": appointmentResponse_AppointmentResponse
+ };
+
+ return mappings[type](props)
+}
+
+function appointmentResponse_AppointmentResponse(props) {
+ const resource = {
+ resourceType: "AppointmentResponse",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.appointment)) {
+ resource.appointment = util.reference(props.appointment);
+ }
+
+ if (!_.isNil(props.start)) {
+ resource.start = props.start;
+ }
+
+ if (!_.isNil(props.end)) {
+ resource.end = props.end;
+ }
+
+ if (!_.isNil(props.participantType)) {
+ resource.participantType = props.participantType;
+ }
+
+ if (!_.isNil(props.actor)) {
+ resource.actor = util.reference(props.actor);
+ }
+
+ if (!_.isNil(props.participantStatus)) {
+ resource.participantStatus = props.participantStatus;
+ }
+
+ if (!_.isNil(props.comment)) {
+ resource.comment = props.comment;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/AppointmentResponse"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR AuditEvent resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function auditEvent(type, props) {
+ const mappings = {
+ "AuditEvent": auditEvent_AuditEvent
+ };
+
+ return mappings[type](props)
+}
+
+function auditEvent_AuditEvent(props) {
+ const resource = {
+ resourceType: "AuditEvent",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.subtype)) {
+ resource.subtype = props.subtype;
+ }
+
+ if (!_.isNil(props.action)) {
+ resource.action = props.action;
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.recorded)) {
+ resource.recorded = props.recorded;
+ }
+
+ if (!_.isNil(props.outcome)) {
+ resource.outcome = props.outcome;
+ }
+
+ if (!_.isNil(props.outcomeDesc)) {
+ resource.outcomeDesc = props.outcomeDesc;
+ }
+
+ if (!_.isNil(props.purposeOfEvent)) {
+ resource.purposeOfEvent = props.purposeOfEvent;
+ }
+
+ if (!_.isNil(props.agent)) {
+ let src = props.agent;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.agent = [];
+
+ for (let item of src) {
+ let _agent = {};
+
+ if (!_.isNil(item.id)) {
+ _agent.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _agent.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _agent.type = item.type;
+ }
+
+ if (!_.isNil(item.role)) {
+ _agent.role = item.role;
+ }
+
+ if (!_.isNil(item.who)) {
+ _agent.who = item.who;
+ }
+
+ if (!_.isNil(item.altId)) {
+ _agent.altId = item.altId;
+ }
+
+ if (!_.isNil(item.name)) {
+ _agent.name = item.name;
+ }
+
+ if (!_.isNil(item.requestor)) {
+ _agent.requestor = item.requestor;
+ }
+
+ if (!_.isNil(item.location)) {
+ _agent.location = item.location;
+ }
+
+ if (!_.isNil(item.policy)) {
+ _agent.policy = item.policy;
+ }
+
+ if (!_.isNil(item.media)) {
+ _agent.media = item.media;
+ }
+
+ if (!_.isNil(item.network)) {
+ _agent.network = item.network;
+ }
+
+ if (!_.isNil(item.purposeOfUse)) {
+ _agent.purposeOfUse = item.purposeOfUse;
+ }
+
+ resource.agent.push(_agent);
+ }
+ }
+
+ if (!_.isNil(props.source)) {
+ let src = props.source;
+ let _source = {};
+
+ if (!_.isNil(src.id)) {
+ _source.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _source.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.site)) {
+ _source.site = src.site;
+ }
+
+ if (!_.isNil(src.observer)) {
+ _source.observer = src.observer;
+ }
+
+ if (!_.isNil(src.type)) {
+ _source.type = src.type;
+ }
+
+ resource.source = _source;
+ }
+
+ if (!_.isNil(props.entity)) {
+ let src = props.entity;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.entity = [];
+
+ for (let item of src) {
+ let _entity = {};
+
+ if (!_.isNil(item.id)) {
+ _entity.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _entity.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.what)) {
+ _entity.what = item.what;
+ }
+
+ if (!_.isNil(item.type)) {
+ _entity.type = item.type;
+ }
+
+ if (!_.isNil(item.role)) {
+ _entity.role = item.role;
+ }
+
+ if (!_.isNil(item.lifecycle)) {
+ _entity.lifecycle = item.lifecycle;
+ }
+
+ if (!_.isNil(item.securityLabel)) {
+ _entity.securityLabel = item.securityLabel;
+ }
+
+ if (!_.isNil(item.name)) {
+ _entity.name = item.name;
+ }
+
+ if (!_.isNil(item.description)) {
+ _entity.description = item.description;
+ }
+
+ if (!_.isNil(item.query)) {
+ _entity.query = item.query;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _entity.detail = item.detail;
+ }
+
+ resource.entity.push(_entity);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/AuditEvent"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Basic resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function basic(type, props) {
+ const mappings = {
+ "Basic": basic_Basic
+ };
+
+ return mappings[type](props)
+}
+
+function basic_Basic(props) {
+ const resource = {
+ resourceType: "Basic",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = util.reference(props.author);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Basic"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Binary resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function binary(type, props) {
+ const mappings = {
+ "Binary": binary_Binary
+ };
+
+ return mappings[type](props)
+}
+
+function binary_Binary(props) {
+ const resource = {
+ resourceType: "Binary",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.contentType)) {
+ resource.contentType = props.contentType;
+ }
+
+ if (!_.isNil(props.securityContext)) {
+ resource.securityContext = util.reference(props.securityContext);
+ }
+
+ if (!_.isNil(props.data)) {
+ resource.data = props.data;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Binary"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR BiologicallyDerivedProduct resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function biologicallyDerivedProduct(type, props) {
+ const mappings = {
+ "BiologicallyDerivedProduct": biologicallyDerivedProduct_BiologicallyDerivedProduct
+ };
+
+ return mappings[type](props)
+}
+
+function biologicallyDerivedProduct_BiologicallyDerivedProduct(props) {
+ const resource = {
+ resourceType: "BiologicallyDerivedProduct",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.productCategory)) {
+ resource.productCategory = props.productCategory;
+ }
+
+ if (!_.isNil(props.productCode)) {
+ resource.productCode = props.productCode;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.request)) {
+ if (!Array.isArray(props.request)) { props.request = [props.request]; }
+ resource.request = util.reference(props.request);
+ }
+
+ if (!_.isNil(props.quantity)) {
+ resource.quantity = props.quantity;
+ }
+
+ if (!_.isNil(props.parent)) {
+ if (!Array.isArray(props.parent)) { props.parent = [props.parent]; }
+ resource.parent = util.reference(props.parent);
+ }
+
+ if (!_.isNil(props.collection)) {
+ let src = props.collection;
+ let _collection = {};
+
+ if (!_.isNil(src.id)) {
+ _collection.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _collection.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.collector)) {
+ _collection.collector = src.collector;
+ }
+
+ if (!_.isNil(src.source)) {
+ _collection.source = src.source;
+ }
+
+ if (!_.isNil(src.collected)) {
+ _collection.collected = src.collected;
+ }
+
+ resource.collection = _collection;
+ }
+
+ if (!_.isNil(props.processing)) {
+ let src = props.processing;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.processing = [];
+
+ for (let item of src) {
+ let _processing = {};
+
+ if (!_.isNil(item.id)) {
+ _processing.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _processing.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _processing.description = item.description;
+ }
+
+ if (!_.isNil(item.procedure)) {
+ _processing.procedure = item.procedure;
+ }
+
+ if (!_.isNil(item.additive)) {
+ _processing.additive = item.additive;
+ }
+
+ if (!_.isNil(item.time)) {
+ _processing.time = item.time;
+ }
+
+ resource.processing.push(_processing);
+ }
+ }
+
+ if (!_.isNil(props.manipulation)) {
+ let src = props.manipulation;
+ let _manipulation = {};
+
+ if (!_.isNil(src.id)) {
+ _manipulation.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _manipulation.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.description)) {
+ _manipulation.description = src.description;
+ }
+
+ if (!_.isNil(src.time)) {
+ _manipulation.time = src.time;
+ }
+
+ resource.manipulation = _manipulation;
+ }
+
+ if (!_.isNil(props.storage)) {
+ let src = props.storage;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.storage = [];
+
+ for (let item of src) {
+ let _storage = {};
+
+ if (!_.isNil(item.id)) {
+ _storage.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _storage.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _storage.description = item.description;
+ }
+
+ if (!_.isNil(item.temperature)) {
+ _storage.temperature = item.temperature;
+ }
+
+ if (!_.isNil(item.scale)) {
+ _storage.scale = item.scale;
+ }
+
+ if (!_.isNil(item.duration)) {
+ _storage.duration = item.duration;
+ }
+
+ resource.storage.push(_storage);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/BiologicallyDerivedProduct"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR BodyStructure resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function bodyStructure(type, props) {
+ const mappings = {
+ "BodyStructure": bodyStructure_BodyStructure
+ };
+
+ return mappings[type](props)
+}
+
+function bodyStructure_BodyStructure(props) {
+ const resource = {
+ resourceType: "BodyStructure",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.morphology)) {
+ resource.morphology = props.morphology;
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = props.location;
+ }
+
+ if (!_.isNil(props.locationQualifier)) {
+ resource.locationQualifier = props.locationQualifier;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.image)) {
+ resource.image = props.image;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/BodyStructure"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Bundle resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function bundle(type, props) {
+ const mappings = {
+ "Bundle": bundle_Bundle
+ };
+
+ return mappings[type](props)
+}
+
+function bundle_Bundle(props) {
+ const resource = {
+ resourceType: "Bundle",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.timestamp)) {
+ resource.timestamp = props.timestamp;
+ }
+
+ if (!_.isNil(props.total)) {
+ resource.total = props.total;
+ }
+
+ if (!_.isNil(props.link)) {
+ let src = props.link;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.link = [];
+
+ for (let item of src) {
+ let _link = {};
+
+ if (!_.isNil(item.id)) {
+ _link.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _link.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.relation)) {
+ _link.relation = item.relation;
+ }
+
+ if (!_.isNil(item.url)) {
+ _link.url = item.url;
+ }
+
+ resource.link.push(_link);
+ }
+ }
+
+ if (!_.isNil(props.entry)) {
+ let src = props.entry;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.entry = [];
+
+ for (let item of src) {
+ let _entry = {};
+
+ if (!_.isNil(item.id)) {
+ _entry.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _entry.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.fullUrl)) {
+ _entry.fullUrl = item.fullUrl;
+ }
+
+ if (!_.isNil(item.resource)) {
+ _entry.resource = item.resource;
+ }
+
+ if (!_.isNil(item.search)) {
+ _entry.search = item.search;
+ }
+
+ if (!_.isNil(item.request)) {
+ _entry.request = item.request;
+ }
+
+ if (!_.isNil(item.response)) {
+ _entry.response = item.response;
+ }
+
+ resource.entry.push(_entry);
+ }
+ }
+
+ if (!_.isNil(props.signature)) {
+ resource.signature = props.signature;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Bundle"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR CapabilityStatement resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function capabilityStatement(type, props) {
+ const mappings = {
+ "CapabilityStatement": capabilityStatement_CapabilityStatement
+ };
+
+ return mappings[type](props)
+}
+
+function capabilityStatement_CapabilityStatement(props) {
+ const resource = {
+ resourceType: "CapabilityStatement",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.kind)) {
+ resource.kind = props.kind;
+ }
+
+ if (!_.isNil(props.instantiates)) {
+ resource.instantiates = props.instantiates;
+ }
+
+ if (!_.isNil(props.imports)) {
+ resource.imports = props.imports;
+ }
+
+ if (!_.isNil(props.software)) {
+ let src = props.software;
+ let _software = {};
+
+ if (!_.isNil(src.id)) {
+ _software.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _software.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.name)) {
+ _software.name = src.name;
+ }
+
+ if (!_.isNil(src.version)) {
+ _software.version = src.version;
+ }
+
+ if (!_.isNil(src.releaseDate)) {
+ _software.releaseDate = src.releaseDate;
+ }
+
+ resource.software = _software;
+ }
+
+ if (!_.isNil(props.implementation)) {
+ let src = props.implementation;
+ let _implementation = {};
+
+ if (!_.isNil(src.id)) {
+ _implementation.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _implementation.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.description)) {
+ _implementation.description = src.description;
+ }
+
+ if (!_.isNil(src.url)) {
+ _implementation.url = src.url;
+ }
+
+ if (!_.isNil(src.custodian)) {
+ _implementation.custodian = src.custodian;
+ }
+
+ resource.implementation = _implementation;
+ }
+
+ if (!_.isNil(props.fhirVersion)) {
+ resource.fhirVersion = props.fhirVersion;
+ }
+
+ if (!_.isNil(props.format)) {
+ resource.format = props.format;
+ }
+
+ if (!_.isNil(props.patchFormat)) {
+ resource.patchFormat = props.patchFormat;
+ }
+
+ if (!_.isNil(props.implementationGuide)) {
+ resource.implementationGuide = props.implementationGuide;
+ }
+
+ if (!_.isNil(props.rest)) {
+ let src = props.rest;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.rest = [];
+
+ for (let item of src) {
+ let _rest = {};
+
+ if (!_.isNil(item.id)) {
+ _rest.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _rest.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.mode)) {
+ _rest.mode = item.mode;
+ }
+
+ if (!_.isNil(item.documentation)) {
+ _rest.documentation = item.documentation;
+ }
+
+ if (!_.isNil(item.security)) {
+ _rest.security = item.security;
+ }
+
+ if (!_.isNil(item.resource)) {
+ _rest.resource = item.resource;
+ }
+
+ if (!_.isNil(item.interaction)) {
+ _rest.interaction = item.interaction;
+ }
+
+ if (!_.isNil(item.compartment)) {
+ _rest.compartment = item.compartment;
+ }
+
+ resource.rest.push(_rest);
+ }
+ }
+
+ if (!_.isNil(props.messaging)) {
+ let src = props.messaging;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.messaging = [];
+
+ for (let item of src) {
+ let _messaging = {};
+
+ if (!_.isNil(item.id)) {
+ _messaging.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _messaging.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.endpoint)) {
+ _messaging.endpoint = item.endpoint;
+ }
+
+ if (!_.isNil(item.reliableCache)) {
+ _messaging.reliableCache = item.reliableCache;
+ }
+
+ if (!_.isNil(item.documentation)) {
+ _messaging.documentation = item.documentation;
+ }
+
+ if (!_.isNil(item.supportedMessage)) {
+ _messaging.supportedMessage = item.supportedMessage;
+ }
+
+ resource.messaging.push(_messaging);
+ }
+ }
+
+ if (!_.isNil(props.document)) {
+ let src = props.document;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.document = [];
+
+ for (let item of src) {
+ let _document = {};
+
+ if (!_.isNil(item.id)) {
+ _document.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _document.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.mode)) {
+ _document.mode = item.mode;
+ }
+
+ if (!_.isNil(item.documentation)) {
+ _document.documentation = item.documentation;
+ }
+
+ if (!_.isNil(item.profile)) {
+ _document.profile = item.profile;
+ }
+
+ resource.document.push(_document);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/CapabilityStatement"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR CarePlan resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function carePlan(type, props) {
+ const mappings = {
+ "CarePlan": carePlan_CarePlan
+ };
+
+ return mappings[type](props)
+}
+
+function carePlan_CarePlan(props) {
+ const resource = {
+ resourceType: "CarePlan",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = props.instantiatesCanonical;
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.replaces)) {
+ if (!Array.isArray(props.replaces)) { props.replaces = [props.replaces]; }
+ resource.replaces = util.reference(props.replaces);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.intent)) {
+ resource.intent = props.intent;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = util.reference(props.author);
+ }
+
+ if (!_.isNil(props.contributor)) {
+ if (!Array.isArray(props.contributor)) { props.contributor = [props.contributor]; }
+ resource.contributor = util.reference(props.contributor);
+ }
+
+ if (!_.isNil(props.careTeam)) {
+ if (!Array.isArray(props.careTeam)) { props.careTeam = [props.careTeam]; }
+ resource.careTeam = util.reference(props.careTeam);
+ }
+
+ if (!_.isNil(props.addresses)) {
+ if (!Array.isArray(props.addresses)) { props.addresses = [props.addresses]; }
+ resource.addresses = util.reference(props.addresses);
+ }
+
+ if (!_.isNil(props.supportingInfo)) {
+ if (!Array.isArray(props.supportingInfo)) { props.supportingInfo = [props.supportingInfo]; }
+ resource.supportingInfo = util.reference(props.supportingInfo);
+ }
+
+ if (!_.isNil(props.goal)) {
+ if (!Array.isArray(props.goal)) { props.goal = [props.goal]; }
+ resource.goal = util.reference(props.goal);
+ }
+
+ if (!_.isNil(props.activity)) {
+ let src = props.activity;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.activity = [];
+
+ for (let item of src) {
+ let _activity = {};
+
+ if (!_.isNil(item.id)) {
+ _activity.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _activity.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.outcomeCodeableConcept)) {
+ _activity.outcomeCodeableConcept = item.outcomeCodeableConcept;
+ }
+
+ if (!_.isNil(item.outcomeReference)) {
+ _activity.outcomeReference = item.outcomeReference;
+ }
+
+ if (!_.isNil(item.progress)) {
+ _activity.progress = item.progress;
+ }
+
+ if (!_.isNil(item.reference)) {
+ _activity.reference = item.reference;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _activity.detail = item.detail;
+ }
+
+ resource.activity.push(_activity);
+ }
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/CarePlan"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR CareTeam resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function careTeam(type, props) {
+ const mappings = {
+ "CareTeam": careTeam_CareTeam
+ };
+
+ return mappings[type](props)
+}
+
+function careTeam_CareTeam(props) {
+ const resource = {
+ resourceType: "CareTeam",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.participant)) {
+ let src = props.participant;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.participant = [];
+
+ for (let item of src) {
+ let _participant = {};
+
+ if (!_.isNil(item.id)) {
+ _participant.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _participant.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.role)) {
+ _participant.role = item.role;
+ }
+
+ if (!_.isNil(item.member)) {
+ _participant.member = item.member;
+ }
+
+ if (!_.isNil(item.onBehalfOf)) {
+ _participant.onBehalfOf = item.onBehalfOf;
+ }
+
+ if (!_.isNil(item.period)) {
+ _participant.period = item.period;
+ }
+
+ resource.participant.push(_participant);
+ }
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.managingOrganization)) {
+ if (!Array.isArray(props.managingOrganization)) { props.managingOrganization = [props.managingOrganization]; }
+ resource.managingOrganization = util.reference(props.managingOrganization);
+ }
+
+ if (!_.isNil(props.telecom)) {
+ resource.telecom = props.telecom;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/CareTeam"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR CatalogEntry resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function catalogEntry(type, props) {
+ const mappings = {
+ "CatalogEntry": catalogEntry_CatalogEntry
+ };
+
+ return mappings[type](props)
+}
+
+function catalogEntry_CatalogEntry(props) {
+ const resource = {
+ resourceType: "CatalogEntry",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.orderable)) {
+ resource.orderable = props.orderable;
+ }
+
+ if (!_.isNil(props.referencedItem)) {
+ resource.referencedItem = util.reference(props.referencedItem);
+ }
+
+ if (!_.isNil(props.additionalIdentifier)) {
+ if (!Array.isArray(props.additionalIdentifier)) { props.additionalIdentifier = [props.additionalIdentifier]; }
+ resource.additionalIdentifier = util.identifier(props.additionalIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.classification)) {
+ resource.classification = props.classification;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.validityPeriod)) {
+ resource.validityPeriod = props.validityPeriod;
+ }
+
+ if (!_.isNil(props.validTo)) {
+ resource.validTo = props.validTo;
+ }
+
+ if (!_.isNil(props.lastUpdated)) {
+ resource.lastUpdated = props.lastUpdated;
+ }
+
+ if (!_.isNil(props.additionalCharacteristic)) {
+ resource.additionalCharacteristic = props.additionalCharacteristic;
+ }
+
+ if (!_.isNil(props.additionalClassification)) {
+ resource.additionalClassification = props.additionalClassification;
+ }
+
+ if (!_.isNil(props.relatedEntry)) {
+ let src = props.relatedEntry;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.relatedEntry = [];
+
+ for (let item of src) {
+ let _relatedEntry = {};
+
+ if (!_.isNil(item.id)) {
+ _relatedEntry.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _relatedEntry.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.relationtype)) {
+ _relatedEntry.relationtype = item.relationtype;
+ }
+
+ if (!_.isNil(item.item)) {
+ _relatedEntry.item = item.item;
+ }
+
+ resource.relatedEntry.push(_relatedEntry);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/CatalogEntry"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ChargeItem resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function chargeItem(type, props) {
+ const mappings = {
+ "ChargeItem": chargeItem_ChargeItem
+ };
+
+ return mappings[type](props)
+}
+
+function chargeItem_ChargeItem(props) {
+ const resource = {
+ resourceType: "ChargeItem",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.definitionUri)) {
+ resource.definitionUri = props.definitionUri;
+ }
+
+ if (!_.isNil(props.definitionCanonical)) {
+ resource.definitionCanonical = props.definitionCanonical;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.context)) {
+ resource.context = util.reference(props.context);
+ }
+
+ if (!_.isNil(props.occurrence)) {
+ util.composite(resource, "occurrence", props.occurrence);
+ }
+
+ if (!_.isNil(props.performer)) {
+ let src = props.performer;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.performer = [];
+
+ for (let item of src) {
+ let _performer = {};
+
+ if (!_.isNil(item.id)) {
+ _performer.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _performer.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.function)) {
+ _performer.function = item.function;
+ }
+
+ if (!_.isNil(item.actor)) {
+ _performer.actor = item.actor;
+ }
+
+ resource.performer.push(_performer);
+ }
+ }
+
+ if (!_.isNil(props.performingOrganization)) {
+ resource.performingOrganization = util.reference(props.performingOrganization);
+ }
+
+ if (!_.isNil(props.requestingOrganization)) {
+ resource.requestingOrganization = util.reference(props.requestingOrganization);
+ }
+
+ if (!_.isNil(props.costCenter)) {
+ resource.costCenter = util.reference(props.costCenter);
+ }
+
+ if (!_.isNil(props.quantity)) {
+ resource.quantity = props.quantity;
+ }
+
+ if (!_.isNil(props.bodysite)) {
+ resource.bodysite = props.bodysite;
+ }
+
+ if (!_.isNil(props.factorOverride)) {
+ resource.factorOverride = props.factorOverride;
+ }
+
+ if (!_.isNil(props.priceOverride)) {
+ resource.priceOverride = props.priceOverride;
+ }
+
+ if (!_.isNil(props.overrideReason)) {
+ resource.overrideReason = props.overrideReason;
+ }
+
+ if (!_.isNil(props.enterer)) {
+ resource.enterer = util.reference(props.enterer);
+ }
+
+ if (!_.isNil(props.enteredDate)) {
+ resource.enteredDate = props.enteredDate;
+ }
+
+ if (!_.isNil(props.reason)) {
+ resource.reason = props.reason;
+ }
+
+ if (!_.isNil(props.service)) {
+ if (!Array.isArray(props.service)) { props.service = [props.service]; }
+ resource.service = util.reference(props.service);
+ }
+
+ if (!_.isNil(props.product)) {
+ util.composite(resource, "product", props.product);
+ }
+
+ if (!_.isNil(props.account)) {
+ if (!Array.isArray(props.account)) { props.account = [props.account]; }
+ resource.account = util.reference(props.account);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.supportingInformation)) {
+ if (!Array.isArray(props.supportingInformation)) { props.supportingInformation = [props.supportingInformation]; }
+ resource.supportingInformation = util.reference(props.supportingInformation);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ChargeItem"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ChargeItemDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function chargeItemDefinition(type, props) {
+ const mappings = {
+ "ChargeItemDefinition": chargeItemDefinition_ChargeItemDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function chargeItemDefinition_ChargeItemDefinition(props) {
+ const resource = {
+ resourceType: "ChargeItemDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.derivedFromUri)) {
+ resource.derivedFromUri = props.derivedFromUri;
+ }
+
+ if (!_.isNil(props.partOf)) {
+ resource.partOf = props.partOf;
+ }
+
+ if (!_.isNil(props.replaces)) {
+ resource.replaces = props.replaces;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.instance)) {
+ if (!Array.isArray(props.instance)) { props.instance = [props.instance]; }
+ resource.instance = util.reference(props.instance);
+ }
+
+ if (!_.isNil(props.applicability)) {
+ let src = props.applicability;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.applicability = [];
+
+ for (let item of src) {
+ let _applicability = {};
+
+ if (!_.isNil(item.id)) {
+ _applicability.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _applicability.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _applicability.description = item.description;
+ }
+
+ if (!_.isNil(item.language)) {
+ _applicability.language = item.language;
+ }
+
+ if (!_.isNil(item.expression)) {
+ _applicability.expression = item.expression;
+ }
+
+ resource.applicability.push(_applicability);
+ }
+ }
+
+ if (!_.isNil(props.propertyGroup)) {
+ let src = props.propertyGroup;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.propertyGroup = [];
+
+ for (let item of src) {
+ let _propertyGroup = {};
+
+ if (!_.isNil(item.id)) {
+ _propertyGroup.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _propertyGroup.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.priceComponent)) {
+ _propertyGroup.priceComponent = item.priceComponent;
+ }
+
+ resource.propertyGroup.push(_propertyGroup);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ChargeItemDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Citation resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function citation(type, props) {
+ const mappings = {
+ "Citation": citation_Citation
+ };
+
+ return mappings[type](props)
+}
+
+function citation_Citation(props) {
+ const resource = {
+ resourceType: "Citation",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.summary)) {
+ let src = props.summary;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.summary = [];
+
+ for (let item of src) {
+ let _summary = {};
+
+ if (!_.isNil(item.id)) {
+ _summary.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _summary.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.style)) {
+ _summary.style = item.style;
+ }
+
+ if (!_.isNil(item.text)) {
+ _summary.text = item.text;
+ }
+
+ resource.summary.push(_summary);
+ }
+ }
+
+ if (!_.isNil(props.classification)) {
+ let src = props.classification;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.classification = [];
+
+ for (let item of src) {
+ let _classification = {};
+
+ if (!_.isNil(item.id)) {
+ _classification.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _classification.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _classification.type = item.type;
+ }
+
+ if (!_.isNil(item.classifier)) {
+ _classification.classifier = item.classifier;
+ }
+
+ resource.classification.push(_classification);
+ }
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.currentState)) {
+ resource.currentState = props.currentState;
+ }
+
+ if (!_.isNil(props.statusDate)) {
+ let src = props.statusDate;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.statusDate = [];
+
+ for (let item of src) {
+ let _statusDate = {};
+
+ if (!_.isNil(item.id)) {
+ _statusDate.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _statusDate.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.activity)) {
+ _statusDate.activity = item.activity;
+ }
+
+ if (!_.isNil(item.actual)) {
+ _statusDate.actual = item.actual;
+ }
+
+ if (!_.isNil(item.period)) {
+ _statusDate.period = item.period;
+ }
+
+ resource.statusDate.push(_statusDate);
+ }
+ }
+
+ if (!_.isNil(props.relatesTo)) {
+ let src = props.relatesTo;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.relatesTo = [];
+
+ for (let item of src) {
+ let _relatesTo = {};
+
+ if (!_.isNil(item.id)) {
+ _relatesTo.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _relatesTo.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.relationshipType)) {
+ _relatesTo.relationshipType = item.relationshipType;
+ }
+
+ if (!_.isNil(item.targetClassifier)) {
+ _relatesTo.targetClassifier = item.targetClassifier;
+ }
+
+ if (!_.isNil(item.target)) {
+ _relatesTo.target = item.target;
+ }
+
+ resource.relatesTo.push(_relatesTo);
+ }
+ }
+
+ if (!_.isNil(props.citedArtifact)) {
+ let src = props.citedArtifact;
+ let _citedArtifact = {};
+
+ if (!_.isNil(src.id)) {
+ _citedArtifact.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _citedArtifact.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.identifier)) {
+ _citedArtifact.identifier = src.identifier;
+ }
+
+ if (!_.isNil(src.relatedIdentifier)) {
+ _citedArtifact.relatedIdentifier = src.relatedIdentifier;
+ }
+
+ if (!_.isNil(src.dateAccessed)) {
+ _citedArtifact.dateAccessed = src.dateAccessed;
+ }
+
+ if (!_.isNil(src.version)) {
+ _citedArtifact.version = src.version;
+ }
+
+ if (!_.isNil(src.currentState)) {
+ _citedArtifact.currentState = src.currentState;
+ }
+
+ if (!_.isNil(src.statusDate)) {
+ _citedArtifact.statusDate = src.statusDate;
+ }
+
+ if (!_.isNil(src.title)) {
+ _citedArtifact.title = src.title;
+ }
+
+ if (!_.isNil(src.abstract)) {
+ _citedArtifact.abstract = src.abstract;
+ }
+
+ if (!_.isNil(src.part)) {
+ _citedArtifact.part = src.part;
+ }
+
+ if (!_.isNil(src.relatesTo)) {
+ _citedArtifact.relatesTo = src.relatesTo;
+ }
+
+ if (!_.isNil(src.publicationForm)) {
+ _citedArtifact.publicationForm = src.publicationForm;
+ }
+
+ if (!_.isNil(src.webLocation)) {
+ _citedArtifact.webLocation = src.webLocation;
+ }
+
+ if (!_.isNil(src.classification)) {
+ _citedArtifact.classification = src.classification;
+ }
+
+ if (!_.isNil(src.contributorship)) {
+ _citedArtifact.contributorship = src.contributorship;
+ }
+
+ if (!_.isNil(src.note)) {
+ _citedArtifact.note = src.note;
+ }
+
+ resource.citedArtifact = _citedArtifact;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Citation"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Claim resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function claim(type, props) {
+ const mappings = {
+ "Claim": claim_Claim
+ };
+
+ return mappings[type](props)
+}
+
+function claim_Claim(props) {
+ const resource = {
+ resourceType: "Claim",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.subType)) {
+ resource.subType = props.subType;
+ }
+
+ if (!_.isNil(props.use)) {
+ resource.use = props.use;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.billablePeriod)) {
+ resource.billablePeriod = props.billablePeriod;
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.enterer)) {
+ resource.enterer = util.reference(props.enterer);
+ }
+
+ if (!_.isNil(props.insurer)) {
+ resource.insurer = util.reference(props.insurer);
+ }
+
+ if (!_.isNil(props.provider)) {
+ resource.provider = util.reference(props.provider);
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.fundsReserve)) {
+ resource.fundsReserve = props.fundsReserve;
+ }
+
+ if (!_.isNil(props.related)) {
+ let src = props.related;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.related = [];
+
+ for (let item of src) {
+ let _related = {};
+
+ if (!_.isNil(item.id)) {
+ _related.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _related.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.claim)) {
+ _related.claim = item.claim;
+ }
+
+ if (!_.isNil(item.relationship)) {
+ _related.relationship = item.relationship;
+ }
+
+ if (!_.isNil(item.reference)) {
+ _related.reference = item.reference;
+ }
+
+ resource.related.push(_related);
+ }
+ }
+
+ if (!_.isNil(props.prescription)) {
+ resource.prescription = util.reference(props.prescription);
+ }
+
+ if (!_.isNil(props.originalPrescription)) {
+ resource.originalPrescription = util.reference(props.originalPrescription);
+ }
+
+ if (!_.isNil(props.payee)) {
+ let src = props.payee;
+ let _payee = {};
+
+ if (!_.isNil(src.id)) {
+ _payee.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _payee.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.type)) {
+ _payee.type = src.type;
+ }
+
+ if (!_.isNil(src.party)) {
+ _payee.party = src.party;
+ }
+
+ resource.payee = _payee;
+ }
+
+ if (!_.isNil(props.referral)) {
+ resource.referral = util.reference(props.referral);
+ }
+
+ if (!_.isNil(props.facility)) {
+ resource.facility = util.reference(props.facility);
+ }
+
+ if (!_.isNil(props.careTeam)) {
+ let src = props.careTeam;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.careTeam = [];
+
+ for (let item of src) {
+ let _careTeam = {};
+
+ if (!_.isNil(item.id)) {
+ _careTeam.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _careTeam.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _careTeam.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.provider)) {
+ _careTeam.provider = item.provider;
+ }
+
+ if (!_.isNil(item.responsible)) {
+ _careTeam.responsible = item.responsible;
+ }
+
+ if (!_.isNil(item.role)) {
+ _careTeam.role = item.role;
+ }
+
+ if (!_.isNil(item.qualification)) {
+ _careTeam.qualification = item.qualification;
+ }
+
+ resource.careTeam.push(_careTeam);
+ }
+ }
+
+ if (!_.isNil(props.supportingInfo)) {
+ let src = props.supportingInfo;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.supportingInfo = [];
+
+ for (let item of src) {
+ let _supportingInfo = {};
+
+ if (!_.isNil(item.id)) {
+ _supportingInfo.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _supportingInfo.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _supportingInfo.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.category)) {
+ _supportingInfo.category = item.category;
+ }
+
+ if (!_.isNil(item.code)) {
+ _supportingInfo.code = item.code;
+ }
+
+ if (!_.isNil(item.timing)) {
+ _supportingInfo.timing = item.timing;
+ }
+
+ if (!_.isNil(item.value)) {
+ _supportingInfo.value = item.value;
+ }
+
+ if (!_.isNil(item.reason)) {
+ _supportingInfo.reason = item.reason;
+ }
+
+ resource.supportingInfo.push(_supportingInfo);
+ }
+ }
+
+ if (!_.isNil(props.diagnosis)) {
+ let src = props.diagnosis;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.diagnosis = [];
+
+ for (let item of src) {
+ let _diagnosis = {};
+
+ if (!_.isNil(item.id)) {
+ _diagnosis.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _diagnosis.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _diagnosis.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.diagnosis)) {
+ _diagnosis.diagnosis = item.diagnosis;
+ }
+
+ if (!_.isNil(item.type)) {
+ _diagnosis.type = item.type;
+ }
+
+ if (!_.isNil(item.onAdmission)) {
+ _diagnosis.onAdmission = item.onAdmission;
+ }
+
+ if (!_.isNil(item.packageCode)) {
+ _diagnosis.packageCode = item.packageCode;
+ }
+
+ resource.diagnosis.push(_diagnosis);
+ }
+ }
+
+ if (!_.isNil(props.procedure)) {
+ let src = props.procedure;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.procedure = [];
+
+ for (let item of src) {
+ let _procedure = {};
+
+ if (!_.isNil(item.id)) {
+ _procedure.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _procedure.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _procedure.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.type)) {
+ _procedure.type = item.type;
+ }
+
+ if (!_.isNil(item.date)) {
+ _procedure.date = item.date;
+ }
+
+ if (!_.isNil(item.procedure)) {
+ _procedure.procedure = item.procedure;
+ }
+
+ if (!_.isNil(item.udi)) {
+ _procedure.udi = item.udi;
+ }
+
+ resource.procedure.push(_procedure);
+ }
+ }
+
+ if (!_.isNil(props.insurance)) {
+ let src = props.insurance;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.insurance = [];
+
+ for (let item of src) {
+ let _insurance = {};
+
+ if (!_.isNil(item.id)) {
+ _insurance.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _insurance.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _insurance.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.focal)) {
+ _insurance.focal = item.focal;
+ }
+
+ if (!_.isNil(item.identifier)) {
+ _insurance.identifier = item.identifier;
+ }
+
+ if (!_.isNil(item.coverage)) {
+ _insurance.coverage = item.coverage;
+ }
+
+ if (!_.isNil(item.businessArrangement)) {
+ _insurance.businessArrangement = item.businessArrangement;
+ }
+
+ if (!_.isNil(item.preAuthRef)) {
+ _insurance.preAuthRef = item.preAuthRef;
+ }
+
+ if (!_.isNil(item.claimResponse)) {
+ _insurance.claimResponse = item.claimResponse;
+ }
+
+ resource.insurance.push(_insurance);
+ }
+ }
+
+ if (!_.isNil(props.accident)) {
+ let src = props.accident;
+ let _accident = {};
+
+ if (!_.isNil(src.id)) {
+ _accident.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _accident.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.date)) {
+ _accident.date = src.date;
+ }
+
+ if (!_.isNil(src.type)) {
+ _accident.type = src.type;
+ }
+
+ if (!_.isNil(src.location)) {
+ _accident.location = src.location;
+ }
+
+ resource.accident = _accident;
+ }
+
+ if (!_.isNil(props.item)) {
+ let src = props.item;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.item = [];
+
+ for (let item of src) {
+ let _item = {};
+
+ if (!_.isNil(item.id)) {
+ _item.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _item.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _item.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.careTeamSequence)) {
+ _item.careTeamSequence = item.careTeamSequence;
+ }
+
+ if (!_.isNil(item.diagnosisSequence)) {
+ _item.diagnosisSequence = item.diagnosisSequence;
+ }
+
+ if (!_.isNil(item.procedureSequence)) {
+ _item.procedureSequence = item.procedureSequence;
+ }
+
+ if (!_.isNil(item.informationSequence)) {
+ _item.informationSequence = item.informationSequence;
+ }
+
+ if (!_.isNil(item.revenue)) {
+ _item.revenue = item.revenue;
+ }
+
+ if (!_.isNil(item.category)) {
+ _item.category = item.category;
+ }
+
+ if (!_.isNil(item.productOrService)) {
+ _item.productOrService = item.productOrService;
+ }
+
+ if (!_.isNil(item.modifier)) {
+ _item.modifier = item.modifier;
+ }
+
+ if (!_.isNil(item.programCode)) {
+ _item.programCode = item.programCode;
+ }
+
+ if (!_.isNil(item.serviced)) {
+ _item.serviced = item.serviced;
+ }
+
+ if (!_.isNil(item.location)) {
+ _item.location = item.location;
+ }
+
+ if (!_.isNil(item.quantity)) {
+ _item.quantity = item.quantity;
+ }
+
+ if (!_.isNil(item.unitPrice)) {
+ _item.unitPrice = item.unitPrice;
+ }
+
+ if (!_.isNil(item.factor)) {
+ _item.factor = item.factor;
+ }
+
+ if (!_.isNil(item.net)) {
+ _item.net = item.net;
+ }
+
+ if (!_.isNil(item.udi)) {
+ _item.udi = item.udi;
+ }
+
+ if (!_.isNil(item.bodySite)) {
+ _item.bodySite = item.bodySite;
+ }
+
+ if (!_.isNil(item.subSite)) {
+ _item.subSite = item.subSite;
+ }
+
+ if (!_.isNil(item.encounter)) {
+ _item.encounter = item.encounter;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _item.detail = item.detail;
+ }
+
+ resource.item.push(_item);
+ }
+ }
+
+ if (!_.isNil(props.total)) {
+ resource.total = props.total;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Claim"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ClaimResponse resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function claimResponse(type, props) {
+ const mappings = {
+ "ClaimResponse": claimResponse_ClaimResponse
+ };
+
+ return mappings[type](props)
+}
+
+function claimResponse_ClaimResponse(props) {
+ const resource = {
+ resourceType: "ClaimResponse",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.subType)) {
+ resource.subType = props.subType;
+ }
+
+ if (!_.isNil(props.use)) {
+ resource.use = props.use;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.insurer)) {
+ resource.insurer = util.reference(props.insurer);
+ }
+
+ if (!_.isNil(props.requestor)) {
+ resource.requestor = util.reference(props.requestor);
+ }
+
+ if (!_.isNil(props.request)) {
+ resource.request = util.reference(props.request);
+ }
+
+ if (!_.isNil(props.outcome)) {
+ resource.outcome = props.outcome;
+ }
+
+ if (!_.isNil(props.disposition)) {
+ resource.disposition = props.disposition;
+ }
+
+ if (!_.isNil(props.preAuthRef)) {
+ resource.preAuthRef = props.preAuthRef;
+ }
+
+ if (!_.isNil(props.preAuthPeriod)) {
+ resource.preAuthPeriod = props.preAuthPeriod;
+ }
+
+ if (!_.isNil(props.payeeType)) {
+ resource.payeeType = props.payeeType;
+ }
+
+ if (!_.isNil(props.item)) {
+ let src = props.item;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.item = [];
+
+ for (let item of src) {
+ let _item = {};
+
+ if (!_.isNil(item.id)) {
+ _item.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _item.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.itemSequence)) {
+ _item.itemSequence = item.itemSequence;
+ }
+
+ if (!_.isNil(item.noteNumber)) {
+ _item.noteNumber = item.noteNumber;
+ }
+
+ if (!_.isNil(item.adjudication)) {
+ _item.adjudication = item.adjudication;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _item.detail = item.detail;
+ }
+
+ resource.item.push(_item);
+ }
+ }
+
+ if (!_.isNil(props.addItem)) {
+ let src = props.addItem;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.addItem = [];
+
+ for (let item of src) {
+ let _addItem = {};
+
+ if (!_.isNil(item.id)) {
+ _addItem.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _addItem.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.itemSequence)) {
+ _addItem.itemSequence = item.itemSequence;
+ }
+
+ if (!_.isNil(item.detailSequence)) {
+ _addItem.detailSequence = item.detailSequence;
+ }
+
+ if (!_.isNil(item.subdetailSequence)) {
+ _addItem.subdetailSequence = item.subdetailSequence;
+ }
+
+ if (!_.isNil(item.provider)) {
+ _addItem.provider = item.provider;
+ }
+
+ if (!_.isNil(item.productOrService)) {
+ _addItem.productOrService = item.productOrService;
+ }
+
+ if (!_.isNil(item.modifier)) {
+ _addItem.modifier = item.modifier;
+ }
+
+ if (!_.isNil(item.programCode)) {
+ _addItem.programCode = item.programCode;
+ }
+
+ if (!_.isNil(item.serviced)) {
+ _addItem.serviced = item.serviced;
+ }
+
+ if (!_.isNil(item.location)) {
+ _addItem.location = item.location;
+ }
+
+ if (!_.isNil(item.quantity)) {
+ _addItem.quantity = item.quantity;
+ }
+
+ if (!_.isNil(item.unitPrice)) {
+ _addItem.unitPrice = item.unitPrice;
+ }
+
+ if (!_.isNil(item.factor)) {
+ _addItem.factor = item.factor;
+ }
+
+ if (!_.isNil(item.net)) {
+ _addItem.net = item.net;
+ }
+
+ if (!_.isNil(item.bodySite)) {
+ _addItem.bodySite = item.bodySite;
+ }
+
+ if (!_.isNil(item.subSite)) {
+ _addItem.subSite = item.subSite;
+ }
+
+ if (!_.isNil(item.noteNumber)) {
+ _addItem.noteNumber = item.noteNumber;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _addItem.detail = item.detail;
+ }
+
+ resource.addItem.push(_addItem);
+ }
+ }
+
+ if (!_.isNil(props.adjudication)) {
+ resource.adjudication = props.adjudication;
+ }
+
+ if (!_.isNil(props.total)) {
+ let src = props.total;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.total = [];
+
+ for (let item of src) {
+ let _total = {};
+
+ if (!_.isNil(item.id)) {
+ _total.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _total.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.category)) {
+ _total.category = item.category;
+ }
+
+ if (!_.isNil(item.amount)) {
+ _total.amount = item.amount;
+ }
+
+ resource.total.push(_total);
+ }
+ }
+
+ if (!_.isNil(props.payment)) {
+ let src = props.payment;
+ let _payment = {};
+
+ if (!_.isNil(src.id)) {
+ _payment.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _payment.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.type)) {
+ _payment.type = src.type;
+ }
+
+ if (!_.isNil(src.adjustment)) {
+ _payment.adjustment = src.adjustment;
+ }
+
+ if (!_.isNil(src.adjustmentReason)) {
+ _payment.adjustmentReason = src.adjustmentReason;
+ }
+
+ if (!_.isNil(src.date)) {
+ _payment.date = src.date;
+ }
+
+ if (!_.isNil(src.amount)) {
+ _payment.amount = src.amount;
+ }
+
+ if (!_.isNil(src.identifier)) {
+ _payment.identifier = src.identifier;
+ }
+
+ resource.payment = _payment;
+ }
+
+ if (!_.isNil(props.fundsReserve)) {
+ resource.fundsReserve = props.fundsReserve;
+ }
+
+ if (!_.isNil(props.formCode)) {
+ resource.formCode = props.formCode;
+ }
+
+ if (!_.isNil(props.form)) {
+ resource.form = props.form;
+ }
+
+ if (!_.isNil(props.processNote)) {
+ let src = props.processNote;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.processNote = [];
+
+ for (let item of src) {
+ let _processNote = {};
+
+ if (!_.isNil(item.id)) {
+ _processNote.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _processNote.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.number)) {
+ _processNote.number = item.number;
+ }
+
+ if (!_.isNil(item.type)) {
+ _processNote.type = item.type;
+ }
+
+ if (!_.isNil(item.text)) {
+ _processNote.text = item.text;
+ }
+
+ if (!_.isNil(item.language)) {
+ _processNote.language = item.language;
+ }
+
+ resource.processNote.push(_processNote);
+ }
+ }
+
+ if (!_.isNil(props.communicationRequest)) {
+ if (!Array.isArray(props.communicationRequest)) { props.communicationRequest = [props.communicationRequest]; }
+ resource.communicationRequest = util.reference(props.communicationRequest);
+ }
+
+ if (!_.isNil(props.insurance)) {
+ let src = props.insurance;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.insurance = [];
+
+ for (let item of src) {
+ let _insurance = {};
+
+ if (!_.isNil(item.id)) {
+ _insurance.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _insurance.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _insurance.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.focal)) {
+ _insurance.focal = item.focal;
+ }
+
+ if (!_.isNil(item.coverage)) {
+ _insurance.coverage = item.coverage;
+ }
+
+ if (!_.isNil(item.businessArrangement)) {
+ _insurance.businessArrangement = item.businessArrangement;
+ }
+
+ if (!_.isNil(item.claimResponse)) {
+ _insurance.claimResponse = item.claimResponse;
+ }
+
+ resource.insurance.push(_insurance);
+ }
+ }
+
+ if (!_.isNil(props.error)) {
+ let src = props.error;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.error = [];
+
+ for (let item of src) {
+ let _error = {};
+
+ if (!_.isNil(item.id)) {
+ _error.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _error.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.itemSequence)) {
+ _error.itemSequence = item.itemSequence;
+ }
+
+ if (!_.isNil(item.detailSequence)) {
+ _error.detailSequence = item.detailSequence;
+ }
+
+ if (!_.isNil(item.subDetailSequence)) {
+ _error.subDetailSequence = item.subDetailSequence;
+ }
+
+ if (!_.isNil(item.code)) {
+ _error.code = item.code;
+ }
+
+ resource.error.push(_error);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ClaimResponse"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ClinicalImpression resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function clinicalImpression(type, props) {
+ const mappings = {
+ "ClinicalImpression": clinicalImpression_ClinicalImpression
+ };
+
+ return mappings[type](props)
+}
+
+function clinicalImpression_ClinicalImpression(props) {
+ const resource = {
+ resourceType: "ClinicalImpression",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.effective)) {
+ util.composite(resource, "effective", props.effective);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.assessor)) {
+ resource.assessor = util.reference(props.assessor);
+ }
+
+ if (!_.isNil(props.previous)) {
+ resource.previous = util.reference(props.previous);
+ }
+
+ if (!_.isNil(props.problem)) {
+ if (!Array.isArray(props.problem)) { props.problem = [props.problem]; }
+ resource.problem = util.reference(props.problem);
+ }
+
+ if (!_.isNil(props.investigation)) {
+ let src = props.investigation;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.investigation = [];
+
+ for (let item of src) {
+ let _investigation = {};
+
+ if (!_.isNil(item.id)) {
+ _investigation.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _investigation.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _investigation.code = item.code;
+ }
+
+ if (!_.isNil(item.item)) {
+ _investigation.item = item.item;
+ }
+
+ resource.investigation.push(_investigation);
+ }
+ }
+
+ if (!_.isNil(props.protocol)) {
+ resource.protocol = props.protocol;
+ }
+
+ if (!_.isNil(props.summary)) {
+ resource.summary = props.summary;
+ }
+
+ if (!_.isNil(props.finding)) {
+ let src = props.finding;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.finding = [];
+
+ for (let item of src) {
+ let _finding = {};
+
+ if (!_.isNil(item.id)) {
+ _finding.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _finding.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.itemCodeableConcept)) {
+ _finding.itemCodeableConcept = item.itemCodeableConcept;
+ }
+
+ if (!_.isNil(item.itemReference)) {
+ _finding.itemReference = item.itemReference;
+ }
+
+ if (!_.isNil(item.basis)) {
+ _finding.basis = item.basis;
+ }
+
+ resource.finding.push(_finding);
+ }
+ }
+
+ if (!_.isNil(props.prognosisCodeableConcept)) {
+ resource.prognosisCodeableConcept = props.prognosisCodeableConcept;
+ }
+
+ if (!_.isNil(props.prognosisReference)) {
+ if (!Array.isArray(props.prognosisReference)) { props.prognosisReference = [props.prognosisReference]; }
+ resource.prognosisReference = util.reference(props.prognosisReference);
+ }
+
+ if (!_.isNil(props.supportingInfo)) {
+ if (!Array.isArray(props.supportingInfo)) { props.supportingInfo = [props.supportingInfo]; }
+ resource.supportingInfo = util.reference(props.supportingInfo);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ClinicalImpression"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ClinicalUseDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function clinicalUseDefinition(type, props) {
+ const mappings = {
+ "ClinicalUseDefinition": clinicalUseDefinition_ClinicalUseDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function clinicalUseDefinition_ClinicalUseDefinition(props) {
+ const resource = {
+ resourceType: "ClinicalUseDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.subject)) {
+ if (!Array.isArray(props.subject)) { props.subject = [props.subject]; }
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.contraindication)) {
+ let src = props.contraindication;
+ let _contraindication = {};
+
+ if (!_.isNil(src.id)) {
+ _contraindication.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _contraindication.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.diseaseSymptomProcedure)) {
+ _contraindication.diseaseSymptomProcedure = src.diseaseSymptomProcedure;
+ }
+
+ if (!_.isNil(src.diseaseStatus)) {
+ _contraindication.diseaseStatus = src.diseaseStatus;
+ }
+
+ if (!_.isNil(src.comorbidity)) {
+ _contraindication.comorbidity = src.comorbidity;
+ }
+
+ if (!_.isNil(src.indication)) {
+ _contraindication.indication = src.indication;
+ }
+
+ if (!_.isNil(src.otherTherapy)) {
+ _contraindication.otherTherapy = src.otherTherapy;
+ }
+
+ resource.contraindication = _contraindication;
+ }
+
+ if (!_.isNil(props.indication)) {
+ let src = props.indication;
+ let _indication = {};
+
+ if (!_.isNil(src.id)) {
+ _indication.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _indication.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.diseaseSymptomProcedure)) {
+ _indication.diseaseSymptomProcedure = src.diseaseSymptomProcedure;
+ }
+
+ if (!_.isNil(src.diseaseStatus)) {
+ _indication.diseaseStatus = src.diseaseStatus;
+ }
+
+ if (!_.isNil(src.comorbidity)) {
+ _indication.comorbidity = src.comorbidity;
+ }
+
+ if (!_.isNil(src.intendedEffect)) {
+ _indication.intendedEffect = src.intendedEffect;
+ }
+
+ if (!_.isNil(src.duration)) {
+ _indication.duration = src.duration;
+ }
+
+ if (!_.isNil(src.undesirableEffect)) {
+ _indication.undesirableEffect = src.undesirableEffect;
+ }
+
+ resource.indication = _indication;
+ }
+
+ if (!_.isNil(props.interaction)) {
+ let src = props.interaction;
+ let _interaction = {};
+
+ if (!_.isNil(src.id)) {
+ _interaction.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _interaction.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.interactant)) {
+ _interaction.interactant = src.interactant;
+ }
+
+ if (!_.isNil(src.type)) {
+ _interaction.type = src.type;
+ }
+
+ if (!_.isNil(src.effect)) {
+ _interaction.effect = src.effect;
+ }
+
+ if (!_.isNil(src.incidence)) {
+ _interaction.incidence = src.incidence;
+ }
+
+ if (!_.isNil(src.management)) {
+ _interaction.management = src.management;
+ }
+
+ resource.interaction = _interaction;
+ }
+
+ if (!_.isNil(props.population)) {
+ if (!Array.isArray(props.population)) { props.population = [props.population]; }
+ resource.population = util.reference(props.population);
+ }
+
+ if (!_.isNil(props.undesirableEffect)) {
+ let src = props.undesirableEffect;
+ let _undesirableEffect = {};
+
+ if (!_.isNil(src.id)) {
+ _undesirableEffect.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _undesirableEffect.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.symptomConditionEffect)) {
+ _undesirableEffect.symptomConditionEffect = src.symptomConditionEffect;
+ }
+
+ if (!_.isNil(src.classification)) {
+ _undesirableEffect.classification = src.classification;
+ }
+
+ if (!_.isNil(src.frequencyOfOccurrence)) {
+ _undesirableEffect.frequencyOfOccurrence = src.frequencyOfOccurrence;
+ }
+
+ resource.undesirableEffect = _undesirableEffect;
+ }
+
+ if (!_.isNil(props.warning)) {
+ let src = props.warning;
+ let _warning = {};
+
+ if (!_.isNil(src.id)) {
+ _warning.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _warning.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.description)) {
+ _warning.description = src.description;
+ }
+
+ if (!_.isNil(src.code)) {
+ _warning.code = src.code;
+ }
+
+ resource.warning = _warning;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ClinicalUseDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR CodeSystem resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function codeSystem(type, props) {
+ const mappings = {
+ "CodeSystem": codeSystem_CodeSystem
+ };
+
+ return mappings[type](props)
+}
+
+function codeSystem_CodeSystem(props) {
+ const resource = {
+ resourceType: "CodeSystem",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.caseSensitive)) {
+ resource.caseSensitive = props.caseSensitive;
+ }
+
+ if (!_.isNil(props.valueSet)) {
+ resource.valueSet = props.valueSet;
+ }
+
+ if (!_.isNil(props.hierarchyMeaning)) {
+ resource.hierarchyMeaning = props.hierarchyMeaning;
+ }
+
+ if (!_.isNil(props.compositional)) {
+ resource.compositional = props.compositional;
+ }
+
+ if (!_.isNil(props.versionNeeded)) {
+ resource.versionNeeded = props.versionNeeded;
+ }
+
+ if (!_.isNil(props.content)) {
+ resource.content = props.content;
+ }
+
+ if (!_.isNil(props.supplements)) {
+ resource.supplements = props.supplements;
+ }
+
+ if (!_.isNil(props.count)) {
+ resource.count = props.count;
+ }
+
+ if (!_.isNil(props.filter)) {
+ let src = props.filter;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.filter = [];
+
+ for (let item of src) {
+ let _filter = {};
+
+ if (!_.isNil(item.id)) {
+ _filter.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _filter.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _filter.code = item.code;
+ }
+
+ if (!_.isNil(item.description)) {
+ _filter.description = item.description;
+ }
+
+ if (!_.isNil(item.operator)) {
+ _filter.operator = item.operator;
+ }
+
+ if (!_.isNil(item.value)) {
+ _filter.value = item.value;
+ }
+
+ resource.filter.push(_filter);
+ }
+ }
+
+ if (!_.isNil(props.property)) {
+ let src = props.property;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.property = [];
+
+ for (let item of src) {
+ let _property = {};
+
+ if (!_.isNil(item.id)) {
+ _property.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _property.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _property.code = item.code;
+ }
+
+ if (!_.isNil(item.uri)) {
+ _property.uri = item.uri;
+ }
+
+ if (!_.isNil(item.description)) {
+ _property.description = item.description;
+ }
+
+ if (!_.isNil(item.type)) {
+ _property.type = item.type;
+ }
+
+ resource.property.push(_property);
+ }
+ }
+
+ if (!_.isNil(props.concept)) {
+ let src = props.concept;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.concept = [];
+
+ for (let item of src) {
+ let _concept = {};
+
+ if (!_.isNil(item.id)) {
+ _concept.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _concept.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _concept.code = item.code;
+ }
+
+ if (!_.isNil(item.display)) {
+ _concept.display = item.display;
+ }
+
+ if (!_.isNil(item.definition)) {
+ _concept.definition = item.definition;
+ }
+
+ if (!_.isNil(item.designation)) {
+ _concept.designation = item.designation;
+ }
+
+ if (!_.isNil(item.property)) {
+ _concept.property = item.property;
+ }
+
+ resource.concept.push(_concept);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/CodeSystem"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Communication resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function communication(type, props) {
+ const mappings = {
+ "Communication": communication_Communication
+ };
+
+ return mappings[type](props)
+}
+
+function communication_Communication(props) {
+ const resource = {
+ resourceType: "Communication",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = props.instantiatesCanonical;
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.inResponseTo)) {
+ if (!Array.isArray(props.inResponseTo)) { props.inResponseTo = [props.inResponseTo]; }
+ resource.inResponseTo = util.reference(props.inResponseTo);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.medium)) {
+ resource.medium = props.medium;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.topic)) {
+ resource.topic = props.topic;
+ }
+
+ if (!_.isNil(props.about)) {
+ if (!Array.isArray(props.about)) { props.about = [props.about]; }
+ resource.about = util.reference(props.about);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.sent)) {
+ resource.sent = props.sent;
+ }
+
+ if (!_.isNil(props.received)) {
+ resource.received = props.received;
+ }
+
+ if (!_.isNil(props.recipient)) {
+ if (!Array.isArray(props.recipient)) { props.recipient = [props.recipient]; }
+ resource.recipient = util.reference(props.recipient);
+ }
+
+ if (!_.isNil(props.sender)) {
+ resource.sender = util.reference(props.sender);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.payload)) {
+ let src = props.payload;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.payload = [];
+
+ for (let item of src) {
+ let _payload = {};
+
+ if (!_.isNil(item.id)) {
+ _payload.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _payload.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.content)) {
+ _payload.content = item.content;
+ }
+
+ resource.payload.push(_payload);
+ }
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Communication"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR CommunicationRequest resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function communicationRequest(type, props) {
+ const mappings = {
+ "CommunicationRequest": communicationRequest_CommunicationRequest
+ };
+
+ return mappings[type](props)
+}
+
+function communicationRequest_CommunicationRequest(props) {
+ const resource = {
+ resourceType: "CommunicationRequest",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.replaces)) {
+ if (!Array.isArray(props.replaces)) { props.replaces = [props.replaces]; }
+ resource.replaces = util.reference(props.replaces);
+ }
+
+ if (!_.isNil(props.groupIdentifier)) {
+ resource.groupIdentifier = util.identifier(props.groupIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.doNotPerform)) {
+ resource.doNotPerform = props.doNotPerform;
+ }
+
+ if (!_.isNil(props.medium)) {
+ resource.medium = props.medium;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.about)) {
+ if (!Array.isArray(props.about)) { props.about = [props.about]; }
+ resource.about = util.reference(props.about);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.payload)) {
+ let src = props.payload;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.payload = [];
+
+ for (let item of src) {
+ let _payload = {};
+
+ if (!_.isNil(item.id)) {
+ _payload.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _payload.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.content)) {
+ _payload.content = item.content;
+ }
+
+ resource.payload.push(_payload);
+ }
+ }
+
+ if (!_.isNil(props.occurrence)) {
+ util.composite(resource, "occurrence", props.occurrence);
+ }
+
+ if (!_.isNil(props.authoredOn)) {
+ resource.authoredOn = props.authoredOn;
+ }
+
+ if (!_.isNil(props.requester)) {
+ resource.requester = util.reference(props.requester);
+ }
+
+ if (!_.isNil(props.recipient)) {
+ if (!Array.isArray(props.recipient)) { props.recipient = [props.recipient]; }
+ resource.recipient = util.reference(props.recipient);
+ }
+
+ if (!_.isNil(props.sender)) {
+ resource.sender = util.reference(props.sender);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/CommunicationRequest"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR CompartmentDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function compartmentDefinition(type, props) {
+ const mappings = {
+ "CompartmentDefinition": compartmentDefinition_CompartmentDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function compartmentDefinition_CompartmentDefinition(props) {
+ const resource = {
+ resourceType: "CompartmentDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.search)) {
+ resource.search = props.search;
+ }
+
+ if (!_.isNil(props.resource)) {
+ let src = props.resource;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.resource = [];
+
+ for (let item of src) {
+ let _resource = {};
+
+ if (!_.isNil(item.id)) {
+ _resource.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _resource.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _resource.code = item.code;
+ }
+
+ if (!_.isNil(item.param)) {
+ _resource.param = item.param;
+ }
+
+ if (!_.isNil(item.documentation)) {
+ _resource.documentation = item.documentation;
+ }
+
+ resource.resource.push(_resource);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/CompartmentDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Composition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function composition(type, props) {
+ const mappings = {
+ "Composition": composition_Composition
+ };
+
+ return mappings[type](props)
+}
+
+function composition_Composition(props) {
+ const resource = {
+ resourceType: "Composition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.author)) {
+ if (!Array.isArray(props.author)) { props.author = [props.author]; }
+ resource.author = util.reference(props.author);
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.confidentiality)) {
+ resource.confidentiality = props.confidentiality;
+ }
+
+ if (!_.isNil(props.attester)) {
+ let src = props.attester;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.attester = [];
+
+ for (let item of src) {
+ let _attester = {};
+
+ if (!_.isNil(item.id)) {
+ _attester.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _attester.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.mode)) {
+ _attester.mode = item.mode;
+ }
+
+ if (!_.isNil(item.time)) {
+ _attester.time = item.time;
+ }
+
+ if (!_.isNil(item.party)) {
+ _attester.party = item.party;
+ }
+
+ resource.attester.push(_attester);
+ }
+ }
+
+ if (!_.isNil(props.custodian)) {
+ resource.custodian = util.reference(props.custodian);
+ }
+
+ if (!_.isNil(props.relatesTo)) {
+ let src = props.relatesTo;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.relatesTo = [];
+
+ for (let item of src) {
+ let _relatesTo = {};
+
+ if (!_.isNil(item.id)) {
+ _relatesTo.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _relatesTo.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _relatesTo.code = item.code;
+ }
+
+ if (!_.isNil(item.target)) {
+ _relatesTo.target = item.target;
+ }
+
+ resource.relatesTo.push(_relatesTo);
+ }
+ }
+
+ if (!_.isNil(props.event)) {
+ let src = props.event;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.event = [];
+
+ for (let item of src) {
+ let _event = {};
+
+ if (!_.isNil(item.id)) {
+ _event.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _event.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _event.code = item.code;
+ }
+
+ if (!_.isNil(item.period)) {
+ _event.period = item.period;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _event.detail = item.detail;
+ }
+
+ resource.event.push(_event);
+ }
+ }
+
+ if (!_.isNil(props.section)) {
+ let src = props.section;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.section = [];
+
+ for (let item of src) {
+ let _section = {};
+
+ if (!_.isNil(item.id)) {
+ _section.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _section.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.title)) {
+ _section.title = item.title;
+ }
+
+ if (!_.isNil(item.code)) {
+ _section.code = item.code;
+ }
+
+ if (!_.isNil(item.author)) {
+ _section.author = item.author;
+ }
+
+ if (!_.isNil(item.focus)) {
+ _section.focus = item.focus;
+ }
+
+ if (!_.isNil(item.text)) {
+ _section.text = item.text;
+ }
+
+ if (!_.isNil(item.mode)) {
+ _section.mode = item.mode;
+ }
+
+ if (!_.isNil(item.orderedBy)) {
+ _section.orderedBy = item.orderedBy;
+ }
+
+ if (!_.isNil(item.entry)) {
+ _section.entry = item.entry;
+ }
+
+ if (!_.isNil(item.emptyReason)) {
+ _section.emptyReason = item.emptyReason;
+ }
+
+ resource.section.push(_section);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Composition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ConceptMap resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function conceptMap(type, props) {
+ const mappings = {
+ "ConceptMap": conceptMap_ConceptMap
+ };
+
+ return mappings[type](props)
+}
+
+function conceptMap_ConceptMap(props) {
+ const resource = {
+ resourceType: "ConceptMap",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.source)) {
+ util.composite(resource, "source", props.source);
+ }
+
+ if (!_.isNil(props.target)) {
+ util.composite(resource, "target", props.target);
+ }
+
+ if (!_.isNil(props.group)) {
+ let src = props.group;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.group = [];
+
+ for (let item of src) {
+ let _group = {};
+
+ if (!_.isNil(item.id)) {
+ _group.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _group.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.source)) {
+ _group.source = item.source;
+ }
+
+ if (!_.isNil(item.sourceVersion)) {
+ _group.sourceVersion = item.sourceVersion;
+ }
+
+ if (!_.isNil(item.target)) {
+ _group.target = item.target;
+ }
+
+ if (!_.isNil(item.targetVersion)) {
+ _group.targetVersion = item.targetVersion;
+ }
+
+ if (!_.isNil(item.element)) {
+ _group.element = item.element;
+ }
+
+ if (!_.isNil(item.unmapped)) {
+ _group.unmapped = item.unmapped;
+ }
+
+ resource.group.push(_group);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ConceptMap"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Condition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function condition(type, props) {
+ const mappings = {
+ "Condition": condition_Condition
+ };
+
+ return mappings[type](props)
+}
+
+function condition_Condition(props) {
+ const resource = {
+ resourceType: "Condition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.clinicalStatus)) {
+ resource.clinicalStatus = props.clinicalStatus;
+ }
+
+ if (!_.isNil(props.verificationStatus)) {
+ resource.verificationStatus = props.verificationStatus;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.severity)) {
+ resource.severity = props.severity;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.bodySite)) {
+ resource.bodySite = props.bodySite;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.onset)) {
+ util.composite(resource, "onset", props.onset);
+ }
+
+ if (!_.isNil(props.abatement)) {
+ util.composite(resource, "abatement", props.abatement);
+ }
+
+ if (!_.isNil(props.recordedDate)) {
+ resource.recordedDate = props.recordedDate;
+ }
+
+ if (!_.isNil(props.recorder)) {
+ resource.recorder = util.reference(props.recorder);
+ }
+
+ if (!_.isNil(props.asserter)) {
+ resource.asserter = util.reference(props.asserter);
+ }
+
+ if (!_.isNil(props.stage)) {
+ let src = props.stage;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.stage = [];
+
+ for (let item of src) {
+ let _stage = {};
+
+ if (!_.isNil(item.id)) {
+ _stage.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _stage.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.summary)) {
+ _stage.summary = item.summary;
+ }
+
+ if (!_.isNil(item.assessment)) {
+ _stage.assessment = item.assessment;
+ }
+
+ if (!_.isNil(item.type)) {
+ _stage.type = item.type;
+ }
+
+ resource.stage.push(_stage);
+ }
+ }
+
+ if (!_.isNil(props.evidence)) {
+ let src = props.evidence;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.evidence = [];
+
+ for (let item of src) {
+ let _evidence = {};
+
+ if (!_.isNil(item.id)) {
+ _evidence.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _evidence.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _evidence.code = item.code;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _evidence.detail = item.detail;
+ }
+
+ resource.evidence.push(_evidence);
+ }
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Condition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Consent resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function consent(type, props) {
+ const mappings = {
+ "Consent": consent_Consent
+ };
+
+ return mappings[type](props)
+}
+
+function consent_Consent(props) {
+ const resource = {
+ resourceType: "Consent",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.scope)) {
+ resource.scope = props.scope;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.dateTime)) {
+ resource.dateTime = props.dateTime;
+ }
+
+ if (!_.isNil(props.performer)) {
+ if (!Array.isArray(props.performer)) { props.performer = [props.performer]; }
+ resource.performer = util.reference(props.performer);
+ }
+
+ if (!_.isNil(props.organization)) {
+ if (!Array.isArray(props.organization)) { props.organization = [props.organization]; }
+ resource.organization = util.reference(props.organization);
+ }
+
+ if (!_.isNil(props.source)) {
+ util.composite(resource, "source", props.source);
+ }
+
+ if (!_.isNil(props.policy)) {
+ let src = props.policy;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.policy = [];
+
+ for (let item of src) {
+ let _policy = {};
+
+ if (!_.isNil(item.id)) {
+ _policy.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _policy.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.authority)) {
+ _policy.authority = item.authority;
+ }
+
+ if (!_.isNil(item.uri)) {
+ _policy.uri = item.uri;
+ }
+
+ resource.policy.push(_policy);
+ }
+ }
+
+ if (!_.isNil(props.policyRule)) {
+ resource.policyRule = props.policyRule;
+ }
+
+ if (!_.isNil(props.verification)) {
+ let src = props.verification;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.verification = [];
+
+ for (let item of src) {
+ let _verification = {};
+
+ if (!_.isNil(item.id)) {
+ _verification.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _verification.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.verified)) {
+ _verification.verified = item.verified;
+ }
+
+ if (!_.isNil(item.verifiedWith)) {
+ _verification.verifiedWith = item.verifiedWith;
+ }
+
+ if (!_.isNil(item.verificationDate)) {
+ _verification.verificationDate = item.verificationDate;
+ }
+
+ resource.verification.push(_verification);
+ }
+ }
+
+ if (!_.isNil(props.provision)) {
+ let src = props.provision;
+ let _provision = {};
+
+ if (!_.isNil(src.id)) {
+ _provision.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _provision.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.type)) {
+ _provision.type = src.type;
+ }
+
+ if (!_.isNil(src.period)) {
+ _provision.period = src.period;
+ }
+
+ if (!_.isNil(src.actor)) {
+ _provision.actor = src.actor;
+ }
+
+ if (!_.isNil(src.action)) {
+ _provision.action = src.action;
+ }
+
+ if (!_.isNil(src.securityLabel)) {
+ _provision.securityLabel = src.securityLabel;
+ }
+
+ if (!_.isNil(src.purpose)) {
+ _provision.purpose = src.purpose;
+ }
+
+ if (!_.isNil(src.class)) {
+ _provision.class = src.class;
+ }
+
+ if (!_.isNil(src.code)) {
+ _provision.code = src.code;
+ }
+
+ if (!_.isNil(src.dataPeriod)) {
+ _provision.dataPeriod = src.dataPeriod;
+ }
+
+ if (!_.isNil(src.data)) {
+ _provision.data = src.data;
+ }
+
+ resource.provision = _provision;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Consent"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Contract resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function contract(type, props) {
+ const mappings = {
+ "Contract": contract_Contract
+ };
+
+ return mappings[type](props)
+}
+
+function contract_Contract(props) {
+ const resource = {
+ resourceType: "Contract",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.legalState)) {
+ resource.legalState = props.legalState;
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = util.reference(props.instantiatesCanonical);
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.contentDerivative)) {
+ resource.contentDerivative = props.contentDerivative;
+ }
+
+ if (!_.isNil(props.issued)) {
+ resource.issued = props.issued;
+ }
+
+ if (!_.isNil(props.applies)) {
+ resource.applies = props.applies;
+ }
+
+ if (!_.isNil(props.expirationType)) {
+ resource.expirationType = props.expirationType;
+ }
+
+ if (!_.isNil(props.subject)) {
+ if (!Array.isArray(props.subject)) { props.subject = [props.subject]; }
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.authority)) {
+ if (!Array.isArray(props.authority)) { props.authority = [props.authority]; }
+ resource.authority = util.reference(props.authority);
+ }
+
+ if (!_.isNil(props.domain)) {
+ if (!Array.isArray(props.domain)) { props.domain = [props.domain]; }
+ resource.domain = util.reference(props.domain);
+ }
+
+ if (!_.isNil(props.site)) {
+ if (!Array.isArray(props.site)) { props.site = [props.site]; }
+ resource.site = util.reference(props.site);
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.subtitle)) {
+ resource.subtitle = props.subtitle;
+ }
+
+ if (!_.isNil(props.alias)) {
+ resource.alias = props.alias;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = util.reference(props.author);
+ }
+
+ if (!_.isNil(props.scope)) {
+ resource.scope = props.scope;
+ }
+
+ if (!_.isNil(props.topic)) {
+ util.composite(resource, "topic", props.topic);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.subType)) {
+ resource.subType = props.subType;
+ }
+
+ if (!_.isNil(props.contentDefinition)) {
+ let src = props.contentDefinition;
+ let _contentDefinition = {};
+
+ if (!_.isNil(src.id)) {
+ _contentDefinition.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _contentDefinition.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.type)) {
+ _contentDefinition.type = src.type;
+ }
+
+ if (!_.isNil(src.subType)) {
+ _contentDefinition.subType = src.subType;
+ }
+
+ if (!_.isNil(src.publisher)) {
+ _contentDefinition.publisher = src.publisher;
+ }
+
+ if (!_.isNil(src.publicationDate)) {
+ _contentDefinition.publicationDate = src.publicationDate;
+ }
+
+ if (!_.isNil(src.publicationStatus)) {
+ _contentDefinition.publicationStatus = src.publicationStatus;
+ }
+
+ if (!_.isNil(src.copyright)) {
+ _contentDefinition.copyright = src.copyright;
+ }
+
+ resource.contentDefinition = _contentDefinition;
+ }
+
+ if (!_.isNil(props.term)) {
+ let src = props.term;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.term = [];
+
+ for (let item of src) {
+ let _term = {};
+
+ if (!_.isNil(item.id)) {
+ _term.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _term.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.identifier)) {
+ _term.identifier = item.identifier;
+ }
+
+ if (!_.isNil(item.issued)) {
+ _term.issued = item.issued;
+ }
+
+ if (!_.isNil(item.applies)) {
+ _term.applies = item.applies;
+ }
+
+ if (!_.isNil(item.topic)) {
+ _term.topic = item.topic;
+ }
+
+ if (!_.isNil(item.type)) {
+ _term.type = item.type;
+ }
+
+ if (!_.isNil(item.subType)) {
+ _term.subType = item.subType;
+ }
+
+ if (!_.isNil(item.text)) {
+ _term.text = item.text;
+ }
+
+ if (!_.isNil(item.securityLabel)) {
+ _term.securityLabel = item.securityLabel;
+ }
+
+ if (!_.isNil(item.offer)) {
+ _term.offer = item.offer;
+ }
+
+ if (!_.isNil(item.asset)) {
+ _term.asset = item.asset;
+ }
+
+ if (!_.isNil(item.action)) {
+ _term.action = item.action;
+ }
+
+ resource.term.push(_term);
+ }
+ }
+
+ if (!_.isNil(props.supportingInfo)) {
+ if (!Array.isArray(props.supportingInfo)) { props.supportingInfo = [props.supportingInfo]; }
+ resource.supportingInfo = util.reference(props.supportingInfo);
+ }
+
+ if (!_.isNil(props.relevantHistory)) {
+ if (!Array.isArray(props.relevantHistory)) { props.relevantHistory = [props.relevantHistory]; }
+ resource.relevantHistory = util.reference(props.relevantHistory);
+ }
+
+ if (!_.isNil(props.signer)) {
+ let src = props.signer;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.signer = [];
+
+ for (let item of src) {
+ let _signer = {};
+
+ if (!_.isNil(item.id)) {
+ _signer.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _signer.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _signer.type = item.type;
+ }
+
+ if (!_.isNil(item.party)) {
+ _signer.party = item.party;
+ }
+
+ if (!_.isNil(item.signature)) {
+ _signer.signature = item.signature;
+ }
+
+ resource.signer.push(_signer);
+ }
+ }
+
+ if (!_.isNil(props.friendly)) {
+ let src = props.friendly;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.friendly = [];
+
+ for (let item of src) {
+ let _friendly = {};
+
+ if (!_.isNil(item.id)) {
+ _friendly.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _friendly.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.content)) {
+ _friendly.content = item.content;
+ }
+
+ resource.friendly.push(_friendly);
+ }
+ }
+
+ if (!_.isNil(props.legal)) {
+ let src = props.legal;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.legal = [];
+
+ for (let item of src) {
+ let _legal = {};
+
+ if (!_.isNil(item.id)) {
+ _legal.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _legal.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.content)) {
+ _legal.content = item.content;
+ }
+
+ resource.legal.push(_legal);
+ }
+ }
+
+ if (!_.isNil(props.rule)) {
+ let src = props.rule;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.rule = [];
+
+ for (let item of src) {
+ let _rule = {};
+
+ if (!_.isNil(item.id)) {
+ _rule.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _rule.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.content)) {
+ _rule.content = item.content;
+ }
+
+ resource.rule.push(_rule);
+ }
+ }
+
+ if (!_.isNil(props.legallyBinding)) {
+ util.composite(resource, "legallyBinding", props.legallyBinding);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Contract"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Coverage resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function coverage(type, props) {
+ const mappings = {
+ "Coverage": coverage_Coverage
+ };
+
+ return mappings[type](props)
+}
+
+function coverage_Coverage(props) {
+ const resource = {
+ resourceType: "Coverage",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.policyHolder)) {
+ resource.policyHolder = util.reference(props.policyHolder);
+ }
+
+ if (!_.isNil(props.subscriber)) {
+ resource.subscriber = util.reference(props.subscriber);
+ }
+
+ if (!_.isNil(props.subscriberId)) {
+ resource.subscriberId = props.subscriberId;
+ }
+
+ if (!_.isNil(props.beneficiary)) {
+ resource.beneficiary = util.reference(props.beneficiary);
+ }
+
+ if (!_.isNil(props.dependent)) {
+ resource.dependent = props.dependent;
+ }
+
+ if (!_.isNil(props.relationship)) {
+ resource.relationship = props.relationship;
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.payor)) {
+ if (!Array.isArray(props.payor)) { props.payor = [props.payor]; }
+ resource.payor = util.reference(props.payor);
+ }
+
+ if (!_.isNil(props.class)) {
+ let src = props.class;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.class = [];
+
+ for (let item of src) {
+ let _class = {};
+
+ if (!_.isNil(item.id)) {
+ _class.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _class.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _class.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _class.value = item.value;
+ }
+
+ if (!_.isNil(item.name)) {
+ _class.name = item.name;
+ }
+
+ resource.class.push(_class);
+ }
+ }
+
+ if (!_.isNil(props.order)) {
+ resource.order = props.order;
+ }
+
+ if (!_.isNil(props.network)) {
+ resource.network = props.network;
+ }
+
+ if (!_.isNil(props.costToBeneficiary)) {
+ let src = props.costToBeneficiary;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.costToBeneficiary = [];
+
+ for (let item of src) {
+ let _costToBeneficiary = {};
+
+ if (!_.isNil(item.id)) {
+ _costToBeneficiary.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _costToBeneficiary.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _costToBeneficiary.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _costToBeneficiary.value = item.value;
+ }
+
+ if (!_.isNil(item.exception)) {
+ _costToBeneficiary.exception = item.exception;
+ }
+
+ resource.costToBeneficiary.push(_costToBeneficiary);
+ }
+ }
+
+ if (!_.isNil(props.subrogation)) {
+ resource.subrogation = props.subrogation;
+ }
+
+ if (!_.isNil(props.contract)) {
+ if (!Array.isArray(props.contract)) { props.contract = [props.contract]; }
+ resource.contract = util.reference(props.contract);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Coverage"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR CoverageEligibilityRequest resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function coverageEligibilityRequest(type, props) {
+ const mappings = {
+ "CoverageEligibilityRequest": coverageEligibilityRequest_CoverageEligibilityRequest
+ };
+
+ return mappings[type](props)
+}
+
+function coverageEligibilityRequest_CoverageEligibilityRequest(props) {
+ const resource = {
+ resourceType: "CoverageEligibilityRequest",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.serviced)) {
+ util.composite(resource, "serviced", props.serviced);
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.enterer)) {
+ resource.enterer = util.reference(props.enterer);
+ }
+
+ if (!_.isNil(props.provider)) {
+ resource.provider = util.reference(props.provider);
+ }
+
+ if (!_.isNil(props.insurer)) {
+ resource.insurer = util.reference(props.insurer);
+ }
+
+ if (!_.isNil(props.facility)) {
+ resource.facility = util.reference(props.facility);
+ }
+
+ if (!_.isNil(props.supportingInfo)) {
+ let src = props.supportingInfo;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.supportingInfo = [];
+
+ for (let item of src) {
+ let _supportingInfo = {};
+
+ if (!_.isNil(item.id)) {
+ _supportingInfo.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _supportingInfo.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _supportingInfo.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.information)) {
+ _supportingInfo.information = item.information;
+ }
+
+ if (!_.isNil(item.appliesToAll)) {
+ _supportingInfo.appliesToAll = item.appliesToAll;
+ }
+
+ resource.supportingInfo.push(_supportingInfo);
+ }
+ }
+
+ if (!_.isNil(props.insurance)) {
+ let src = props.insurance;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.insurance = [];
+
+ for (let item of src) {
+ let _insurance = {};
+
+ if (!_.isNil(item.id)) {
+ _insurance.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _insurance.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.focal)) {
+ _insurance.focal = item.focal;
+ }
+
+ if (!_.isNil(item.coverage)) {
+ _insurance.coverage = item.coverage;
+ }
+
+ if (!_.isNil(item.businessArrangement)) {
+ _insurance.businessArrangement = item.businessArrangement;
+ }
+
+ resource.insurance.push(_insurance);
+ }
+ }
+
+ if (!_.isNil(props.item)) {
+ let src = props.item;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.item = [];
+
+ for (let item of src) {
+ let _item = {};
+
+ if (!_.isNil(item.id)) {
+ _item.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _item.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.supportingInfoSequence)) {
+ _item.supportingInfoSequence = item.supportingInfoSequence;
+ }
+
+ if (!_.isNil(item.category)) {
+ _item.category = item.category;
+ }
+
+ if (!_.isNil(item.productOrService)) {
+ _item.productOrService = item.productOrService;
+ }
+
+ if (!_.isNil(item.modifier)) {
+ _item.modifier = item.modifier;
+ }
+
+ if (!_.isNil(item.provider)) {
+ _item.provider = item.provider;
+ }
+
+ if (!_.isNil(item.quantity)) {
+ _item.quantity = item.quantity;
+ }
+
+ if (!_.isNil(item.unitPrice)) {
+ _item.unitPrice = item.unitPrice;
+ }
+
+ if (!_.isNil(item.facility)) {
+ _item.facility = item.facility;
+ }
+
+ if (!_.isNil(item.diagnosis)) {
+ _item.diagnosis = item.diagnosis;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _item.detail = item.detail;
+ }
+
+ resource.item.push(_item);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/CoverageEligibilityRequest"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR CoverageEligibilityResponse resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function coverageEligibilityResponse(type, props) {
+ const mappings = {
+ "CoverageEligibilityResponse": coverageEligibilityResponse_CoverageEligibilityResponse
+ };
+
+ return mappings[type](props)
+}
+
+function coverageEligibilityResponse_CoverageEligibilityResponse(props) {
+ const resource = {
+ resourceType: "CoverageEligibilityResponse",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.serviced)) {
+ util.composite(resource, "serviced", props.serviced);
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.requestor)) {
+ resource.requestor = util.reference(props.requestor);
+ }
+
+ if (!_.isNil(props.request)) {
+ resource.request = util.reference(props.request);
+ }
+
+ if (!_.isNil(props.outcome)) {
+ resource.outcome = props.outcome;
+ }
+
+ if (!_.isNil(props.disposition)) {
+ resource.disposition = props.disposition;
+ }
+
+ if (!_.isNil(props.insurer)) {
+ resource.insurer = util.reference(props.insurer);
+ }
+
+ if (!_.isNil(props.insurance)) {
+ let src = props.insurance;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.insurance = [];
+
+ for (let item of src) {
+ let _insurance = {};
+
+ if (!_.isNil(item.id)) {
+ _insurance.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _insurance.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.coverage)) {
+ _insurance.coverage = item.coverage;
+ }
+
+ if (!_.isNil(item.inforce)) {
+ _insurance.inforce = item.inforce;
+ }
+
+ if (!_.isNil(item.benefitPeriod)) {
+ _insurance.benefitPeriod = item.benefitPeriod;
+ }
+
+ if (!_.isNil(item.item)) {
+ _insurance.item = item.item;
+ }
+
+ resource.insurance.push(_insurance);
+ }
+ }
+
+ if (!_.isNil(props.preAuthRef)) {
+ resource.preAuthRef = props.preAuthRef;
+ }
+
+ if (!_.isNil(props.form)) {
+ resource.form = props.form;
+ }
+
+ if (!_.isNil(props.error)) {
+ let src = props.error;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.error = [];
+
+ for (let item of src) {
+ let _error = {};
+
+ if (!_.isNil(item.id)) {
+ _error.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _error.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _error.code = item.code;
+ }
+
+ resource.error.push(_error);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/CoverageEligibilityResponse"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR DetectedIssue resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function detectedIssue(type, props) {
+ const mappings = {
+ "DetectedIssue": detectedIssue_DetectedIssue
+ };
+
+ return mappings[type](props)
+}
+
+function detectedIssue_DetectedIssue(props) {
+ const resource = {
+ resourceType: "DetectedIssue",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.severity)) {
+ resource.severity = props.severity;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.identified)) {
+ util.composite(resource, "identified", props.identified);
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = util.reference(props.author);
+ }
+
+ if (!_.isNil(props.implicated)) {
+ if (!Array.isArray(props.implicated)) { props.implicated = [props.implicated]; }
+ resource.implicated = util.reference(props.implicated);
+ }
+
+ if (!_.isNil(props.evidence)) {
+ let src = props.evidence;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.evidence = [];
+
+ for (let item of src) {
+ let _evidence = {};
+
+ if (!_.isNil(item.id)) {
+ _evidence.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _evidence.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _evidence.code = item.code;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _evidence.detail = item.detail;
+ }
+
+ resource.evidence.push(_evidence);
+ }
+ }
+
+ if (!_.isNil(props.detail)) {
+ resource.detail = props.detail;
+ }
+
+ if (!_.isNil(props.reference)) {
+ resource.reference = props.reference;
+ }
+
+ if (!_.isNil(props.mitigation)) {
+ let src = props.mitigation;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.mitigation = [];
+
+ for (let item of src) {
+ let _mitigation = {};
+
+ if (!_.isNil(item.id)) {
+ _mitigation.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _mitigation.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.action)) {
+ _mitigation.action = item.action;
+ }
+
+ if (!_.isNil(item.date)) {
+ _mitigation.date = item.date;
+ }
+
+ if (!_.isNil(item.author)) {
+ _mitigation.author = item.author;
+ }
+
+ resource.mitigation.push(_mitigation);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/DetectedIssue"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Device resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function device(type, props) {
+ const mappings = {
+ "Device": device_Device
+ };
+
+ return mappings[type](props)
+}
+
+function device_Device(props) {
+ const resource = {
+ resourceType: "Device",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.definition)) {
+ resource.definition = util.reference(props.definition);
+ }
+
+ if (!_.isNil(props.udiCarrier)) {
+ let src = props.udiCarrier;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.udiCarrier = [];
+
+ for (let item of src) {
+ let _udiCarrier = {};
+
+ if (!_.isNil(item.id)) {
+ _udiCarrier.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _udiCarrier.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.deviceIdentifier)) {
+ _udiCarrier.deviceIdentifier = item.deviceIdentifier;
+ }
+
+ if (!_.isNil(item.issuer)) {
+ _udiCarrier.issuer = item.issuer;
+ }
+
+ if (!_.isNil(item.jurisdiction)) {
+ _udiCarrier.jurisdiction = item.jurisdiction;
+ }
+
+ if (!_.isNil(item.carrierAIDC)) {
+ _udiCarrier.carrierAIDC = item.carrierAIDC;
+ }
+
+ if (!_.isNil(item.carrierHRF)) {
+ _udiCarrier.carrierHRF = item.carrierHRF;
+ }
+
+ if (!_.isNil(item.entryType)) {
+ _udiCarrier.entryType = item.entryType;
+ }
+
+ resource.udiCarrier.push(_udiCarrier);
+ }
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.distinctIdentifier)) {
+ resource.distinctIdentifier = props.distinctIdentifier;
+ }
+
+ if (!_.isNil(props.manufacturer)) {
+ resource.manufacturer = props.manufacturer;
+ }
+
+ if (!_.isNil(props.manufactureDate)) {
+ resource.manufactureDate = props.manufactureDate;
+ }
+
+ if (!_.isNil(props.expirationDate)) {
+ resource.expirationDate = props.expirationDate;
+ }
+
+ if (!_.isNil(props.lotNumber)) {
+ resource.lotNumber = props.lotNumber;
+ }
+
+ if (!_.isNil(props.serialNumber)) {
+ resource.serialNumber = props.serialNumber;
+ }
+
+ if (!_.isNil(props.deviceName)) {
+ let src = props.deviceName;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.deviceName = [];
+
+ for (let item of src) {
+ let _deviceName = {};
+
+ if (!_.isNil(item.id)) {
+ _deviceName.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _deviceName.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _deviceName.name = item.name;
+ }
+
+ if (!_.isNil(item.type)) {
+ _deviceName.type = item.type;
+ }
+
+ resource.deviceName.push(_deviceName);
+ }
+ }
+
+ if (!_.isNil(props.modelNumber)) {
+ resource.modelNumber = props.modelNumber;
+ }
+
+ if (!_.isNil(props.partNumber)) {
+ resource.partNumber = props.partNumber;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.specialization)) {
+ let src = props.specialization;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.specialization = [];
+
+ for (let item of src) {
+ let _specialization = {};
+
+ if (!_.isNil(item.id)) {
+ _specialization.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _specialization.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.systemType)) {
+ _specialization.systemType = item.systemType;
+ }
+
+ if (!_.isNil(item.version)) {
+ _specialization.version = item.version;
+ }
+
+ resource.specialization.push(_specialization);
+ }
+ }
+
+ if (!_.isNil(props.version)) {
+ let src = props.version;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.version = [];
+
+ for (let item of src) {
+ let _version = {};
+
+ if (!_.isNil(item.id)) {
+ _version.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _version.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _version.type = item.type;
+ }
+
+ if (!_.isNil(item.component)) {
+ _version.component = item.component;
+ }
+
+ if (!_.isNil(item.value)) {
+ _version.value = item.value;
+ }
+
+ resource.version.push(_version);
+ }
+ }
+
+ if (!_.isNil(props.property)) {
+ let src = props.property;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.property = [];
+
+ for (let item of src) {
+ let _property = {};
+
+ if (!_.isNil(item.id)) {
+ _property.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _property.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _property.type = item.type;
+ }
+
+ if (!_.isNil(item.valueQuantity)) {
+ _property.valueQuantity = item.valueQuantity;
+ }
+
+ if (!_.isNil(item.valueCode)) {
+ _property.valueCode = item.valueCode;
+ }
+
+ resource.property.push(_property);
+ }
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.owner)) {
+ resource.owner = util.reference(props.owner);
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.safety)) {
+ resource.safety = props.safety;
+ }
+
+ if (!_.isNil(props.parent)) {
+ resource.parent = util.reference(props.parent);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Device"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR DeviceDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function deviceDefinition(type, props) {
+ const mappings = {
+ "DeviceDefinition": deviceDefinition_DeviceDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function deviceDefinition_DeviceDefinition(props) {
+ const resource = {
+ resourceType: "DeviceDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.udiDeviceIdentifier)) {
+ let src = props.udiDeviceIdentifier;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.udiDeviceIdentifier = [];
+
+ for (let item of src) {
+ let _udiDeviceIdentifier = {};
+
+ if (!_.isNil(item.id)) {
+ _udiDeviceIdentifier.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _udiDeviceIdentifier.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.deviceIdentifier)) {
+ _udiDeviceIdentifier.deviceIdentifier = item.deviceIdentifier;
+ }
+
+ if (!_.isNil(item.issuer)) {
+ _udiDeviceIdentifier.issuer = item.issuer;
+ }
+
+ if (!_.isNil(item.jurisdiction)) {
+ _udiDeviceIdentifier.jurisdiction = item.jurisdiction;
+ }
+
+ resource.udiDeviceIdentifier.push(_udiDeviceIdentifier);
+ }
+ }
+
+ if (!_.isNil(props.manufacturer)) {
+ util.composite(resource, "manufacturer", props.manufacturer);
+ }
+
+ if (!_.isNil(props.deviceName)) {
+ let src = props.deviceName;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.deviceName = [];
+
+ for (let item of src) {
+ let _deviceName = {};
+
+ if (!_.isNil(item.id)) {
+ _deviceName.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _deviceName.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _deviceName.name = item.name;
+ }
+
+ if (!_.isNil(item.type)) {
+ _deviceName.type = item.type;
+ }
+
+ resource.deviceName.push(_deviceName);
+ }
+ }
+
+ if (!_.isNil(props.modelNumber)) {
+ resource.modelNumber = props.modelNumber;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.specialization)) {
+ let src = props.specialization;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.specialization = [];
+
+ for (let item of src) {
+ let _specialization = {};
+
+ if (!_.isNil(item.id)) {
+ _specialization.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _specialization.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.systemType)) {
+ _specialization.systemType = item.systemType;
+ }
+
+ if (!_.isNil(item.version)) {
+ _specialization.version = item.version;
+ }
+
+ resource.specialization.push(_specialization);
+ }
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.safety)) {
+ resource.safety = props.safety;
+ }
+
+ if (!_.isNil(props.shelfLifeStorage)) {
+ resource.shelfLifeStorage = props.shelfLifeStorage;
+ }
+
+ if (!_.isNil(props.physicalCharacteristics)) {
+ resource.physicalCharacteristics = props.physicalCharacteristics;
+ }
+
+ if (!_.isNil(props.languageCode)) {
+ resource.languageCode = props.languageCode;
+ }
+
+ if (!_.isNil(props.capability)) {
+ let src = props.capability;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.capability = [];
+
+ for (let item of src) {
+ let _capability = {};
+
+ if (!_.isNil(item.id)) {
+ _capability.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _capability.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _capability.type = item.type;
+ }
+
+ if (!_.isNil(item.description)) {
+ _capability.description = item.description;
+ }
+
+ resource.capability.push(_capability);
+ }
+ }
+
+ if (!_.isNil(props.property)) {
+ let src = props.property;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.property = [];
+
+ for (let item of src) {
+ let _property = {};
+
+ if (!_.isNil(item.id)) {
+ _property.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _property.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _property.type = item.type;
+ }
+
+ if (!_.isNil(item.valueQuantity)) {
+ _property.valueQuantity = item.valueQuantity;
+ }
+
+ if (!_.isNil(item.valueCode)) {
+ _property.valueCode = item.valueCode;
+ }
+
+ resource.property.push(_property);
+ }
+ }
+
+ if (!_.isNil(props.owner)) {
+ resource.owner = util.reference(props.owner);
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.onlineInformation)) {
+ resource.onlineInformation = props.onlineInformation;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.quantity)) {
+ resource.quantity = props.quantity;
+ }
+
+ if (!_.isNil(props.parentDevice)) {
+ resource.parentDevice = util.reference(props.parentDevice);
+ }
+
+ if (!_.isNil(props.material)) {
+ let src = props.material;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.material = [];
+
+ for (let item of src) {
+ let _material = {};
+
+ if (!_.isNil(item.id)) {
+ _material.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _material.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.substance)) {
+ _material.substance = item.substance;
+ }
+
+ if (!_.isNil(item.alternate)) {
+ _material.alternate = item.alternate;
+ }
+
+ if (!_.isNil(item.allergenicIndicator)) {
+ _material.allergenicIndicator = item.allergenicIndicator;
+ }
+
+ resource.material.push(_material);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/DeviceDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR DeviceMetric resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function deviceMetric(type, props) {
+ const mappings = {
+ "DeviceMetric": deviceMetric_DeviceMetric
+ };
+
+ return mappings[type](props)
+}
+
+function deviceMetric_DeviceMetric(props) {
+ const resource = {
+ resourceType: "DeviceMetric",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.unit)) {
+ resource.unit = props.unit;
+ }
+
+ if (!_.isNil(props.source)) {
+ resource.source = util.reference(props.source);
+ }
+
+ if (!_.isNil(props.parent)) {
+ resource.parent = util.reference(props.parent);
+ }
+
+ if (!_.isNil(props.operationalStatus)) {
+ resource.operationalStatus = props.operationalStatus;
+ }
+
+ if (!_.isNil(props.color)) {
+ resource.color = props.color;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.measurementPeriod)) {
+ resource.measurementPeriod = props.measurementPeriod;
+ }
+
+ if (!_.isNil(props.calibration)) {
+ let src = props.calibration;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.calibration = [];
+
+ for (let item of src) {
+ let _calibration = {};
+
+ if (!_.isNil(item.id)) {
+ _calibration.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _calibration.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _calibration.type = item.type;
+ }
+
+ if (!_.isNil(item.state)) {
+ _calibration.state = item.state;
+ }
+
+ if (!_.isNil(item.time)) {
+ _calibration.time = item.time;
+ }
+
+ resource.calibration.push(_calibration);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/DeviceMetric"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR DeviceRequest resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function deviceRequest(type, props) {
+ const mappings = {
+ "DeviceRequest": deviceRequest_DeviceRequest
+ };
+
+ return mappings[type](props)
+}
+
+function deviceRequest_DeviceRequest(props) {
+ const resource = {
+ resourceType: "DeviceRequest",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = props.instantiatesCanonical;
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.priorRequest)) {
+ if (!Array.isArray(props.priorRequest)) { props.priorRequest = [props.priorRequest]; }
+ resource.priorRequest = util.reference(props.priorRequest);
+ }
+
+ if (!_.isNil(props.groupIdentifier)) {
+ resource.groupIdentifier = util.identifier(props.groupIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.intent)) {
+ resource.intent = props.intent;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.code)) {
+ util.composite(resource, "code", props.code);
+ }
+
+ if (!_.isNil(props.parameter)) {
+ let src = props.parameter;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.parameter = [];
+
+ for (let item of src) {
+ let _parameter = {};
+
+ if (!_.isNil(item.id)) {
+ _parameter.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _parameter.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _parameter.code = item.code;
+ }
+
+ if (!_.isNil(item.value)) {
+ _parameter.value = item.value;
+ }
+
+ resource.parameter.push(_parameter);
+ }
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.occurrence)) {
+ util.composite(resource, "occurrence", props.occurrence);
+ }
+
+ if (!_.isNil(props.authoredOn)) {
+ resource.authoredOn = props.authoredOn;
+ }
+
+ if (!_.isNil(props.requester)) {
+ resource.requester = util.reference(props.requester);
+ }
+
+ if (!_.isNil(props.performerType)) {
+ resource.performerType = props.performerType;
+ }
+
+ if (!_.isNil(props.performer)) {
+ resource.performer = util.reference(props.performer);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.insurance)) {
+ if (!Array.isArray(props.insurance)) { props.insurance = [props.insurance]; }
+ resource.insurance = util.reference(props.insurance);
+ }
+
+ if (!_.isNil(props.supportingInfo)) {
+ if (!Array.isArray(props.supportingInfo)) { props.supportingInfo = [props.supportingInfo]; }
+ resource.supportingInfo = util.reference(props.supportingInfo);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.relevantHistory)) {
+ if (!Array.isArray(props.relevantHistory)) { props.relevantHistory = [props.relevantHistory]; }
+ resource.relevantHistory = util.reference(props.relevantHistory);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/DeviceRequest"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR DeviceUseStatement resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function deviceUseStatement(type, props) {
+ const mappings = {
+ "DeviceUseStatement": deviceUseStatement_DeviceUseStatement
+ };
+
+ return mappings[type](props)
+}
+
+function deviceUseStatement_DeviceUseStatement(props) {
+ const resource = {
+ resourceType: "DeviceUseStatement",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.derivedFrom)) {
+ if (!Array.isArray(props.derivedFrom)) { props.derivedFrom = [props.derivedFrom]; }
+ resource.derivedFrom = util.reference(props.derivedFrom);
+ }
+
+ if (!_.isNil(props.timing)) {
+ util.composite(resource, "timing", props.timing);
+ }
+
+ if (!_.isNil(props.recordedOn)) {
+ resource.recordedOn = props.recordedOn;
+ }
+
+ if (!_.isNil(props.source)) {
+ resource.source = util.reference(props.source);
+ }
+
+ if (!_.isNil(props.device)) {
+ resource.device = util.reference(props.device);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.bodySite)) {
+ resource.bodySite = props.bodySite;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/DeviceUseStatement"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR DiagnosticReport resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function diagnosticReport(type, props) {
+ const mappings = {
+ "DiagnosticReport": diagnosticReport_DiagnosticReport
+ };
+
+ return mappings[type](props)
+}
+
+function diagnosticReport_DiagnosticReport(props) {
+ const resource = {
+ resourceType: "DiagnosticReport",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.effective)) {
+ util.composite(resource, "effective", props.effective);
+ }
+
+ if (!_.isNil(props.issued)) {
+ resource.issued = props.issued;
+ }
+
+ if (!_.isNil(props.performer)) {
+ if (!Array.isArray(props.performer)) { props.performer = [props.performer]; }
+ resource.performer = util.reference(props.performer);
+ }
+
+ if (!_.isNil(props.resultsInterpreter)) {
+ if (!Array.isArray(props.resultsInterpreter)) { props.resultsInterpreter = [props.resultsInterpreter]; }
+ resource.resultsInterpreter = util.reference(props.resultsInterpreter);
+ }
+
+ if (!_.isNil(props.specimen)) {
+ if (!Array.isArray(props.specimen)) { props.specimen = [props.specimen]; }
+ resource.specimen = util.reference(props.specimen);
+ }
+
+ if (!_.isNil(props.result)) {
+ if (!Array.isArray(props.result)) { props.result = [props.result]; }
+ resource.result = util.reference(props.result);
+ }
+
+ if (!_.isNil(props.imagingStudy)) {
+ if (!Array.isArray(props.imagingStudy)) { props.imagingStudy = [props.imagingStudy]; }
+ resource.imagingStudy = util.reference(props.imagingStudy);
+ }
+
+ if (!_.isNil(props.media)) {
+ let src = props.media;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.media = [];
+
+ for (let item of src) {
+ let _media = {};
+
+ if (!_.isNil(item.id)) {
+ _media.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _media.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.comment)) {
+ _media.comment = item.comment;
+ }
+
+ if (!_.isNil(item.link)) {
+ _media.link = item.link;
+ }
+
+ resource.media.push(_media);
+ }
+ }
+
+ if (!_.isNil(props.conclusion)) {
+ resource.conclusion = props.conclusion;
+ }
+
+ if (!_.isNil(props.conclusionCode)) {
+ resource.conclusionCode = props.conclusionCode;
+ }
+
+ if (!_.isNil(props.presentedForm)) {
+ resource.presentedForm = props.presentedForm;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/DiagnosticReport"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR DocumentManifest resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function documentManifest(type, props) {
+ const mappings = {
+ "DocumentManifest": documentManifest_DocumentManifest
+ };
+
+ return mappings[type](props)
+}
+
+function documentManifest_DocumentManifest(props) {
+ const resource = {
+ resourceType: "DocumentManifest",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.masterIdentifier)) {
+ resource.masterIdentifier = util.identifier(props.masterIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.author)) {
+ if (!Array.isArray(props.author)) { props.author = [props.author]; }
+ resource.author = util.reference(props.author);
+ }
+
+ if (!_.isNil(props.recipient)) {
+ if (!Array.isArray(props.recipient)) { props.recipient = [props.recipient]; }
+ resource.recipient = util.reference(props.recipient);
+ }
+
+ if (!_.isNil(props.source)) {
+ resource.source = props.source;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.content)) {
+ if (!Array.isArray(props.content)) { props.content = [props.content]; }
+ resource.content = util.reference(props.content);
+ }
+
+ if (!_.isNil(props.related)) {
+ let src = props.related;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.related = [];
+
+ for (let item of src) {
+ let _related = {};
+
+ if (!_.isNil(item.id)) {
+ _related.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _related.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.identifier)) {
+ _related.identifier = item.identifier;
+ }
+
+ if (!_.isNil(item.ref)) {
+ _related.ref = item.ref;
+ }
+
+ resource.related.push(_related);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/DocumentManifest"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR DocumentReference resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function documentReference(type, props) {
+ const mappings = {
+ "DocumentReference": documentReference_DocumentReference
+ };
+
+ return mappings[type](props)
+}
+
+function documentReference_DocumentReference(props) {
+ const resource = {
+ resourceType: "DocumentReference",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.masterIdentifier)) {
+ resource.masterIdentifier = util.identifier(props.masterIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.docStatus)) {
+ resource.docStatus = props.docStatus;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.author)) {
+ if (!Array.isArray(props.author)) { props.author = [props.author]; }
+ resource.author = util.reference(props.author);
+ }
+
+ if (!_.isNil(props.authenticator)) {
+ resource.authenticator = util.reference(props.authenticator);
+ }
+
+ if (!_.isNil(props.custodian)) {
+ resource.custodian = util.reference(props.custodian);
+ }
+
+ if (!_.isNil(props.relatesTo)) {
+ let src = props.relatesTo;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.relatesTo = [];
+
+ for (let item of src) {
+ let _relatesTo = {};
+
+ if (!_.isNil(item.id)) {
+ _relatesTo.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _relatesTo.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _relatesTo.code = item.code;
+ }
+
+ if (!_.isNil(item.target)) {
+ _relatesTo.target = item.target;
+ }
+
+ resource.relatesTo.push(_relatesTo);
+ }
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.securityLabel)) {
+ resource.securityLabel = props.securityLabel;
+ }
+
+ if (!_.isNil(props.content)) {
+ let src = props.content;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.content = [];
+
+ for (let item of src) {
+ let _content = {};
+
+ if (!_.isNil(item.id)) {
+ _content.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _content.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.attachment)) {
+ _content.attachment = item.attachment;
+ }
+
+ if (!_.isNil(item.format)) {
+ _content.format = item.format;
+ }
+
+ resource.content.push(_content);
+ }
+ }
+
+ if (!_.isNil(props.context)) {
+ let src = props.context;
+ let _context = {};
+
+ if (!_.isNil(src.id)) {
+ _context.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _context.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.encounter)) {
+ _context.encounter = src.encounter;
+ }
+
+ if (!_.isNil(src.event)) {
+ _context.event = src.event;
+ }
+
+ if (!_.isNil(src.period)) {
+ _context.period = src.period;
+ }
+
+ if (!_.isNil(src.facilityType)) {
+ _context.facilityType = src.facilityType;
+ }
+
+ if (!_.isNil(src.practiceSetting)) {
+ _context.practiceSetting = src.practiceSetting;
+ }
+
+ if (!_.isNil(src.sourcePatientInfo)) {
+ _context.sourcePatientInfo = src.sourcePatientInfo;
+ }
+
+ if (!_.isNil(src.related)) {
+ _context.related = src.related;
+ }
+
+ resource.context = _context;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/DocumentReference"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR DomainResource resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function domainResource(type, props) {
+ const mappings = {
+ "DomainResource": domainResource_DomainResource
+ };
+
+ return mappings[type](props)
+}
+
+function domainResource_DomainResource(props) {
+ const resource = {
+ resourceType: "DomainResource",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/DomainResource"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Encounter resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function encounter(type, props) {
+ const mappings = {
+ "Encounter": encounter_Encounter
+ };
+
+ return mappings[type](props)
+}
+
+function encounter_Encounter(props) {
+ const resource = {
+ resourceType: "Encounter",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusHistory)) {
+ let src = props.statusHistory;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.statusHistory = [];
+
+ for (let item of src) {
+ let _statusHistory = {};
+
+ if (!_.isNil(item.id)) {
+ _statusHistory.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _statusHistory.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.status)) {
+ _statusHistory.status = item.status;
+ }
+
+ if (!_.isNil(item.period)) {
+ _statusHistory.period = item.period;
+ }
+
+ resource.statusHistory.push(_statusHistory);
+ }
+ }
+
+ if (!_.isNil(props.class)) {
+ resource.class = props.class;
+ }
+
+ if (!_.isNil(props.classHistory)) {
+ let src = props.classHistory;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.classHistory = [];
+
+ for (let item of src) {
+ let _classHistory = {};
+
+ if (!_.isNil(item.id)) {
+ _classHistory.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _classHistory.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.class)) {
+ _classHistory.class = item.class;
+ }
+
+ if (!_.isNil(item.period)) {
+ _classHistory.period = item.period;
+ }
+
+ resource.classHistory.push(_classHistory);
+ }
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.serviceType)) {
+ resource.serviceType = props.serviceType;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.episodeOfCare)) {
+ if (!Array.isArray(props.episodeOfCare)) { props.episodeOfCare = [props.episodeOfCare]; }
+ resource.episodeOfCare = util.reference(props.episodeOfCare);
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.participant)) {
+ let src = props.participant;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.participant = [];
+
+ for (let item of src) {
+ let _participant = {};
+
+ if (!_.isNil(item.id)) {
+ _participant.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _participant.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _participant.type = item.type;
+ }
+
+ if (!_.isNil(item.period)) {
+ _participant.period = item.period;
+ }
+
+ if (!_.isNil(item.individual)) {
+ _participant.individual = item.individual;
+ }
+
+ resource.participant.push(_participant);
+ }
+ }
+
+ if (!_.isNil(props.appointment)) {
+ if (!Array.isArray(props.appointment)) { props.appointment = [props.appointment]; }
+ resource.appointment = util.reference(props.appointment);
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.length)) {
+ resource.length = props.length;
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.diagnosis)) {
+ let src = props.diagnosis;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.diagnosis = [];
+
+ for (let item of src) {
+ let _diagnosis = {};
+
+ if (!_.isNil(item.id)) {
+ _diagnosis.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _diagnosis.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.condition)) {
+ _diagnosis.condition = item.condition;
+ }
+
+ if (!_.isNil(item.use)) {
+ _diagnosis.use = item.use;
+ }
+
+ if (!_.isNil(item.rank)) {
+ _diagnosis.rank = item.rank;
+ }
+
+ resource.diagnosis.push(_diagnosis);
+ }
+ }
+
+ if (!_.isNil(props.account)) {
+ if (!Array.isArray(props.account)) { props.account = [props.account]; }
+ resource.account = util.reference(props.account);
+ }
+
+ if (!_.isNil(props.hospitalization)) {
+ let src = props.hospitalization;
+ let _hospitalization = {};
+
+ if (!_.isNil(src.id)) {
+ _hospitalization.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _hospitalization.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.preAdmissionIdentifier)) {
+ _hospitalization.preAdmissionIdentifier = src.preAdmissionIdentifier;
+ }
+
+ if (!_.isNil(src.origin)) {
+ _hospitalization.origin = src.origin;
+ }
+
+ if (!_.isNil(src.admitSource)) {
+ _hospitalization.admitSource = src.admitSource;
+ }
+
+ if (!_.isNil(src.reAdmission)) {
+ _hospitalization.reAdmission = src.reAdmission;
+ }
+
+ if (!_.isNil(src.dietPreference)) {
+ _hospitalization.dietPreference = src.dietPreference;
+ }
+
+ if (!_.isNil(src.specialCourtesy)) {
+ _hospitalization.specialCourtesy = src.specialCourtesy;
+ }
+
+ if (!_.isNil(src.specialArrangement)) {
+ _hospitalization.specialArrangement = src.specialArrangement;
+ }
+
+ if (!_.isNil(src.destination)) {
+ _hospitalization.destination = src.destination;
+ }
+
+ if (!_.isNil(src.dischargeDisposition)) {
+ _hospitalization.dischargeDisposition = src.dischargeDisposition;
+ }
+
+ resource.hospitalization = _hospitalization;
+ }
+
+ if (!_.isNil(props.location)) {
+ let src = props.location;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.location = [];
+
+ for (let item of src) {
+ let _location = {};
+
+ if (!_.isNil(item.id)) {
+ _location.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _location.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.location)) {
+ _location.location = item.location;
+ }
+
+ if (!_.isNil(item.status)) {
+ _location.status = item.status;
+ }
+
+ if (!_.isNil(item.physicalType)) {
+ _location.physicalType = item.physicalType;
+ }
+
+ if (!_.isNil(item.period)) {
+ _location.period = item.period;
+ }
+
+ resource.location.push(_location);
+ }
+ }
+
+ if (!_.isNil(props.serviceProvider)) {
+ resource.serviceProvider = util.reference(props.serviceProvider);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Encounter"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Endpoint resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function endpoint(type, props) {
+ const mappings = {
+ "Endpoint": endpoint_Endpoint
+ };
+
+ return mappings[type](props)
+}
+
+function endpoint_Endpoint(props) {
+ const resource = {
+ resourceType: "Endpoint",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.connectionType)) {
+ resource.connectionType = props.connectionType;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.managingOrganization)) {
+ resource.managingOrganization = util.reference(props.managingOrganization);
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.payloadType)) {
+ resource.payloadType = props.payloadType;
+ }
+
+ if (!_.isNil(props.payloadMimeType)) {
+ resource.payloadMimeType = props.payloadMimeType;
+ }
+
+ if (!_.isNil(props.address)) {
+ resource.address = props.address;
+ }
+
+ if (!_.isNil(props.header)) {
+ resource.header = props.header;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Endpoint"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR EnrollmentRequest resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function enrollmentRequest(type, props) {
+ const mappings = {
+ "EnrollmentRequest": enrollmentRequest_EnrollmentRequest
+ };
+
+ return mappings[type](props)
+}
+
+function enrollmentRequest_EnrollmentRequest(props) {
+ const resource = {
+ resourceType: "EnrollmentRequest",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.insurer)) {
+ resource.insurer = util.reference(props.insurer);
+ }
+
+ if (!_.isNil(props.provider)) {
+ resource.provider = util.reference(props.provider);
+ }
+
+ if (!_.isNil(props.candidate)) {
+ resource.candidate = util.reference(props.candidate);
+ }
+
+ if (!_.isNil(props.coverage)) {
+ resource.coverage = util.reference(props.coverage);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/EnrollmentRequest"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR EnrollmentResponse resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function enrollmentResponse(type, props) {
+ const mappings = {
+ "EnrollmentResponse": enrollmentResponse_EnrollmentResponse
+ };
+
+ return mappings[type](props)
+}
+
+function enrollmentResponse_EnrollmentResponse(props) {
+ const resource = {
+ resourceType: "EnrollmentResponse",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.request)) {
+ resource.request = util.reference(props.request);
+ }
+
+ if (!_.isNil(props.outcome)) {
+ resource.outcome = props.outcome;
+ }
+
+ if (!_.isNil(props.disposition)) {
+ resource.disposition = props.disposition;
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.organization)) {
+ resource.organization = util.reference(props.organization);
+ }
+
+ if (!_.isNil(props.requestProvider)) {
+ resource.requestProvider = util.reference(props.requestProvider);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/EnrollmentResponse"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR EpisodeOfCare resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function episodeOfCare(type, props) {
+ const mappings = {
+ "EpisodeOfCare": episodeOfCare_EpisodeOfCare
+ };
+
+ return mappings[type](props)
+}
+
+function episodeOfCare_EpisodeOfCare(props) {
+ const resource = {
+ resourceType: "EpisodeOfCare",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusHistory)) {
+ let src = props.statusHistory;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.statusHistory = [];
+
+ for (let item of src) {
+ let _statusHistory = {};
+
+ if (!_.isNil(item.id)) {
+ _statusHistory.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _statusHistory.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.status)) {
+ _statusHistory.status = item.status;
+ }
+
+ if (!_.isNil(item.period)) {
+ _statusHistory.period = item.period;
+ }
+
+ resource.statusHistory.push(_statusHistory);
+ }
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.diagnosis)) {
+ let src = props.diagnosis;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.diagnosis = [];
+
+ for (let item of src) {
+ let _diagnosis = {};
+
+ if (!_.isNil(item.id)) {
+ _diagnosis.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _diagnosis.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.condition)) {
+ _diagnosis.condition = item.condition;
+ }
+
+ if (!_.isNil(item.role)) {
+ _diagnosis.role = item.role;
+ }
+
+ if (!_.isNil(item.rank)) {
+ _diagnosis.rank = item.rank;
+ }
+
+ resource.diagnosis.push(_diagnosis);
+ }
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.managingOrganization)) {
+ resource.managingOrganization = util.reference(props.managingOrganization);
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.referralRequest)) {
+ if (!Array.isArray(props.referralRequest)) { props.referralRequest = [props.referralRequest]; }
+ resource.referralRequest = util.reference(props.referralRequest);
+ }
+
+ if (!_.isNil(props.careManager)) {
+ resource.careManager = util.reference(props.careManager);
+ }
+
+ if (!_.isNil(props.team)) {
+ if (!Array.isArray(props.team)) { props.team = [props.team]; }
+ resource.team = util.reference(props.team);
+ }
+
+ if (!_.isNil(props.account)) {
+ if (!Array.isArray(props.account)) { props.account = [props.account]; }
+ resource.account = util.reference(props.account);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR EventDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function eventDefinition(type, props) {
+ const mappings = {
+ "EventDefinition": eventDefinition_EventDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function eventDefinition_EventDefinition(props) {
+ const resource = {
+ resourceType: "EventDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.subtitle)) {
+ resource.subtitle = props.subtitle;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.subject)) {
+ util.composite(resource, "subject", props.subject);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.usage)) {
+ resource.usage = props.usage;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.topic)) {
+ resource.topic = props.topic;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.trigger)) {
+ resource.trigger = props.trigger;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/EventDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Evidence resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function evidence(type, props) {
+ const mappings = {
+ "Evidence": evidence_Evidence
+ };
+
+ return mappings[type](props)
+}
+
+function evidence_Evidence(props) {
+ const resource = {
+ resourceType: "Evidence",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.citeAs)) {
+ util.composite(resource, "citeAs", props.citeAs);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.assertion)) {
+ resource.assertion = props.assertion;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.variableDefinition)) {
+ let src = props.variableDefinition;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.variableDefinition = [];
+
+ for (let item of src) {
+ let _variableDefinition = {};
+
+ if (!_.isNil(item.id)) {
+ _variableDefinition.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _variableDefinition.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _variableDefinition.description = item.description;
+ }
+
+ if (!_.isNil(item.note)) {
+ _variableDefinition.note = item.note;
+ }
+
+ if (!_.isNil(item.variableRole)) {
+ _variableDefinition.variableRole = item.variableRole;
+ }
+
+ if (!_.isNil(item.observed)) {
+ _variableDefinition.observed = item.observed;
+ }
+
+ if (!_.isNil(item.intended)) {
+ _variableDefinition.intended = item.intended;
+ }
+
+ if (!_.isNil(item.directnessMatch)) {
+ _variableDefinition.directnessMatch = item.directnessMatch;
+ }
+
+ resource.variableDefinition.push(_variableDefinition);
+ }
+ }
+
+ if (!_.isNil(props.synthesisType)) {
+ resource.synthesisType = props.synthesisType;
+ }
+
+ if (!_.isNil(props.studyType)) {
+ resource.studyType = props.studyType;
+ }
+
+ if (!_.isNil(props.statistic)) {
+ let src = props.statistic;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.statistic = [];
+
+ for (let item of src) {
+ let _statistic = {};
+
+ if (!_.isNil(item.id)) {
+ _statistic.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _statistic.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _statistic.description = item.description;
+ }
+
+ if (!_.isNil(item.note)) {
+ _statistic.note = item.note;
+ }
+
+ if (!_.isNil(item.statisticType)) {
+ _statistic.statisticType = item.statisticType;
+ }
+
+ if (!_.isNil(item.category)) {
+ _statistic.category = item.category;
+ }
+
+ if (!_.isNil(item.quantity)) {
+ _statistic.quantity = item.quantity;
+ }
+
+ if (!_.isNil(item.numberOfEvents)) {
+ _statistic.numberOfEvents = item.numberOfEvents;
+ }
+
+ if (!_.isNil(item.numberAffected)) {
+ _statistic.numberAffected = item.numberAffected;
+ }
+
+ if (!_.isNil(item.sampleSize)) {
+ _statistic.sampleSize = item.sampleSize;
+ }
+
+ if (!_.isNil(item.attributeEstimate)) {
+ _statistic.attributeEstimate = item.attributeEstimate;
+ }
+
+ if (!_.isNil(item.modelCharacteristic)) {
+ _statistic.modelCharacteristic = item.modelCharacteristic;
+ }
+
+ resource.statistic.push(_statistic);
+ }
+ }
+
+ if (!_.isNil(props.certainty)) {
+ let src = props.certainty;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.certainty = [];
+
+ for (let item of src) {
+ let _certainty = {};
+
+ if (!_.isNil(item.id)) {
+ _certainty.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _certainty.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _certainty.description = item.description;
+ }
+
+ if (!_.isNil(item.note)) {
+ _certainty.note = item.note;
+ }
+
+ if (!_.isNil(item.type)) {
+ _certainty.type = item.type;
+ }
+
+ if (!_.isNil(item.rating)) {
+ _certainty.rating = item.rating;
+ }
+
+ if (!_.isNil(item.rater)) {
+ _certainty.rater = item.rater;
+ }
+
+ resource.certainty.push(_certainty);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Evidence"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR EvidenceReport resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function evidenceReport(type, props) {
+ const mappings = {
+ "EvidenceReport": evidenceReport_EvidenceReport
+ };
+
+ return mappings[type](props)
+}
+
+function evidenceReport_EvidenceReport(props) {
+ const resource = {
+ resourceType: "EvidenceReport",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.relatedIdentifier)) {
+ if (!Array.isArray(props.relatedIdentifier)) { props.relatedIdentifier = [props.relatedIdentifier]; }
+ resource.relatedIdentifier = util.identifier(props.relatedIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.citeAs)) {
+ util.composite(resource, "citeAs", props.citeAs);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.subject)) {
+ let src = props.subject;
+ let _subject = {};
+
+ if (!_.isNil(src.id)) {
+ _subject.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _subject.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.characteristic)) {
+ _subject.characteristic = src.characteristic;
+ }
+
+ if (!_.isNil(src.note)) {
+ _subject.note = src.note;
+ }
+
+ resource.subject = _subject;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.relatesTo)) {
+ let src = props.relatesTo;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.relatesTo = [];
+
+ for (let item of src) {
+ let _relatesTo = {};
+
+ if (!_.isNil(item.id)) {
+ _relatesTo.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _relatesTo.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _relatesTo.code = item.code;
+ }
+
+ if (!_.isNil(item.target)) {
+ _relatesTo.target = item.target;
+ }
+
+ resource.relatesTo.push(_relatesTo);
+ }
+ }
+
+ if (!_.isNil(props.section)) {
+ let src = props.section;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.section = [];
+
+ for (let item of src) {
+ let _section = {};
+
+ if (!_.isNil(item.id)) {
+ _section.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _section.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.title)) {
+ _section.title = item.title;
+ }
+
+ if (!_.isNil(item.focus)) {
+ _section.focus = item.focus;
+ }
+
+ if (!_.isNil(item.focusReference)) {
+ _section.focusReference = item.focusReference;
+ }
+
+ if (!_.isNil(item.author)) {
+ _section.author = item.author;
+ }
+
+ if (!_.isNil(item.text)) {
+ _section.text = item.text;
+ }
+
+ if (!_.isNil(item.mode)) {
+ _section.mode = item.mode;
+ }
+
+ if (!_.isNil(item.orderedBy)) {
+ _section.orderedBy = item.orderedBy;
+ }
+
+ if (!_.isNil(item.entryClassifier)) {
+ _section.entryClassifier = item.entryClassifier;
+ }
+
+ if (!_.isNil(item.entryReference)) {
+ _section.entryReference = item.entryReference;
+ }
+
+ if (!_.isNil(item.entryQuantity)) {
+ _section.entryQuantity = item.entryQuantity;
+ }
+
+ if (!_.isNil(item.emptyReason)) {
+ _section.emptyReason = item.emptyReason;
+ }
+
+ resource.section.push(_section);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/EvidenceReport"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR EvidenceVariable resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function evidenceVariable(type, props) {
+ const mappings = {
+ "EvidenceVariable": evidenceVariable_EvidenceVariable
+ };
+
+ return mappings[type](props)
+}
+
+function evidenceVariable_EvidenceVariable(props) {
+ const resource = {
+ resourceType: "EvidenceVariable",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.shortTitle)) {
+ resource.shortTitle = props.shortTitle;
+ }
+
+ if (!_.isNil(props.subtitle)) {
+ resource.subtitle = props.subtitle;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.actual)) {
+ resource.actual = props.actual;
+ }
+
+ if (!_.isNil(props.characteristicCombination)) {
+ resource.characteristicCombination = props.characteristicCombination;
+ }
+
+ if (!_.isNil(props.characteristic)) {
+ let src = props.characteristic;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.characteristic = [];
+
+ for (let item of src) {
+ let _characteristic = {};
+
+ if (!_.isNil(item.id)) {
+ _characteristic.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _characteristic.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _characteristic.description = item.description;
+ }
+
+ if (!_.isNil(item.definition)) {
+ _characteristic.definition = item.definition;
+ }
+
+ if (!_.isNil(item.method)) {
+ _characteristic.method = item.method;
+ }
+
+ if (!_.isNil(item.device)) {
+ _characteristic.device = item.device;
+ }
+
+ if (!_.isNil(item.exclude)) {
+ _characteristic.exclude = item.exclude;
+ }
+
+ if (!_.isNil(item.timeFromStart)) {
+ _characteristic.timeFromStart = item.timeFromStart;
+ }
+
+ if (!_.isNil(item.groupMeasure)) {
+ _characteristic.groupMeasure = item.groupMeasure;
+ }
+
+ resource.characteristic.push(_characteristic);
+ }
+ }
+
+ if (!_.isNil(props.handling)) {
+ resource.handling = props.handling;
+ }
+
+ if (!_.isNil(props.category)) {
+ let src = props.category;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.category = [];
+
+ for (let item of src) {
+ let _category = {};
+
+ if (!_.isNil(item.id)) {
+ _category.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _category.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _category.name = item.name;
+ }
+
+ if (!_.isNil(item.value)) {
+ _category.value = item.value;
+ }
+
+ resource.category.push(_category);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/EvidenceVariable"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ExampleScenario resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function exampleScenario(type, props) {
+ const mappings = {
+ "ExampleScenario": exampleScenario_ExampleScenario
+ };
+
+ return mappings[type](props)
+}
+
+function exampleScenario_ExampleScenario(props) {
+ const resource = {
+ resourceType: "ExampleScenario",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.actor)) {
+ let src = props.actor;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.actor = [];
+
+ for (let item of src) {
+ let _actor = {};
+
+ if (!_.isNil(item.id)) {
+ _actor.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _actor.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.actorId)) {
+ _actor.actorId = item.actorId;
+ }
+
+ if (!_.isNil(item.type)) {
+ _actor.type = item.type;
+ }
+
+ if (!_.isNil(item.name)) {
+ _actor.name = item.name;
+ }
+
+ if (!_.isNil(item.description)) {
+ _actor.description = item.description;
+ }
+
+ resource.actor.push(_actor);
+ }
+ }
+
+ if (!_.isNil(props.instance)) {
+ let src = props.instance;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.instance = [];
+
+ for (let item of src) {
+ let _instance = {};
+
+ if (!_.isNil(item.id)) {
+ _instance.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _instance.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.resourceId)) {
+ _instance.resourceId = item.resourceId;
+ }
+
+ if (!_.isNil(item.resourceType)) {
+ _instance.resourceType = item.resourceType;
+ }
+
+ if (!_.isNil(item.name)) {
+ _instance.name = item.name;
+ }
+
+ if (!_.isNil(item.description)) {
+ _instance.description = item.description;
+ }
+
+ if (!_.isNil(item.version)) {
+ _instance.version = item.version;
+ }
+
+ if (!_.isNil(item.containedInstance)) {
+ _instance.containedInstance = item.containedInstance;
+ }
+
+ resource.instance.push(_instance);
+ }
+ }
+
+ if (!_.isNil(props.process)) {
+ let src = props.process;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.process = [];
+
+ for (let item of src) {
+ let _process = {};
+
+ if (!_.isNil(item.id)) {
+ _process.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _process.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.title)) {
+ _process.title = item.title;
+ }
+
+ if (!_.isNil(item.description)) {
+ _process.description = item.description;
+ }
+
+ if (!_.isNil(item.preConditions)) {
+ _process.preConditions = item.preConditions;
+ }
+
+ if (!_.isNil(item.postConditions)) {
+ _process.postConditions = item.postConditions;
+ }
+
+ if (!_.isNil(item.step)) {
+ _process.step = item.step;
+ }
+
+ resource.process.push(_process);
+ }
+ }
+
+ if (!_.isNil(props.workflow)) {
+ resource.workflow = props.workflow;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ExampleScenario"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ExplanationOfBenefit resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function explanationOfBenefit(type, props) {
+ const mappings = {
+ "ExplanationOfBenefit": explanationOfBenefit_ExplanationOfBenefit
+ };
+
+ return mappings[type](props)
+}
+
+function explanationOfBenefit_ExplanationOfBenefit(props) {
+ const resource = {
+ resourceType: "ExplanationOfBenefit",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.subType)) {
+ resource.subType = props.subType;
+ }
+
+ if (!_.isNil(props.use)) {
+ resource.use = props.use;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.billablePeriod)) {
+ resource.billablePeriod = props.billablePeriod;
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.enterer)) {
+ resource.enterer = util.reference(props.enterer);
+ }
+
+ if (!_.isNil(props.insurer)) {
+ resource.insurer = util.reference(props.insurer);
+ }
+
+ if (!_.isNil(props.provider)) {
+ resource.provider = util.reference(props.provider);
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.fundsReserveRequested)) {
+ resource.fundsReserveRequested = props.fundsReserveRequested;
+ }
+
+ if (!_.isNil(props.fundsReserve)) {
+ resource.fundsReserve = props.fundsReserve;
+ }
+
+ if (!_.isNil(props.related)) {
+ let src = props.related;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.related = [];
+
+ for (let item of src) {
+ let _related = {};
+
+ if (!_.isNil(item.id)) {
+ _related.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _related.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.claim)) {
+ _related.claim = item.claim;
+ }
+
+ if (!_.isNil(item.relationship)) {
+ _related.relationship = item.relationship;
+ }
+
+ if (!_.isNil(item.reference)) {
+ _related.reference = item.reference;
+ }
+
+ resource.related.push(_related);
+ }
+ }
+
+ if (!_.isNil(props.prescription)) {
+ resource.prescription = util.reference(props.prescription);
+ }
+
+ if (!_.isNil(props.originalPrescription)) {
+ resource.originalPrescription = util.reference(props.originalPrescription);
+ }
+
+ if (!_.isNil(props.payee)) {
+ let src = props.payee;
+ let _payee = {};
+
+ if (!_.isNil(src.id)) {
+ _payee.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _payee.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.type)) {
+ _payee.type = src.type;
+ }
+
+ if (!_.isNil(src.party)) {
+ _payee.party = src.party;
+ }
+
+ resource.payee = _payee;
+ }
+
+ if (!_.isNil(props.referral)) {
+ resource.referral = util.reference(props.referral);
+ }
+
+ if (!_.isNil(props.facility)) {
+ resource.facility = util.reference(props.facility);
+ }
+
+ if (!_.isNil(props.claim)) {
+ resource.claim = util.reference(props.claim);
+ }
+
+ if (!_.isNil(props.claimResponse)) {
+ resource.claimResponse = util.reference(props.claimResponse);
+ }
+
+ if (!_.isNil(props.outcome)) {
+ resource.outcome = props.outcome;
+ }
+
+ if (!_.isNil(props.disposition)) {
+ resource.disposition = props.disposition;
+ }
+
+ if (!_.isNil(props.preAuthRef)) {
+ resource.preAuthRef = props.preAuthRef;
+ }
+
+ if (!_.isNil(props.preAuthRefPeriod)) {
+ resource.preAuthRefPeriod = props.preAuthRefPeriod;
+ }
+
+ if (!_.isNil(props.careTeam)) {
+ let src = props.careTeam;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.careTeam = [];
+
+ for (let item of src) {
+ let _careTeam = {};
+
+ if (!_.isNil(item.id)) {
+ _careTeam.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _careTeam.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _careTeam.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.provider)) {
+ _careTeam.provider = item.provider;
+ }
+
+ if (!_.isNil(item.responsible)) {
+ _careTeam.responsible = item.responsible;
+ }
+
+ if (!_.isNil(item.role)) {
+ _careTeam.role = item.role;
+ }
+
+ if (!_.isNil(item.qualification)) {
+ _careTeam.qualification = item.qualification;
+ }
+
+ resource.careTeam.push(_careTeam);
+ }
+ }
+
+ if (!_.isNil(props.supportingInfo)) {
+ let src = props.supportingInfo;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.supportingInfo = [];
+
+ for (let item of src) {
+ let _supportingInfo = {};
+
+ if (!_.isNil(item.id)) {
+ _supportingInfo.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _supportingInfo.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _supportingInfo.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.category)) {
+ _supportingInfo.category = item.category;
+ }
+
+ if (!_.isNil(item.code)) {
+ _supportingInfo.code = item.code;
+ }
+
+ if (!_.isNil(item.timing)) {
+ _supportingInfo.timing = item.timing;
+ }
+
+ if (!_.isNil(item.value)) {
+ _supportingInfo.value = item.value;
+ }
+
+ if (!_.isNil(item.reason)) {
+ _supportingInfo.reason = item.reason;
+ }
+
+ resource.supportingInfo.push(_supportingInfo);
+ }
+ }
+
+ if (!_.isNil(props.diagnosis)) {
+ let src = props.diagnosis;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.diagnosis = [];
+
+ for (let item of src) {
+ let _diagnosis = {};
+
+ if (!_.isNil(item.id)) {
+ _diagnosis.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _diagnosis.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _diagnosis.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.diagnosis)) {
+ _diagnosis.diagnosis = item.diagnosis;
+ }
+
+ if (!_.isNil(item.type)) {
+ _diagnosis.type = item.type;
+ }
+
+ if (!_.isNil(item.onAdmission)) {
+ _diagnosis.onAdmission = item.onAdmission;
+ }
+
+ if (!_.isNil(item.packageCode)) {
+ _diagnosis.packageCode = item.packageCode;
+ }
+
+ resource.diagnosis.push(_diagnosis);
+ }
+ }
+
+ if (!_.isNil(props.procedure)) {
+ let src = props.procedure;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.procedure = [];
+
+ for (let item of src) {
+ let _procedure = {};
+
+ if (!_.isNil(item.id)) {
+ _procedure.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _procedure.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _procedure.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.type)) {
+ _procedure.type = item.type;
+ }
+
+ if (!_.isNil(item.date)) {
+ _procedure.date = item.date;
+ }
+
+ if (!_.isNil(item.procedure)) {
+ _procedure.procedure = item.procedure;
+ }
+
+ if (!_.isNil(item.udi)) {
+ _procedure.udi = item.udi;
+ }
+
+ resource.procedure.push(_procedure);
+ }
+ }
+
+ if (!_.isNil(props.precedence)) {
+ resource.precedence = props.precedence;
+ }
+
+ if (!_.isNil(props.insurance)) {
+ let src = props.insurance;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.insurance = [];
+
+ for (let item of src) {
+ let _insurance = {};
+
+ if (!_.isNil(item.id)) {
+ _insurance.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _insurance.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.focal)) {
+ _insurance.focal = item.focal;
+ }
+
+ if (!_.isNil(item.coverage)) {
+ _insurance.coverage = item.coverage;
+ }
+
+ if (!_.isNil(item.preAuthRef)) {
+ _insurance.preAuthRef = item.preAuthRef;
+ }
+
+ resource.insurance.push(_insurance);
+ }
+ }
+
+ if (!_.isNil(props.accident)) {
+ let src = props.accident;
+ let _accident = {};
+
+ if (!_.isNil(src.id)) {
+ _accident.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _accident.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.date)) {
+ _accident.date = src.date;
+ }
+
+ if (!_.isNil(src.type)) {
+ _accident.type = src.type;
+ }
+
+ if (!_.isNil(src.location)) {
+ _accident.location = src.location;
+ }
+
+ resource.accident = _accident;
+ }
+
+ if (!_.isNil(props.item)) {
+ let src = props.item;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.item = [];
+
+ for (let item of src) {
+ let _item = {};
+
+ if (!_.isNil(item.id)) {
+ _item.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _item.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _item.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.careTeamSequence)) {
+ _item.careTeamSequence = item.careTeamSequence;
+ }
+
+ if (!_.isNil(item.diagnosisSequence)) {
+ _item.diagnosisSequence = item.diagnosisSequence;
+ }
+
+ if (!_.isNil(item.procedureSequence)) {
+ _item.procedureSequence = item.procedureSequence;
+ }
+
+ if (!_.isNil(item.informationSequence)) {
+ _item.informationSequence = item.informationSequence;
+ }
+
+ if (!_.isNil(item.revenue)) {
+ _item.revenue = item.revenue;
+ }
+
+ if (!_.isNil(item.category)) {
+ _item.category = item.category;
+ }
+
+ if (!_.isNil(item.productOrService)) {
+ _item.productOrService = item.productOrService;
+ }
+
+ if (!_.isNil(item.modifier)) {
+ _item.modifier = item.modifier;
+ }
+
+ if (!_.isNil(item.programCode)) {
+ _item.programCode = item.programCode;
+ }
+
+ if (!_.isNil(item.serviced)) {
+ _item.serviced = item.serviced;
+ }
+
+ if (!_.isNil(item.location)) {
+ _item.location = item.location;
+ }
+
+ if (!_.isNil(item.quantity)) {
+ _item.quantity = item.quantity;
+ }
+
+ if (!_.isNil(item.unitPrice)) {
+ _item.unitPrice = item.unitPrice;
+ }
+
+ if (!_.isNil(item.factor)) {
+ _item.factor = item.factor;
+ }
+
+ if (!_.isNil(item.net)) {
+ _item.net = item.net;
+ }
+
+ if (!_.isNil(item.udi)) {
+ _item.udi = item.udi;
+ }
+
+ if (!_.isNil(item.bodySite)) {
+ _item.bodySite = item.bodySite;
+ }
+
+ if (!_.isNil(item.subSite)) {
+ _item.subSite = item.subSite;
+ }
+
+ if (!_.isNil(item.encounter)) {
+ _item.encounter = item.encounter;
+ }
+
+ if (!_.isNil(item.noteNumber)) {
+ _item.noteNumber = item.noteNumber;
+ }
+
+ if (!_.isNil(item.adjudication)) {
+ _item.adjudication = item.adjudication;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _item.detail = item.detail;
+ }
+
+ resource.item.push(_item);
+ }
+ }
+
+ if (!_.isNil(props.addItem)) {
+ let src = props.addItem;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.addItem = [];
+
+ for (let item of src) {
+ let _addItem = {};
+
+ if (!_.isNil(item.id)) {
+ _addItem.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _addItem.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.itemSequence)) {
+ _addItem.itemSequence = item.itemSequence;
+ }
+
+ if (!_.isNil(item.detailSequence)) {
+ _addItem.detailSequence = item.detailSequence;
+ }
+
+ if (!_.isNil(item.subDetailSequence)) {
+ _addItem.subDetailSequence = item.subDetailSequence;
+ }
+
+ if (!_.isNil(item.provider)) {
+ _addItem.provider = item.provider;
+ }
+
+ if (!_.isNil(item.productOrService)) {
+ _addItem.productOrService = item.productOrService;
+ }
+
+ if (!_.isNil(item.modifier)) {
+ _addItem.modifier = item.modifier;
+ }
+
+ if (!_.isNil(item.programCode)) {
+ _addItem.programCode = item.programCode;
+ }
+
+ if (!_.isNil(item.serviced)) {
+ _addItem.serviced = item.serviced;
+ }
+
+ if (!_.isNil(item.location)) {
+ _addItem.location = item.location;
+ }
+
+ if (!_.isNil(item.quantity)) {
+ _addItem.quantity = item.quantity;
+ }
+
+ if (!_.isNil(item.unitPrice)) {
+ _addItem.unitPrice = item.unitPrice;
+ }
+
+ if (!_.isNil(item.factor)) {
+ _addItem.factor = item.factor;
+ }
+
+ if (!_.isNil(item.net)) {
+ _addItem.net = item.net;
+ }
+
+ if (!_.isNil(item.bodySite)) {
+ _addItem.bodySite = item.bodySite;
+ }
+
+ if (!_.isNil(item.subSite)) {
+ _addItem.subSite = item.subSite;
+ }
+
+ if (!_.isNil(item.noteNumber)) {
+ _addItem.noteNumber = item.noteNumber;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _addItem.detail = item.detail;
+ }
+
+ resource.addItem.push(_addItem);
+ }
+ }
+
+ if (!_.isNil(props.adjudication)) {
+ resource.adjudication = props.adjudication;
+ }
+
+ if (!_.isNil(props.total)) {
+ let src = props.total;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.total = [];
+
+ for (let item of src) {
+ let _total = {};
+
+ if (!_.isNil(item.id)) {
+ _total.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _total.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.category)) {
+ _total.category = item.category;
+ }
+
+ if (!_.isNil(item.amount)) {
+ _total.amount = item.amount;
+ }
+
+ resource.total.push(_total);
+ }
+ }
+
+ if (!_.isNil(props.payment)) {
+ let src = props.payment;
+ let _payment = {};
+
+ if (!_.isNil(src.id)) {
+ _payment.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _payment.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.type)) {
+ _payment.type = src.type;
+ }
+
+ if (!_.isNil(src.adjustment)) {
+ _payment.adjustment = src.adjustment;
+ }
+
+ if (!_.isNil(src.adjustmentReason)) {
+ _payment.adjustmentReason = src.adjustmentReason;
+ }
+
+ if (!_.isNil(src.date)) {
+ _payment.date = src.date;
+ }
+
+ if (!_.isNil(src.amount)) {
+ _payment.amount = src.amount;
+ }
+
+ if (!_.isNil(src.identifier)) {
+ _payment.identifier = src.identifier;
+ }
+
+ resource.payment = _payment;
+ }
+
+ if (!_.isNil(props.formCode)) {
+ resource.formCode = props.formCode;
+ }
+
+ if (!_.isNil(props.form)) {
+ resource.form = props.form;
+ }
+
+ if (!_.isNil(props.processNote)) {
+ let src = props.processNote;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.processNote = [];
+
+ for (let item of src) {
+ let _processNote = {};
+
+ if (!_.isNil(item.id)) {
+ _processNote.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _processNote.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.number)) {
+ _processNote.number = item.number;
+ }
+
+ if (!_.isNil(item.type)) {
+ _processNote.type = item.type;
+ }
+
+ if (!_.isNil(item.text)) {
+ _processNote.text = item.text;
+ }
+
+ if (!_.isNil(item.language)) {
+ _processNote.language = item.language;
+ }
+
+ resource.processNote.push(_processNote);
+ }
+ }
+
+ if (!_.isNil(props.benefitPeriod)) {
+ resource.benefitPeriod = props.benefitPeriod;
+ }
+
+ if (!_.isNil(props.benefitBalance)) {
+ let src = props.benefitBalance;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.benefitBalance = [];
+
+ for (let item of src) {
+ let _benefitBalance = {};
+
+ if (!_.isNil(item.id)) {
+ _benefitBalance.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _benefitBalance.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.category)) {
+ _benefitBalance.category = item.category;
+ }
+
+ if (!_.isNil(item.excluded)) {
+ _benefitBalance.excluded = item.excluded;
+ }
+
+ if (!_.isNil(item.name)) {
+ _benefitBalance.name = item.name;
+ }
+
+ if (!_.isNil(item.description)) {
+ _benefitBalance.description = item.description;
+ }
+
+ if (!_.isNil(item.network)) {
+ _benefitBalance.network = item.network;
+ }
+
+ if (!_.isNil(item.unit)) {
+ _benefitBalance.unit = item.unit;
+ }
+
+ if (!_.isNil(item.term)) {
+ _benefitBalance.term = item.term;
+ }
+
+ if (!_.isNil(item.financial)) {
+ _benefitBalance.financial = item.financial;
+ }
+
+ resource.benefitBalance.push(_benefitBalance);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR FamilyMemberHistory resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function familyMemberHistory(type, props) {
+ const mappings = {
+ "FamilyMemberHistory": familyMemberHistory_FamilyMemberHistory
+ };
+
+ return mappings[type](props)
+}
+
+function familyMemberHistory_FamilyMemberHistory(props) {
+ const resource = {
+ resourceType: "FamilyMemberHistory",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = props.instantiatesCanonical;
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.dataAbsentReason)) {
+ resource.dataAbsentReason = props.dataAbsentReason;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.relationship)) {
+ resource.relationship = props.relationship;
+ }
+
+ if (!_.isNil(props.sex)) {
+ resource.sex = props.sex;
+ }
+
+ if (!_.isNil(props.born)) {
+ util.composite(resource, "born", props.born);
+ }
+
+ if (!_.isNil(props.age)) {
+ util.composite(resource, "age", props.age);
+ }
+
+ if (!_.isNil(props.estimatedAge)) {
+ resource.estimatedAge = props.estimatedAge;
+ }
+
+ if (!_.isNil(props.deceased)) {
+ util.composite(resource, "deceased", props.deceased);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.condition)) {
+ let src = props.condition;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.condition = [];
+
+ for (let item of src) {
+ let _condition = {};
+
+ if (!_.isNil(item.id)) {
+ _condition.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _condition.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _condition.code = item.code;
+ }
+
+ if (!_.isNil(item.outcome)) {
+ _condition.outcome = item.outcome;
+ }
+
+ if (!_.isNil(item.contributedToDeath)) {
+ _condition.contributedToDeath = item.contributedToDeath;
+ }
+
+ if (!_.isNil(item.onset)) {
+ _condition.onset = item.onset;
+ }
+
+ if (!_.isNil(item.note)) {
+ _condition.note = item.note;
+ }
+
+ resource.condition.push(_condition);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Flag resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function flag(type, props) {
+ const mappings = {
+ "Flag": flag_Flag
+ };
+
+ return mappings[type](props)
+}
+
+function flag_Flag(props) {
+ const resource = {
+ resourceType: "Flag",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = util.reference(props.author);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Flag"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Goal resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function goal(type, props) {
+ const mappings = {
+ "Goal": goal_Goal
+ };
+
+ return mappings[type](props)
+}
+
+function goal_Goal(props) {
+ const resource = {
+ resourceType: "Goal",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.lifecycleStatus)) {
+ resource.lifecycleStatus = props.lifecycleStatus;
+ }
+
+ if (!_.isNil(props.achievementStatus)) {
+ resource.achievementStatus = props.achievementStatus;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.start)) {
+ util.composite(resource, "start", props.start);
+ }
+
+ if (!_.isNil(props.target)) {
+ let src = props.target;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.target = [];
+
+ for (let item of src) {
+ let _target = {};
+
+ if (!_.isNil(item.id)) {
+ _target.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _target.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.measure)) {
+ _target.measure = item.measure;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _target.detail = item.detail;
+ }
+
+ if (!_.isNil(item.due)) {
+ _target.due = item.due;
+ }
+
+ resource.target.push(_target);
+ }
+ }
+
+ if (!_.isNil(props.statusDate)) {
+ resource.statusDate = props.statusDate;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.expressedBy)) {
+ resource.expressedBy = util.reference(props.expressedBy);
+ }
+
+ if (!_.isNil(props.addresses)) {
+ if (!Array.isArray(props.addresses)) { props.addresses = [props.addresses]; }
+ resource.addresses = util.reference(props.addresses);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.outcomeCode)) {
+ resource.outcomeCode = props.outcomeCode;
+ }
+
+ if (!_.isNil(props.outcomeReference)) {
+ if (!Array.isArray(props.outcomeReference)) { props.outcomeReference = [props.outcomeReference]; }
+ resource.outcomeReference = util.reference(props.outcomeReference);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Goal"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR GraphDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function graphDefinition(type, props) {
+ const mappings = {
+ "GraphDefinition": graphDefinition_GraphDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function graphDefinition_GraphDefinition(props) {
+ const resource = {
+ resourceType: "GraphDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.start)) {
+ resource.start = props.start;
+ }
+
+ if (!_.isNil(props.profile)) {
+ resource.profile = props.profile;
+ }
+
+ if (!_.isNil(props.link)) {
+ let src = props.link;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.link = [];
+
+ for (let item of src) {
+ let _link = {};
+
+ if (!_.isNil(item.id)) {
+ _link.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _link.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.path)) {
+ _link.path = item.path;
+ }
+
+ if (!_.isNil(item.sliceName)) {
+ _link.sliceName = item.sliceName;
+ }
+
+ if (!_.isNil(item.min)) {
+ _link.min = item.min;
+ }
+
+ if (!_.isNil(item.max)) {
+ _link.max = item.max;
+ }
+
+ if (!_.isNil(item.description)) {
+ _link.description = item.description;
+ }
+
+ if (!_.isNil(item.target)) {
+ _link.target = item.target;
+ }
+
+ resource.link.push(_link);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/GraphDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Group resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function group(type, props) {
+ const mappings = {
+ "Group": group_Group
+ };
+
+ return mappings[type](props)
+}
+
+function group_Group(props) {
+ const resource = {
+ resourceType: "Group",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.actual)) {
+ resource.actual = props.actual;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.quantity)) {
+ resource.quantity = props.quantity;
+ }
+
+ if (!_.isNil(props.managingEntity)) {
+ resource.managingEntity = util.reference(props.managingEntity);
+ }
+
+ if (!_.isNil(props.characteristic)) {
+ let src = props.characteristic;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.characteristic = [];
+
+ for (let item of src) {
+ let _characteristic = {};
+
+ if (!_.isNil(item.id)) {
+ _characteristic.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _characteristic.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _characteristic.code = item.code;
+ }
+
+ if (!_.isNil(item.value)) {
+ _characteristic.value = item.value;
+ }
+
+ if (!_.isNil(item.exclude)) {
+ _characteristic.exclude = item.exclude;
+ }
+
+ if (!_.isNil(item.period)) {
+ _characteristic.period = item.period;
+ }
+
+ resource.characteristic.push(_characteristic);
+ }
+ }
+
+ if (!_.isNil(props.member)) {
+ let src = props.member;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.member = [];
+
+ for (let item of src) {
+ let _member = {};
+
+ if (!_.isNil(item.id)) {
+ _member.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _member.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.entity)) {
+ _member.entity = item.entity;
+ }
+
+ if (!_.isNil(item.period)) {
+ _member.period = item.period;
+ }
+
+ if (!_.isNil(item.inactive)) {
+ _member.inactive = item.inactive;
+ }
+
+ resource.member.push(_member);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Group"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR GuidanceResponse resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function guidanceResponse(type, props) {
+ const mappings = {
+ "GuidanceResponse": guidanceResponse_GuidanceResponse
+ };
+
+ return mappings[type](props)
+}
+
+function guidanceResponse_GuidanceResponse(props) {
+ const resource = {
+ resourceType: "GuidanceResponse",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.requestIdentifier)) {
+ resource.requestIdentifier = util.identifier(props.requestIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.module)) {
+ util.composite(resource, "module", props.module);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.occurrenceDateTime)) {
+ resource.occurrenceDateTime = props.occurrenceDateTime;
+ }
+
+ if (!_.isNil(props.performer)) {
+ resource.performer = util.reference(props.performer);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.evaluationMessage)) {
+ if (!Array.isArray(props.evaluationMessage)) { props.evaluationMessage = [props.evaluationMessage]; }
+ resource.evaluationMessage = util.reference(props.evaluationMessage);
+ }
+
+ if (!_.isNil(props.outputParameters)) {
+ resource.outputParameters = util.reference(props.outputParameters);
+ }
+
+ if (!_.isNil(props.result)) {
+ resource.result = util.reference(props.result);
+ }
+
+ if (!_.isNil(props.dataRequirement)) {
+ resource.dataRequirement = props.dataRequirement;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/GuidanceResponse"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR HealthcareService resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function healthcareService(type, props) {
+ const mappings = {
+ "HealthcareService": healthcareService_HealthcareService
+ };
+
+ return mappings[type](props)
+}
+
+function healthcareService_HealthcareService(props) {
+ const resource = {
+ resourceType: "HealthcareService",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.providedBy)) {
+ resource.providedBy = util.reference(props.providedBy);
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.specialty)) {
+ resource.specialty = props.specialty;
+ }
+
+ if (!_.isNil(props.location)) {
+ if (!Array.isArray(props.location)) { props.location = [props.location]; }
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.comment)) {
+ resource.comment = props.comment;
+ }
+
+ if (!_.isNil(props.extraDetails)) {
+ resource.extraDetails = props.extraDetails;
+ }
+
+ if (!_.isNil(props.photo)) {
+ resource.photo = props.photo;
+ }
+
+ if (!_.isNil(props.telecom)) {
+ resource.telecom = props.telecom;
+ }
+
+ if (!_.isNil(props.coverageArea)) {
+ if (!Array.isArray(props.coverageArea)) { props.coverageArea = [props.coverageArea]; }
+ resource.coverageArea = util.reference(props.coverageArea);
+ }
+
+ if (!_.isNil(props.serviceProvisionCode)) {
+ resource.serviceProvisionCode = props.serviceProvisionCode;
+ }
+
+ if (!_.isNil(props.eligibility)) {
+ let src = props.eligibility;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.eligibility = [];
+
+ for (let item of src) {
+ let _eligibility = {};
+
+ if (!_.isNil(item.id)) {
+ _eligibility.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _eligibility.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _eligibility.code = item.code;
+ }
+
+ if (!_.isNil(item.comment)) {
+ _eligibility.comment = item.comment;
+ }
+
+ resource.eligibility.push(_eligibility);
+ }
+ }
+
+ if (!_.isNil(props.program)) {
+ resource.program = props.program;
+ }
+
+ if (!_.isNil(props.characteristic)) {
+ resource.characteristic = props.characteristic;
+ }
+
+ if (!_.isNil(props.communication)) {
+ resource.communication = props.communication;
+ }
+
+ if (!_.isNil(props.referralMethod)) {
+ resource.referralMethod = props.referralMethod;
+ }
+
+ if (!_.isNil(props.appointmentRequired)) {
+ resource.appointmentRequired = props.appointmentRequired;
+ }
+
+ if (!_.isNil(props.availableTime)) {
+ let src = props.availableTime;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.availableTime = [];
+
+ for (let item of src) {
+ let _availableTime = {};
+
+ if (!_.isNil(item.id)) {
+ _availableTime.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _availableTime.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.daysOfWeek)) {
+ _availableTime.daysOfWeek = item.daysOfWeek;
+ }
+
+ if (!_.isNil(item.allDay)) {
+ _availableTime.allDay = item.allDay;
+ }
+
+ if (!_.isNil(item.availableStartTime)) {
+ _availableTime.availableStartTime = item.availableStartTime;
+ }
+
+ if (!_.isNil(item.availableEndTime)) {
+ _availableTime.availableEndTime = item.availableEndTime;
+ }
+
+ resource.availableTime.push(_availableTime);
+ }
+ }
+
+ if (!_.isNil(props.notAvailable)) {
+ let src = props.notAvailable;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.notAvailable = [];
+
+ for (let item of src) {
+ let _notAvailable = {};
+
+ if (!_.isNil(item.id)) {
+ _notAvailable.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _notAvailable.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _notAvailable.description = item.description;
+ }
+
+ if (!_.isNil(item.during)) {
+ _notAvailable.during = item.during;
+ }
+
+ resource.notAvailable.push(_notAvailable);
+ }
+ }
+
+ if (!_.isNil(props.availabilityExceptions)) {
+ resource.availabilityExceptions = props.availabilityExceptions;
+ }
+
+ if (!_.isNil(props.endpoint)) {
+ if (!Array.isArray(props.endpoint)) { props.endpoint = [props.endpoint]; }
+ resource.endpoint = util.reference(props.endpoint);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/HealthcareService"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ImagingStudy resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function imagingStudy(type, props) {
+ const mappings = {
+ "ImagingStudy": imagingStudy_ImagingStudy
+ };
+
+ return mappings[type](props)
+}
+
+function imagingStudy_ImagingStudy(props) {
+ const resource = {
+ resourceType: "ImagingStudy",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.modality)) {
+ resource.modality = props.modality;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.started)) {
+ resource.started = props.started;
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.referrer)) {
+ resource.referrer = util.reference(props.referrer);
+ }
+
+ if (!_.isNil(props.interpreter)) {
+ if (!Array.isArray(props.interpreter)) { props.interpreter = [props.interpreter]; }
+ resource.interpreter = util.reference(props.interpreter);
+ }
+
+ if (!_.isNil(props.endpoint)) {
+ if (!Array.isArray(props.endpoint)) { props.endpoint = [props.endpoint]; }
+ resource.endpoint = util.reference(props.endpoint);
+ }
+
+ if (!_.isNil(props.numberOfSeries)) {
+ resource.numberOfSeries = props.numberOfSeries;
+ }
+
+ if (!_.isNil(props.numberOfInstances)) {
+ resource.numberOfInstances = props.numberOfInstances;
+ }
+
+ if (!_.isNil(props.procedureReference)) {
+ resource.procedureReference = util.reference(props.procedureReference);
+ }
+
+ if (!_.isNil(props.procedureCode)) {
+ resource.procedureCode = props.procedureCode;
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.series)) {
+ let src = props.series;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.series = [];
+
+ for (let item of src) {
+ let _series = {};
+
+ if (!_.isNil(item.id)) {
+ _series.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _series.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.uid)) {
+ _series.uid = item.uid;
+ }
+
+ if (!_.isNil(item.number)) {
+ _series.number = item.number;
+ }
+
+ if (!_.isNil(item.modality)) {
+ _series.modality = item.modality;
+ }
+
+ if (!_.isNil(item.description)) {
+ _series.description = item.description;
+ }
+
+ if (!_.isNil(item.numberOfInstances)) {
+ _series.numberOfInstances = item.numberOfInstances;
+ }
+
+ if (!_.isNil(item.endpoint)) {
+ _series.endpoint = item.endpoint;
+ }
+
+ if (!_.isNil(item.bodySite)) {
+ _series.bodySite = item.bodySite;
+ }
+
+ if (!_.isNil(item.laterality)) {
+ _series.laterality = item.laterality;
+ }
+
+ if (!_.isNil(item.specimen)) {
+ _series.specimen = item.specimen;
+ }
+
+ if (!_.isNil(item.started)) {
+ _series.started = item.started;
+ }
+
+ if (!_.isNil(item.performer)) {
+ _series.performer = item.performer;
+ }
+
+ if (!_.isNil(item.instance)) {
+ _series.instance = item.instance;
+ }
+
+ resource.series.push(_series);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ImagingStudy"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Immunization resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function immunization(type, props) {
+ const mappings = {
+ "Immunization": immunization_Immunization
+ };
+
+ return mappings[type](props)
+}
+
+function immunization_Immunization(props) {
+ const resource = {
+ resourceType: "Immunization",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.vaccineCode)) {
+ resource.vaccineCode = props.vaccineCode;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.occurrence)) {
+ util.composite(resource, "occurrence", props.occurrence);
+ }
+
+ if (!_.isNil(props.recorded)) {
+ resource.recorded = props.recorded;
+ }
+
+ if (!_.isNil(props.primarySource)) {
+ resource.primarySource = props.primarySource;
+ }
+
+ if (!_.isNil(props.reportOrigin)) {
+ resource.reportOrigin = props.reportOrigin;
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.manufacturer)) {
+ resource.manufacturer = util.reference(props.manufacturer);
+ }
+
+ if (!_.isNil(props.lotNumber)) {
+ resource.lotNumber = props.lotNumber;
+ }
+
+ if (!_.isNil(props.expirationDate)) {
+ resource.expirationDate = props.expirationDate;
+ }
+
+ if (!_.isNil(props.site)) {
+ resource.site = props.site;
+ }
+
+ if (!_.isNil(props.route)) {
+ resource.route = props.route;
+ }
+
+ if (!_.isNil(props.doseQuantity)) {
+ resource.doseQuantity = props.doseQuantity;
+ }
+
+ if (!_.isNil(props.performer)) {
+ let src = props.performer;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.performer = [];
+
+ for (let item of src) {
+ let _performer = {};
+
+ if (!_.isNil(item.id)) {
+ _performer.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _performer.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.function)) {
+ _performer.function = item.function;
+ }
+
+ if (!_.isNil(item.actor)) {
+ _performer.actor = item.actor;
+ }
+
+ resource.performer.push(_performer);
+ }
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.isSubpotent)) {
+ resource.isSubpotent = props.isSubpotent;
+ }
+
+ if (!_.isNil(props.subpotentReason)) {
+ resource.subpotentReason = props.subpotentReason;
+ }
+
+ if (!_.isNil(props.education)) {
+ let src = props.education;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.education = [];
+
+ for (let item of src) {
+ let _education = {};
+
+ if (!_.isNil(item.id)) {
+ _education.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _education.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.documentType)) {
+ _education.documentType = item.documentType;
+ }
+
+ if (!_.isNil(item.reference)) {
+ _education.reference = item.reference;
+ }
+
+ if (!_.isNil(item.publicationDate)) {
+ _education.publicationDate = item.publicationDate;
+ }
+
+ if (!_.isNil(item.presentationDate)) {
+ _education.presentationDate = item.presentationDate;
+ }
+
+ resource.education.push(_education);
+ }
+ }
+
+ if (!_.isNil(props.programEligibility)) {
+ resource.programEligibility = props.programEligibility;
+ }
+
+ if (!_.isNil(props.fundingSource)) {
+ resource.fundingSource = props.fundingSource;
+ }
+
+ if (!_.isNil(props.reaction)) {
+ let src = props.reaction;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.reaction = [];
+
+ for (let item of src) {
+ let _reaction = {};
+
+ if (!_.isNil(item.id)) {
+ _reaction.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _reaction.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.date)) {
+ _reaction.date = item.date;
+ }
+
+ if (!_.isNil(item.detail)) {
+ _reaction.detail = item.detail;
+ }
+
+ if (!_.isNil(item.reported)) {
+ _reaction.reported = item.reported;
+ }
+
+ resource.reaction.push(_reaction);
+ }
+ }
+
+ if (!_.isNil(props.protocolApplied)) {
+ let src = props.protocolApplied;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.protocolApplied = [];
+
+ for (let item of src) {
+ let _protocolApplied = {};
+
+ if (!_.isNil(item.id)) {
+ _protocolApplied.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _protocolApplied.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.series)) {
+ _protocolApplied.series = item.series;
+ }
+
+ if (!_.isNil(item.authority)) {
+ _protocolApplied.authority = item.authority;
+ }
+
+ if (!_.isNil(item.targetDisease)) {
+ _protocolApplied.targetDisease = item.targetDisease;
+ }
+
+ if (!_.isNil(item.doseNumber)) {
+ _protocolApplied.doseNumber = item.doseNumber;
+ }
+
+ if (!_.isNil(item.seriesDoses)) {
+ _protocolApplied.seriesDoses = item.seriesDoses;
+ }
+
+ resource.protocolApplied.push(_protocolApplied);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Immunization"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ImmunizationEvaluation resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function immunizationEvaluation(type, props) {
+ const mappings = {
+ "ImmunizationEvaluation": immunizationEvaluation_ImmunizationEvaluation
+ };
+
+ return mappings[type](props)
+}
+
+function immunizationEvaluation_ImmunizationEvaluation(props) {
+ const resource = {
+ resourceType: "ImmunizationEvaluation",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.authority)) {
+ resource.authority = util.reference(props.authority);
+ }
+
+ if (!_.isNil(props.targetDisease)) {
+ resource.targetDisease = props.targetDisease;
+ }
+
+ if (!_.isNil(props.immunizationEvent)) {
+ resource.immunizationEvent = util.reference(props.immunizationEvent);
+ }
+
+ if (!_.isNil(props.doseStatus)) {
+ resource.doseStatus = props.doseStatus;
+ }
+
+ if (!_.isNil(props.doseStatusReason)) {
+ resource.doseStatusReason = props.doseStatusReason;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.series)) {
+ resource.series = props.series;
+ }
+
+ if (!_.isNil(props.doseNumber)) {
+ util.composite(resource, "doseNumber", props.doseNumber);
+ }
+
+ if (!_.isNil(props.seriesDoses)) {
+ util.composite(resource, "seriesDoses", props.seriesDoses);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ImmunizationEvaluation"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ImmunizationRecommendation resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function immunizationRecommendation(type, props) {
+ const mappings = {
+ "ImmunizationRecommendation": immunizationRecommendation_ImmunizationRecommendation
+ };
+
+ return mappings[type](props)
+}
+
+function immunizationRecommendation_ImmunizationRecommendation(props) {
+ const resource = {
+ resourceType: "ImmunizationRecommendation",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.authority)) {
+ resource.authority = util.reference(props.authority);
+ }
+
+ if (!_.isNil(props.recommendation)) {
+ let src = props.recommendation;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.recommendation = [];
+
+ for (let item of src) {
+ let _recommendation = {};
+
+ if (!_.isNil(item.id)) {
+ _recommendation.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _recommendation.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.vaccineCode)) {
+ _recommendation.vaccineCode = item.vaccineCode;
+ }
+
+ if (!_.isNil(item.targetDisease)) {
+ _recommendation.targetDisease = item.targetDisease;
+ }
+
+ if (!_.isNil(item.contraindicatedVaccineCode)) {
+ _recommendation.contraindicatedVaccineCode = item.contraindicatedVaccineCode;
+ }
+
+ if (!_.isNil(item.forecastStatus)) {
+ _recommendation.forecastStatus = item.forecastStatus;
+ }
+
+ if (!_.isNil(item.forecastReason)) {
+ _recommendation.forecastReason = item.forecastReason;
+ }
+
+ if (!_.isNil(item.dateCriterion)) {
+ _recommendation.dateCriterion = item.dateCriterion;
+ }
+
+ if (!_.isNil(item.description)) {
+ _recommendation.description = item.description;
+ }
+
+ if (!_.isNil(item.series)) {
+ _recommendation.series = item.series;
+ }
+
+ if (!_.isNil(item.doseNumber)) {
+ _recommendation.doseNumber = item.doseNumber;
+ }
+
+ if (!_.isNil(item.seriesDoses)) {
+ _recommendation.seriesDoses = item.seriesDoses;
+ }
+
+ if (!_.isNil(item.supportingImmunization)) {
+ _recommendation.supportingImmunization = item.supportingImmunization;
+ }
+
+ if (!_.isNil(item.supportingPatientInformation)) {
+ _recommendation.supportingPatientInformation = item.supportingPatientInformation;
+ }
+
+ resource.recommendation.push(_recommendation);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ImplementationGuide resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function implementationGuide(type, props) {
+ const mappings = {
+ "ImplementationGuide": implementationGuide_ImplementationGuide
+ };
+
+ return mappings[type](props)
+}
+
+function implementationGuide_ImplementationGuide(props) {
+ const resource = {
+ resourceType: "ImplementationGuide",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.packageId)) {
+ resource.packageId = props.packageId;
+ }
+
+ if (!_.isNil(props.license)) {
+ resource.license = props.license;
+ }
+
+ if (!_.isNil(props.fhirVersion)) {
+ resource.fhirVersion = props.fhirVersion;
+ }
+
+ if (!_.isNil(props.dependsOn)) {
+ let src = props.dependsOn;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.dependsOn = [];
+
+ for (let item of src) {
+ let _dependsOn = {};
+
+ if (!_.isNil(item.id)) {
+ _dependsOn.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _dependsOn.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.uri)) {
+ _dependsOn.uri = item.uri;
+ }
+
+ if (!_.isNil(item.packageId)) {
+ _dependsOn.packageId = item.packageId;
+ }
+
+ if (!_.isNil(item.version)) {
+ _dependsOn.version = item.version;
+ }
+
+ resource.dependsOn.push(_dependsOn);
+ }
+ }
+
+ if (!_.isNil(props.global)) {
+ let src = props.global;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.global = [];
+
+ for (let item of src) {
+ let _global = {};
+
+ if (!_.isNil(item.id)) {
+ _global.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _global.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _global.type = item.type;
+ }
+
+ if (!_.isNil(item.profile)) {
+ _global.profile = item.profile;
+ }
+
+ resource.global.push(_global);
+ }
+ }
+
+ if (!_.isNil(props.definition)) {
+ let src = props.definition;
+ let _definition = {};
+
+ if (!_.isNil(src.id)) {
+ _definition.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _definition.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.grouping)) {
+ _definition.grouping = src.grouping;
+ }
+
+ if (!_.isNil(src.resource)) {
+ _definition.resource = src.resource;
+ }
+
+ if (!_.isNil(src.page)) {
+ _definition.page = src.page;
+ }
+
+ if (!_.isNil(src.parameter)) {
+ _definition.parameter = src.parameter;
+ }
+
+ if (!_.isNil(src.template)) {
+ _definition.template = src.template;
+ }
+
+ resource.definition = _definition;
+ }
+
+ if (!_.isNil(props.manifest)) {
+ let src = props.manifest;
+ let _manifest = {};
+
+ if (!_.isNil(src.id)) {
+ _manifest.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _manifest.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.rendering)) {
+ _manifest.rendering = src.rendering;
+ }
+
+ if (!_.isNil(src.resource)) {
+ _manifest.resource = src.resource;
+ }
+
+ if (!_.isNil(src.page)) {
+ _manifest.page = src.page;
+ }
+
+ if (!_.isNil(src.image)) {
+ _manifest.image = src.image;
+ }
+
+ if (!_.isNil(src.other)) {
+ _manifest.other = src.other;
+ }
+
+ resource.manifest = _manifest;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ImplementationGuide"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Ingredient resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function ingredient(type, props) {
+ const mappings = {
+ "Ingredient": ingredient_Ingredient
+ };
+
+ return mappings[type](props)
+}
+
+function ingredient_Ingredient(props) {
+ const resource = {
+ resourceType: "Ingredient",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.for)) {
+ if (!Array.isArray(props.for)) { props.for = [props.for]; }
+ resource.for = util.reference(props.for);
+ }
+
+ if (!_.isNil(props.role)) {
+ resource.role = props.role;
+ }
+
+ if (!_.isNil(props.function)) {
+ resource.function = props.function;
+ }
+
+ if (!_.isNil(props.allergenicIndicator)) {
+ resource.allergenicIndicator = props.allergenicIndicator;
+ }
+
+ if (!_.isNil(props.manufacturer)) {
+ let src = props.manufacturer;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.manufacturer = [];
+
+ for (let item of src) {
+ let _manufacturer = {};
+
+ if (!_.isNil(item.id)) {
+ _manufacturer.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _manufacturer.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.role)) {
+ _manufacturer.role = item.role;
+ }
+
+ if (!_.isNil(item.manufacturer)) {
+ _manufacturer.manufacturer = item.manufacturer;
+ }
+
+ resource.manufacturer.push(_manufacturer);
+ }
+ }
+
+ if (!_.isNil(props.substance)) {
+ let src = props.substance;
+ let _substance = {};
+
+ if (!_.isNil(src.id)) {
+ _substance.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _substance.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.code)) {
+ _substance.code = src.code;
+ }
+
+ if (!_.isNil(src.strength)) {
+ _substance.strength = src.strength;
+ }
+
+ resource.substance = _substance;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Ingredient"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR InsurancePlan resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function insurancePlan(type, props) {
+ const mappings = {
+ "InsurancePlan": insurancePlan_InsurancePlan
+ };
+
+ return mappings[type](props)
+}
+
+function insurancePlan_InsurancePlan(props) {
+ const resource = {
+ resourceType: "InsurancePlan",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.alias)) {
+ resource.alias = props.alias;
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.ownedBy)) {
+ resource.ownedBy = util.reference(props.ownedBy);
+ }
+
+ if (!_.isNil(props.administeredBy)) {
+ resource.administeredBy = util.reference(props.administeredBy);
+ }
+
+ if (!_.isNil(props.coverageArea)) {
+ if (!Array.isArray(props.coverageArea)) { props.coverageArea = [props.coverageArea]; }
+ resource.coverageArea = util.reference(props.coverageArea);
+ }
+
+ if (!_.isNil(props.contact)) {
+ let src = props.contact;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.contact = [];
+
+ for (let item of src) {
+ let _contact = {};
+
+ if (!_.isNil(item.id)) {
+ _contact.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _contact.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.purpose)) {
+ _contact.purpose = item.purpose;
+ }
+
+ if (!_.isNil(item.name)) {
+ _contact.name = item.name;
+ }
+
+ if (!_.isNil(item.telecom)) {
+ _contact.telecom = item.telecom;
+ }
+
+ if (!_.isNil(item.address)) {
+ _contact.address = item.address;
+ }
+
+ resource.contact.push(_contact);
+ }
+ }
+
+ if (!_.isNil(props.endpoint)) {
+ if (!Array.isArray(props.endpoint)) { props.endpoint = [props.endpoint]; }
+ resource.endpoint = util.reference(props.endpoint);
+ }
+
+ if (!_.isNil(props.network)) {
+ if (!Array.isArray(props.network)) { props.network = [props.network]; }
+ resource.network = util.reference(props.network);
+ }
+
+ if (!_.isNil(props.coverage)) {
+ let src = props.coverage;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.coverage = [];
+
+ for (let item of src) {
+ let _coverage = {};
+
+ if (!_.isNil(item.id)) {
+ _coverage.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _coverage.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _coverage.type = item.type;
+ }
+
+ if (!_.isNil(item.network)) {
+ _coverage.network = item.network;
+ }
+
+ if (!_.isNil(item.benefit)) {
+ _coverage.benefit = item.benefit;
+ }
+
+ resource.coverage.push(_coverage);
+ }
+ }
+
+ if (!_.isNil(props.plan)) {
+ let src = props.plan;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.plan = [];
+
+ for (let item of src) {
+ let _plan = {};
+
+ if (!_.isNil(item.id)) {
+ _plan.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _plan.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.identifier)) {
+ _plan.identifier = item.identifier;
+ }
+
+ if (!_.isNil(item.type)) {
+ _plan.type = item.type;
+ }
+
+ if (!_.isNil(item.coverageArea)) {
+ _plan.coverageArea = item.coverageArea;
+ }
+
+ if (!_.isNil(item.network)) {
+ _plan.network = item.network;
+ }
+
+ if (!_.isNil(item.generalCost)) {
+ _plan.generalCost = item.generalCost;
+ }
+
+ if (!_.isNil(item.specificCost)) {
+ _plan.specificCost = item.specificCost;
+ }
+
+ resource.plan.push(_plan);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/InsurancePlan"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Invoice resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function invoice(type, props) {
+ const mappings = {
+ "Invoice": invoice_Invoice
+ };
+
+ return mappings[type](props)
+}
+
+function invoice_Invoice(props) {
+ const resource = {
+ resourceType: "Invoice",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.cancelledReason)) {
+ resource.cancelledReason = props.cancelledReason;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.recipient)) {
+ resource.recipient = util.reference(props.recipient);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.participant)) {
+ let src = props.participant;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.participant = [];
+
+ for (let item of src) {
+ let _participant = {};
+
+ if (!_.isNil(item.id)) {
+ _participant.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _participant.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.role)) {
+ _participant.role = item.role;
+ }
+
+ if (!_.isNil(item.actor)) {
+ _participant.actor = item.actor;
+ }
+
+ resource.participant.push(_participant);
+ }
+ }
+
+ if (!_.isNil(props.issuer)) {
+ resource.issuer = util.reference(props.issuer);
+ }
+
+ if (!_.isNil(props.account)) {
+ resource.account = util.reference(props.account);
+ }
+
+ if (!_.isNil(props.lineItem)) {
+ let src = props.lineItem;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.lineItem = [];
+
+ for (let item of src) {
+ let _lineItem = {};
+
+ if (!_.isNil(item.id)) {
+ _lineItem.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _lineItem.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.sequence)) {
+ _lineItem.sequence = item.sequence;
+ }
+
+ if (!_.isNil(item.chargeItem)) {
+ _lineItem.chargeItem = item.chargeItem;
+ }
+
+ if (!_.isNil(item.priceComponent)) {
+ _lineItem.priceComponent = item.priceComponent;
+ }
+
+ resource.lineItem.push(_lineItem);
+ }
+ }
+
+ if (!_.isNil(props.totalPriceComponent)) {
+ resource.totalPriceComponent = props.totalPriceComponent;
+ }
+
+ if (!_.isNil(props.totalNet)) {
+ resource.totalNet = props.totalNet;
+ }
+
+ if (!_.isNil(props.totalGross)) {
+ resource.totalGross = props.totalGross;
+ }
+
+ if (!_.isNil(props.paymentTerms)) {
+ resource.paymentTerms = props.paymentTerms;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Invoice"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Library resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function library(type, props) {
+ const mappings = {
+ "Library": library_Library
+ };
+
+ return mappings[type](props)
+}
+
+function library_Library(props) {
+ const resource = {
+ resourceType: "Library",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.subtitle)) {
+ resource.subtitle = props.subtitle;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.subject)) {
+ util.composite(resource, "subject", props.subject);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.usage)) {
+ resource.usage = props.usage;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.topic)) {
+ resource.topic = props.topic;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.parameter)) {
+ resource.parameter = props.parameter;
+ }
+
+ if (!_.isNil(props.dataRequirement)) {
+ resource.dataRequirement = props.dataRequirement;
+ }
+
+ if (!_.isNil(props.content)) {
+ resource.content = props.content;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Library"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Linkage resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function linkage(type, props) {
+ const mappings = {
+ "Linkage": linkage_Linkage
+ };
+
+ return mappings[type](props)
+}
+
+function linkage_Linkage(props) {
+ const resource = {
+ resourceType: "Linkage",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = util.reference(props.author);
+ }
+
+ if (!_.isNil(props.item)) {
+ let src = props.item;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.item = [];
+
+ for (let item of src) {
+ let _item = {};
+
+ if (!_.isNil(item.id)) {
+ _item.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _item.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _item.type = item.type;
+ }
+
+ if (!_.isNil(item.resource)) {
+ _item.resource = item.resource;
+ }
+
+ resource.item.push(_item);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Linkage"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR List resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function list(type, props) {
+ const mappings = {
+ "List": list_List
+ };
+
+ return mappings[type](props)
+}
+
+function list_List(props) {
+ const resource = {
+ resourceType: "List",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.mode)) {
+ resource.mode = props.mode;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.source)) {
+ resource.source = util.reference(props.source);
+ }
+
+ if (!_.isNil(props.orderedBy)) {
+ resource.orderedBy = props.orderedBy;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.entry)) {
+ let src = props.entry;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.entry = [];
+
+ for (let item of src) {
+ let _entry = {};
+
+ if (!_.isNil(item.id)) {
+ _entry.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _entry.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.flag)) {
+ _entry.flag = item.flag;
+ }
+
+ if (!_.isNil(item.deleted)) {
+ _entry.deleted = item.deleted;
+ }
+
+ if (!_.isNil(item.date)) {
+ _entry.date = item.date;
+ }
+
+ if (!_.isNil(item.item)) {
+ _entry.item = item.item;
+ }
+
+ resource.entry.push(_entry);
+ }
+ }
+
+ if (!_.isNil(props.emptyReason)) {
+ resource.emptyReason = props.emptyReason;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/List"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Location resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function location(type, props) {
+ const mappings = {
+ "Location": location_Location
+ };
+
+ return mappings[type](props)
+}
+
+function location_Location(props) {
+ const resource = {
+ resourceType: "Location",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.operationalStatus)) {
+ resource.operationalStatus = props.operationalStatus;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.alias)) {
+ resource.alias = props.alias;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.mode)) {
+ resource.mode = props.mode;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.telecom)) {
+ resource.telecom = props.telecom;
+ }
+
+ if (!_.isNil(props.address)) {
+ resource.address = props.address;
+ }
+
+ if (!_.isNil(props.physicalType)) {
+ resource.physicalType = props.physicalType;
+ }
+
+ if (!_.isNil(props.position)) {
+ let src = props.position;
+ let _position = {};
+
+ if (!_.isNil(src.id)) {
+ _position.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _position.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.longitude)) {
+ _position.longitude = src.longitude;
+ }
+
+ if (!_.isNil(src.latitude)) {
+ _position.latitude = src.latitude;
+ }
+
+ if (!_.isNil(src.altitude)) {
+ _position.altitude = src.altitude;
+ }
+
+ resource.position = _position;
+ }
+
+ if (!_.isNil(props.managingOrganization)) {
+ resource.managingOrganization = util.reference(props.managingOrganization);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.hoursOfOperation)) {
+ let src = props.hoursOfOperation;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.hoursOfOperation = [];
+
+ for (let item of src) {
+ let _hoursOfOperation = {};
+
+ if (!_.isNil(item.id)) {
+ _hoursOfOperation.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _hoursOfOperation.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.daysOfWeek)) {
+ _hoursOfOperation.daysOfWeek = item.daysOfWeek;
+ }
+
+ if (!_.isNil(item.allDay)) {
+ _hoursOfOperation.allDay = item.allDay;
+ }
+
+ if (!_.isNil(item.openingTime)) {
+ _hoursOfOperation.openingTime = item.openingTime;
+ }
+
+ if (!_.isNil(item.closingTime)) {
+ _hoursOfOperation.closingTime = item.closingTime;
+ }
+
+ resource.hoursOfOperation.push(_hoursOfOperation);
+ }
+ }
+
+ if (!_.isNil(props.availabilityExceptions)) {
+ resource.availabilityExceptions = props.availabilityExceptions;
+ }
+
+ if (!_.isNil(props.endpoint)) {
+ if (!Array.isArray(props.endpoint)) { props.endpoint = [props.endpoint]; }
+ resource.endpoint = util.reference(props.endpoint);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Location"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ManufacturedItemDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function manufacturedItemDefinition(type, props) {
+ const mappings = {
+ "ManufacturedItemDefinition": manufacturedItemDefinition_ManufacturedItemDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function manufacturedItemDefinition_ManufacturedItemDefinition(props) {
+ const resource = {
+ resourceType: "ManufacturedItemDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.manufacturedDoseForm)) {
+ resource.manufacturedDoseForm = props.manufacturedDoseForm;
+ }
+
+ if (!_.isNil(props.unitOfPresentation)) {
+ resource.unitOfPresentation = props.unitOfPresentation;
+ }
+
+ if (!_.isNil(props.manufacturer)) {
+ if (!Array.isArray(props.manufacturer)) { props.manufacturer = [props.manufacturer]; }
+ resource.manufacturer = util.reference(props.manufacturer);
+ }
+
+ if (!_.isNil(props.ingredient)) {
+ resource.ingredient = props.ingredient;
+ }
+
+ if (!_.isNil(props.property)) {
+ let src = props.property;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.property = [];
+
+ for (let item of src) {
+ let _property = {};
+
+ if (!_.isNil(item.id)) {
+ _property.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _property.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _property.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _property.value = item.value;
+ }
+
+ resource.property.push(_property);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ManufacturedItemDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Measure resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function measure(type, props) {
+ const mappings = {
+ "Measure": measure_Measure
+ };
+
+ return mappings[type](props)
+}
+
+function measure_Measure(props) {
+ const resource = {
+ resourceType: "Measure",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.subtitle)) {
+ resource.subtitle = props.subtitle;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.subject)) {
+ util.composite(resource, "subject", props.subject);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.usage)) {
+ resource.usage = props.usage;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.topic)) {
+ resource.topic = props.topic;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.library)) {
+ resource.library = props.library;
+ }
+
+ if (!_.isNil(props.disclaimer)) {
+ resource.disclaimer = props.disclaimer;
+ }
+
+ if (!_.isNil(props.scoring)) {
+ resource.scoring = props.scoring;
+ }
+
+ if (!_.isNil(props.compositeScoring)) {
+ resource.compositeScoring = props.compositeScoring;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.riskAdjustment)) {
+ resource.riskAdjustment = props.riskAdjustment;
+ }
+
+ if (!_.isNil(props.rateAggregation)) {
+ resource.rateAggregation = props.rateAggregation;
+ }
+
+ if (!_.isNil(props.rationale)) {
+ resource.rationale = props.rationale;
+ }
+
+ if (!_.isNil(props.clinicalRecommendationStatement)) {
+ resource.clinicalRecommendationStatement = props.clinicalRecommendationStatement;
+ }
+
+ if (!_.isNil(props.improvementNotation)) {
+ resource.improvementNotation = props.improvementNotation;
+ }
+
+ if (!_.isNil(props.definition)) {
+ resource.definition = props.definition;
+ }
+
+ if (!_.isNil(props.guidance)) {
+ resource.guidance = props.guidance;
+ }
+
+ if (!_.isNil(props.group)) {
+ let src = props.group;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.group = [];
+
+ for (let item of src) {
+ let _group = {};
+
+ if (!_.isNil(item.id)) {
+ _group.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _group.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _group.code = item.code;
+ }
+
+ if (!_.isNil(item.description)) {
+ _group.description = item.description;
+ }
+
+ if (!_.isNil(item.population)) {
+ _group.population = item.population;
+ }
+
+ if (!_.isNil(item.stratifier)) {
+ _group.stratifier = item.stratifier;
+ }
+
+ resource.group.push(_group);
+ }
+ }
+
+ if (!_.isNil(props.supplementalData)) {
+ let src = props.supplementalData;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.supplementalData = [];
+
+ for (let item of src) {
+ let _supplementalData = {};
+
+ if (!_.isNil(item.id)) {
+ _supplementalData.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _supplementalData.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _supplementalData.code = item.code;
+ }
+
+ if (!_.isNil(item.usage)) {
+ _supplementalData.usage = item.usage;
+ }
+
+ if (!_.isNil(item.description)) {
+ _supplementalData.description = item.description;
+ }
+
+ if (!_.isNil(item.criteria)) {
+ _supplementalData.criteria = item.criteria;
+ }
+
+ resource.supplementalData.push(_supplementalData);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Measure"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR MeasureReport resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function measureReport(type, props) {
+ const mappings = {
+ "MeasureReport": measureReport_MeasureReport
+ };
+
+ return mappings[type](props)
+}
+
+function measureReport_MeasureReport(props) {
+ const resource = {
+ resourceType: "MeasureReport",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.measure)) {
+ resource.measure = props.measure;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.reporter)) {
+ resource.reporter = util.reference(props.reporter);
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.improvementNotation)) {
+ resource.improvementNotation = props.improvementNotation;
+ }
+
+ if (!_.isNil(props.group)) {
+ let src = props.group;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.group = [];
+
+ for (let item of src) {
+ let _group = {};
+
+ if (!_.isNil(item.id)) {
+ _group.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _group.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _group.code = item.code;
+ }
+
+ if (!_.isNil(item.population)) {
+ _group.population = item.population;
+ }
+
+ if (!_.isNil(item.measureScore)) {
+ _group.measureScore = item.measureScore;
+ }
+
+ if (!_.isNil(item.stratifier)) {
+ _group.stratifier = item.stratifier;
+ }
+
+ resource.group.push(_group);
+ }
+ }
+
+ if (!_.isNil(props.evaluatedResource)) {
+ if (!Array.isArray(props.evaluatedResource)) { props.evaluatedResource = [props.evaluatedResource]; }
+ resource.evaluatedResource = util.reference(props.evaluatedResource);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/MeasureReport"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Media resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function media(type, props) {
+ const mappings = {
+ "Media": media_Media
+ };
+
+ return mappings[type](props)
+}
+
+function media_Media(props) {
+ const resource = {
+ resourceType: "Media",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.modality)) {
+ resource.modality = props.modality;
+ }
+
+ if (!_.isNil(props.view)) {
+ resource.view = props.view;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.created)) {
+ util.composite(resource, "created", props.created);
+ }
+
+ if (!_.isNil(props.issued)) {
+ resource.issued = props.issued;
+ }
+
+ if (!_.isNil(props.operator)) {
+ resource.operator = util.reference(props.operator);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.bodySite)) {
+ resource.bodySite = props.bodySite;
+ }
+
+ if (!_.isNil(props.deviceName)) {
+ resource.deviceName = props.deviceName;
+ }
+
+ if (!_.isNil(props.device)) {
+ resource.device = util.reference(props.device);
+ }
+
+ if (!_.isNil(props.height)) {
+ resource.height = props.height;
+ }
+
+ if (!_.isNil(props.width)) {
+ resource.width = props.width;
+ }
+
+ if (!_.isNil(props.frames)) {
+ resource.frames = props.frames;
+ }
+
+ if (!_.isNil(props.duration)) {
+ resource.duration = props.duration;
+ }
+
+ if (!_.isNil(props.content)) {
+ resource.content = props.content;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Media"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Medication resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function medication(type, props) {
+ const mappings = {
+ "Medication": medication_Medication
+ };
+
+ return mappings[type](props)
+}
+
+function medication_Medication(props) {
+ const resource = {
+ resourceType: "Medication",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.manufacturer)) {
+ resource.manufacturer = util.reference(props.manufacturer);
+ }
+
+ if (!_.isNil(props.form)) {
+ resource.form = props.form;
+ }
+
+ if (!_.isNil(props.amount)) {
+ resource.amount = props.amount;
+ }
+
+ if (!_.isNil(props.ingredient)) {
+ let src = props.ingredient;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.ingredient = [];
+
+ for (let item of src) {
+ let _ingredient = {};
+
+ if (!_.isNil(item.id)) {
+ _ingredient.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _ingredient.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.item)) {
+ _ingredient.item = item.item;
+ }
+
+ if (!_.isNil(item.isActive)) {
+ _ingredient.isActive = item.isActive;
+ }
+
+ if (!_.isNil(item.strength)) {
+ _ingredient.strength = item.strength;
+ }
+
+ resource.ingredient.push(_ingredient);
+ }
+ }
+
+ if (!_.isNil(props.batch)) {
+ let src = props.batch;
+ let _batch = {};
+
+ if (!_.isNil(src.id)) {
+ _batch.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _batch.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.lotNumber)) {
+ _batch.lotNumber = src.lotNumber;
+ }
+
+ if (!_.isNil(src.expirationDate)) {
+ _batch.expirationDate = src.expirationDate;
+ }
+
+ resource.batch = _batch;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Medication"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR MedicationAdministration resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function medicationAdministration(type, props) {
+ const mappings = {
+ "MedicationAdministration": medicationAdministration_MedicationAdministration
+ };
+
+ return mappings[type](props)
+}
+
+function medicationAdministration_MedicationAdministration(props) {
+ const resource = {
+ resourceType: "MedicationAdministration",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.instantiates)) {
+ resource.instantiates = props.instantiates;
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.medication)) {
+ util.composite(resource, "medication", props.medication);
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.context)) {
+ resource.context = util.reference(props.context);
+ }
+
+ if (!_.isNil(props.supportingInformation)) {
+ if (!Array.isArray(props.supportingInformation)) { props.supportingInformation = [props.supportingInformation]; }
+ resource.supportingInformation = util.reference(props.supportingInformation);
+ }
+
+ if (!_.isNil(props.effective)) {
+ util.composite(resource, "effective", props.effective);
+ }
+
+ if (!_.isNil(props.performer)) {
+ let src = props.performer;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.performer = [];
+
+ for (let item of src) {
+ let _performer = {};
+
+ if (!_.isNil(item.id)) {
+ _performer.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _performer.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.function)) {
+ _performer.function = item.function;
+ }
+
+ if (!_.isNil(item.actor)) {
+ _performer.actor = item.actor;
+ }
+
+ resource.performer.push(_performer);
+ }
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.request)) {
+ resource.request = util.reference(props.request);
+ }
+
+ if (!_.isNil(props.device)) {
+ if (!Array.isArray(props.device)) { props.device = [props.device]; }
+ resource.device = util.reference(props.device);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.dosage)) {
+ let src = props.dosage;
+ let _dosage = {};
+
+ if (!_.isNil(src.id)) {
+ _dosage.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _dosage.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.text)) {
+ _dosage.text = src.text;
+ }
+
+ if (!_.isNil(src.site)) {
+ _dosage.site = src.site;
+ }
+
+ if (!_.isNil(src.route)) {
+ _dosage.route = src.route;
+ }
+
+ if (!_.isNil(src.method)) {
+ _dosage.method = src.method;
+ }
+
+ if (!_.isNil(src.dose)) {
+ _dosage.dose = src.dose;
+ }
+
+ if (!_.isNil(src.rate)) {
+ _dosage.rate = src.rate;
+ }
+
+ resource.dosage = _dosage;
+ }
+
+ if (!_.isNil(props.eventHistory)) {
+ if (!Array.isArray(props.eventHistory)) { props.eventHistory = [props.eventHistory]; }
+ resource.eventHistory = util.reference(props.eventHistory);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/MedicationAdministration"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR MedicationDispense resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function medicationDispense(type, props) {
+ const mappings = {
+ "MedicationDispense": medicationDispense_MedicationDispense
+ };
+
+ return mappings[type](props)
+}
+
+function medicationDispense_MedicationDispense(props) {
+ const resource = {
+ resourceType: "MedicationDispense",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ util.composite(resource, "statusReason", props.statusReason);
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.medication)) {
+ util.composite(resource, "medication", props.medication);
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.context)) {
+ resource.context = util.reference(props.context);
+ }
+
+ if (!_.isNil(props.supportingInformation)) {
+ if (!Array.isArray(props.supportingInformation)) { props.supportingInformation = [props.supportingInformation]; }
+ resource.supportingInformation = util.reference(props.supportingInformation);
+ }
+
+ if (!_.isNil(props.performer)) {
+ let src = props.performer;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.performer = [];
+
+ for (let item of src) {
+ let _performer = {};
+
+ if (!_.isNil(item.id)) {
+ _performer.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _performer.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.function)) {
+ _performer.function = item.function;
+ }
+
+ if (!_.isNil(item.actor)) {
+ _performer.actor = item.actor;
+ }
+
+ resource.performer.push(_performer);
+ }
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.authorizingPrescription)) {
+ if (!Array.isArray(props.authorizingPrescription)) { props.authorizingPrescription = [props.authorizingPrescription]; }
+ resource.authorizingPrescription = util.reference(props.authorizingPrescription);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.quantity)) {
+ resource.quantity = props.quantity;
+ }
+
+ if (!_.isNil(props.daysSupply)) {
+ resource.daysSupply = props.daysSupply;
+ }
+
+ if (!_.isNil(props.whenPrepared)) {
+ resource.whenPrepared = props.whenPrepared;
+ }
+
+ if (!_.isNil(props.whenHandedOver)) {
+ resource.whenHandedOver = props.whenHandedOver;
+ }
+
+ if (!_.isNil(props.destination)) {
+ resource.destination = util.reference(props.destination);
+ }
+
+ if (!_.isNil(props.receiver)) {
+ if (!Array.isArray(props.receiver)) { props.receiver = [props.receiver]; }
+ resource.receiver = util.reference(props.receiver);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.dosageInstruction)) {
+ resource.dosageInstruction = props.dosageInstruction;
+ }
+
+ if (!_.isNil(props.substitution)) {
+ let src = props.substitution;
+ let _substitution = {};
+
+ if (!_.isNil(src.id)) {
+ _substitution.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _substitution.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.wasSubstituted)) {
+ _substitution.wasSubstituted = src.wasSubstituted;
+ }
+
+ if (!_.isNil(src.type)) {
+ _substitution.type = src.type;
+ }
+
+ if (!_.isNil(src.reason)) {
+ _substitution.reason = src.reason;
+ }
+
+ if (!_.isNil(src.responsibleParty)) {
+ _substitution.responsibleParty = src.responsibleParty;
+ }
+
+ resource.substitution = _substitution;
+ }
+
+ if (!_.isNil(props.detectedIssue)) {
+ if (!Array.isArray(props.detectedIssue)) { props.detectedIssue = [props.detectedIssue]; }
+ resource.detectedIssue = util.reference(props.detectedIssue);
+ }
+
+ if (!_.isNil(props.eventHistory)) {
+ if (!Array.isArray(props.eventHistory)) { props.eventHistory = [props.eventHistory]; }
+ resource.eventHistory = util.reference(props.eventHistory);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/MedicationDispense"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR MedicationKnowledge resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function medicationKnowledge(type, props) {
+ const mappings = {
+ "MedicationKnowledge": medicationKnowledge_MedicationKnowledge
+ };
+
+ return mappings[type](props)
+}
+
+function medicationKnowledge_MedicationKnowledge(props) {
+ const resource = {
+ resourceType: "MedicationKnowledge",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.manufacturer)) {
+ resource.manufacturer = util.reference(props.manufacturer);
+ }
+
+ if (!_.isNil(props.doseForm)) {
+ resource.doseForm = props.doseForm;
+ }
+
+ if (!_.isNil(props.amount)) {
+ resource.amount = props.amount;
+ }
+
+ if (!_.isNil(props.synonym)) {
+ resource.synonym = props.synonym;
+ }
+
+ if (!_.isNil(props.relatedMedicationKnowledge)) {
+ let src = props.relatedMedicationKnowledge;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.relatedMedicationKnowledge = [];
+
+ for (let item of src) {
+ let _relatedMedicationKnowledge = {};
+
+ if (!_.isNil(item.id)) {
+ _relatedMedicationKnowledge.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _relatedMedicationKnowledge.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _relatedMedicationKnowledge.type = item.type;
+ }
+
+ if (!_.isNil(item.reference)) {
+ _relatedMedicationKnowledge.reference = item.reference;
+ }
+
+ resource.relatedMedicationKnowledge.push(_relatedMedicationKnowledge);
+ }
+ }
+
+ if (!_.isNil(props.associatedMedication)) {
+ if (!Array.isArray(props.associatedMedication)) { props.associatedMedication = [props.associatedMedication]; }
+ resource.associatedMedication = util.reference(props.associatedMedication);
+ }
+
+ if (!_.isNil(props.productType)) {
+ resource.productType = props.productType;
+ }
+
+ if (!_.isNil(props.monograph)) {
+ let src = props.monograph;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.monograph = [];
+
+ for (let item of src) {
+ let _monograph = {};
+
+ if (!_.isNil(item.id)) {
+ _monograph.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _monograph.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _monograph.type = item.type;
+ }
+
+ if (!_.isNil(item.source)) {
+ _monograph.source = item.source;
+ }
+
+ resource.monograph.push(_monograph);
+ }
+ }
+
+ if (!_.isNil(props.ingredient)) {
+ let src = props.ingredient;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.ingredient = [];
+
+ for (let item of src) {
+ let _ingredient = {};
+
+ if (!_.isNil(item.id)) {
+ _ingredient.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _ingredient.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.item)) {
+ _ingredient.item = item.item;
+ }
+
+ if (!_.isNil(item.isActive)) {
+ _ingredient.isActive = item.isActive;
+ }
+
+ if (!_.isNil(item.strength)) {
+ _ingredient.strength = item.strength;
+ }
+
+ resource.ingredient.push(_ingredient);
+ }
+ }
+
+ if (!_.isNil(props.preparationInstruction)) {
+ resource.preparationInstruction = props.preparationInstruction;
+ }
+
+ if (!_.isNil(props.intendedRoute)) {
+ resource.intendedRoute = props.intendedRoute;
+ }
+
+ if (!_.isNil(props.cost)) {
+ let src = props.cost;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.cost = [];
+
+ for (let item of src) {
+ let _cost = {};
+
+ if (!_.isNil(item.id)) {
+ _cost.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _cost.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _cost.type = item.type;
+ }
+
+ if (!_.isNil(item.source)) {
+ _cost.source = item.source;
+ }
+
+ if (!_.isNil(item.cost)) {
+ _cost.cost = item.cost;
+ }
+
+ resource.cost.push(_cost);
+ }
+ }
+
+ if (!_.isNil(props.monitoringProgram)) {
+ let src = props.monitoringProgram;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.monitoringProgram = [];
+
+ for (let item of src) {
+ let _monitoringProgram = {};
+
+ if (!_.isNil(item.id)) {
+ _monitoringProgram.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _monitoringProgram.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _monitoringProgram.type = item.type;
+ }
+
+ if (!_.isNil(item.name)) {
+ _monitoringProgram.name = item.name;
+ }
+
+ resource.monitoringProgram.push(_monitoringProgram);
+ }
+ }
+
+ if (!_.isNil(props.administrationGuidelines)) {
+ let src = props.administrationGuidelines;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.administrationGuidelines = [];
+
+ for (let item of src) {
+ let _administrationGuidelines = {};
+
+ if (!_.isNil(item.id)) {
+ _administrationGuidelines.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _administrationGuidelines.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.dosage)) {
+ _administrationGuidelines.dosage = item.dosage;
+ }
+
+ if (!_.isNil(item.indication)) {
+ _administrationGuidelines.indication = item.indication;
+ }
+
+ if (!_.isNil(item.patientCharacteristics)) {
+ _administrationGuidelines.patientCharacteristics = item.patientCharacteristics;
+ }
+
+ resource.administrationGuidelines.push(_administrationGuidelines);
+ }
+ }
+
+ if (!_.isNil(props.medicineClassification)) {
+ let src = props.medicineClassification;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.medicineClassification = [];
+
+ for (let item of src) {
+ let _medicineClassification = {};
+
+ if (!_.isNil(item.id)) {
+ _medicineClassification.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _medicineClassification.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _medicineClassification.type = item.type;
+ }
+
+ if (!_.isNil(item.classification)) {
+ _medicineClassification.classification = item.classification;
+ }
+
+ resource.medicineClassification.push(_medicineClassification);
+ }
+ }
+
+ if (!_.isNil(props.packaging)) {
+ let src = props.packaging;
+ let _packaging = {};
+
+ if (!_.isNil(src.id)) {
+ _packaging.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _packaging.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.type)) {
+ _packaging.type = src.type;
+ }
+
+ if (!_.isNil(src.quantity)) {
+ _packaging.quantity = src.quantity;
+ }
+
+ resource.packaging = _packaging;
+ }
+
+ if (!_.isNil(props.drugCharacteristic)) {
+ let src = props.drugCharacteristic;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.drugCharacteristic = [];
+
+ for (let item of src) {
+ let _drugCharacteristic = {};
+
+ if (!_.isNil(item.id)) {
+ _drugCharacteristic.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _drugCharacteristic.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _drugCharacteristic.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _drugCharacteristic.value = item.value;
+ }
+
+ resource.drugCharacteristic.push(_drugCharacteristic);
+ }
+ }
+
+ if (!_.isNil(props.contraindication)) {
+ if (!Array.isArray(props.contraindication)) { props.contraindication = [props.contraindication]; }
+ resource.contraindication = util.reference(props.contraindication);
+ }
+
+ if (!_.isNil(props.regulatory)) {
+ let src = props.regulatory;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.regulatory = [];
+
+ for (let item of src) {
+ let _regulatory = {};
+
+ if (!_.isNil(item.id)) {
+ _regulatory.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _regulatory.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.regulatoryAuthority)) {
+ _regulatory.regulatoryAuthority = item.regulatoryAuthority;
+ }
+
+ if (!_.isNil(item.substitution)) {
+ _regulatory.substitution = item.substitution;
+ }
+
+ if (!_.isNil(item.schedule)) {
+ _regulatory.schedule = item.schedule;
+ }
+
+ if (!_.isNil(item.maxDispense)) {
+ _regulatory.maxDispense = item.maxDispense;
+ }
+
+ resource.regulatory.push(_regulatory);
+ }
+ }
+
+ if (!_.isNil(props.kinetics)) {
+ let src = props.kinetics;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.kinetics = [];
+
+ for (let item of src) {
+ let _kinetics = {};
+
+ if (!_.isNil(item.id)) {
+ _kinetics.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _kinetics.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.areaUnderCurve)) {
+ _kinetics.areaUnderCurve = item.areaUnderCurve;
+ }
+
+ if (!_.isNil(item.lethalDose50)) {
+ _kinetics.lethalDose50 = item.lethalDose50;
+ }
+
+ if (!_.isNil(item.halfLifePeriod)) {
+ _kinetics.halfLifePeriod = item.halfLifePeriod;
+ }
+
+ resource.kinetics.push(_kinetics);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/MedicationKnowledge"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR MedicationRequest resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function medicationRequest(type, props) {
+ const mappings = {
+ "MedicationRequest": medicationRequest_MedicationRequest
+ };
+
+ return mappings[type](props)
+}
+
+function medicationRequest_MedicationRequest(props) {
+ const resource = {
+ resourceType: "MedicationRequest",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.intent)) {
+ resource.intent = props.intent;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.doNotPerform)) {
+ resource.doNotPerform = props.doNotPerform;
+ }
+
+ if (!_.isNil(props.reported)) {
+ util.composite(resource, "reported", props.reported);
+ }
+
+ if (!_.isNil(props.medication)) {
+ util.composite(resource, "medication", props.medication);
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.supportingInformation)) {
+ if (!Array.isArray(props.supportingInformation)) { props.supportingInformation = [props.supportingInformation]; }
+ resource.supportingInformation = util.reference(props.supportingInformation);
+ }
+
+ if (!_.isNil(props.authoredOn)) {
+ resource.authoredOn = props.authoredOn;
+ }
+
+ if (!_.isNil(props.requester)) {
+ resource.requester = util.reference(props.requester);
+ }
+
+ if (!_.isNil(props.performer)) {
+ resource.performer = util.reference(props.performer);
+ }
+
+ if (!_.isNil(props.performerType)) {
+ resource.performerType = props.performerType;
+ }
+
+ if (!_.isNil(props.recorder)) {
+ resource.recorder = util.reference(props.recorder);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = props.instantiatesCanonical;
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.groupIdentifier)) {
+ resource.groupIdentifier = util.identifier(props.groupIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.courseOfTherapyType)) {
+ resource.courseOfTherapyType = props.courseOfTherapyType;
+ }
+
+ if (!_.isNil(props.insurance)) {
+ if (!Array.isArray(props.insurance)) { props.insurance = [props.insurance]; }
+ resource.insurance = util.reference(props.insurance);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.dosageInstruction)) {
+ resource.dosageInstruction = props.dosageInstruction;
+ }
+
+ if (!_.isNil(props.dispenseRequest)) {
+ let src = props.dispenseRequest;
+ let _dispenseRequest = {};
+
+ if (!_.isNil(src.id)) {
+ _dispenseRequest.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _dispenseRequest.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.initialFill)) {
+ _dispenseRequest.initialFill = src.initialFill;
+ }
+
+ if (!_.isNil(src.dispenseInterval)) {
+ _dispenseRequest.dispenseInterval = src.dispenseInterval;
+ }
+
+ if (!_.isNil(src.validityPeriod)) {
+ _dispenseRequest.validityPeriod = src.validityPeriod;
+ }
+
+ if (!_.isNil(src.numberOfRepeatsAllowed)) {
+ _dispenseRequest.numberOfRepeatsAllowed = src.numberOfRepeatsAllowed;
+ }
+
+ if (!_.isNil(src.quantity)) {
+ _dispenseRequest.quantity = src.quantity;
+ }
+
+ if (!_.isNil(src.expectedSupplyDuration)) {
+ _dispenseRequest.expectedSupplyDuration = src.expectedSupplyDuration;
+ }
+
+ if (!_.isNil(src.performer)) {
+ _dispenseRequest.performer = src.performer;
+ }
+
+ resource.dispenseRequest = _dispenseRequest;
+ }
+
+ if (!_.isNil(props.substitution)) {
+ let src = props.substitution;
+ let _substitution = {};
+
+ if (!_.isNil(src.id)) {
+ _substitution.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _substitution.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.allowed)) {
+ _substitution.allowed = src.allowed;
+ }
+
+ if (!_.isNil(src.reason)) {
+ _substitution.reason = src.reason;
+ }
+
+ resource.substitution = _substitution;
+ }
+
+ if (!_.isNil(props.priorPrescription)) {
+ resource.priorPrescription = util.reference(props.priorPrescription);
+ }
+
+ if (!_.isNil(props.detectedIssue)) {
+ if (!Array.isArray(props.detectedIssue)) { props.detectedIssue = [props.detectedIssue]; }
+ resource.detectedIssue = util.reference(props.detectedIssue);
+ }
+
+ if (!_.isNil(props.eventHistory)) {
+ if (!Array.isArray(props.eventHistory)) { props.eventHistory = [props.eventHistory]; }
+ resource.eventHistory = util.reference(props.eventHistory);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/MedicationRequest"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR MedicationStatement resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function medicationStatement(type, props) {
+ const mappings = {
+ "MedicationStatement": medicationStatement_MedicationStatement
+ };
+
+ return mappings[type](props)
+}
+
+function medicationStatement_MedicationStatement(props) {
+ const resource = {
+ resourceType: "MedicationStatement",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.medication)) {
+ util.composite(resource, "medication", props.medication);
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.context)) {
+ resource.context = util.reference(props.context);
+ }
+
+ if (!_.isNil(props.effective)) {
+ util.composite(resource, "effective", props.effective);
+ }
+
+ if (!_.isNil(props.dateAsserted)) {
+ resource.dateAsserted = props.dateAsserted;
+ }
+
+ if (!_.isNil(props.informationSource)) {
+ resource.informationSource = util.reference(props.informationSource);
+ }
+
+ if (!_.isNil(props.derivedFrom)) {
+ if (!Array.isArray(props.derivedFrom)) { props.derivedFrom = [props.derivedFrom]; }
+ resource.derivedFrom = util.reference(props.derivedFrom);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.dosage)) {
+ resource.dosage = props.dosage;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/MedicationStatement"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR MedicinalProductDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function medicinalProductDefinition(type, props) {
+ const mappings = {
+ "MedicinalProductDefinition": medicinalProductDefinition_MedicinalProductDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function medicinalProductDefinition_MedicinalProductDefinition(props) {
+ const resource = {
+ resourceType: "MedicinalProductDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.domain)) {
+ resource.domain = props.domain;
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusDate)) {
+ resource.statusDate = props.statusDate;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.combinedPharmaceuticalDoseForm)) {
+ resource.combinedPharmaceuticalDoseForm = props.combinedPharmaceuticalDoseForm;
+ }
+
+ if (!_.isNil(props.route)) {
+ resource.route = props.route;
+ }
+
+ if (!_.isNil(props.indication)) {
+ resource.indication = props.indication;
+ }
+
+ if (!_.isNil(props.legalStatusOfSupply)) {
+ resource.legalStatusOfSupply = props.legalStatusOfSupply;
+ }
+
+ if (!_.isNil(props.additionalMonitoringIndicator)) {
+ resource.additionalMonitoringIndicator = props.additionalMonitoringIndicator;
+ }
+
+ if (!_.isNil(props.specialMeasures)) {
+ resource.specialMeasures = props.specialMeasures;
+ }
+
+ if (!_.isNil(props.pediatricUseIndicator)) {
+ resource.pediatricUseIndicator = props.pediatricUseIndicator;
+ }
+
+ if (!_.isNil(props.classification)) {
+ resource.classification = props.classification;
+ }
+
+ if (!_.isNil(props.marketingStatus)) {
+ resource.marketingStatus = props.marketingStatus;
+ }
+
+ if (!_.isNil(props.packagedMedicinalProduct)) {
+ resource.packagedMedicinalProduct = props.packagedMedicinalProduct;
+ }
+
+ if (!_.isNil(props.ingredient)) {
+ resource.ingredient = props.ingredient;
+ }
+
+ if (!_.isNil(props.impurity)) {
+ resource.impurity = props.impurity;
+ }
+
+ if (!_.isNil(props.attachedDocument)) {
+ if (!Array.isArray(props.attachedDocument)) { props.attachedDocument = [props.attachedDocument]; }
+ resource.attachedDocument = util.reference(props.attachedDocument);
+ }
+
+ if (!_.isNil(props.masterFile)) {
+ if (!Array.isArray(props.masterFile)) { props.masterFile = [props.masterFile]; }
+ resource.masterFile = util.reference(props.masterFile);
+ }
+
+ if (!_.isNil(props.contact)) {
+ let src = props.contact;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.contact = [];
+
+ for (let item of src) {
+ let _contact = {};
+
+ if (!_.isNil(item.id)) {
+ _contact.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _contact.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _contact.type = item.type;
+ }
+
+ if (!_.isNil(item.contact)) {
+ _contact.contact = item.contact;
+ }
+
+ resource.contact.push(_contact);
+ }
+ }
+
+ if (!_.isNil(props.clinicalTrial)) {
+ if (!Array.isArray(props.clinicalTrial)) { props.clinicalTrial = [props.clinicalTrial]; }
+ resource.clinicalTrial = util.reference(props.clinicalTrial);
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.name)) {
+ let src = props.name;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.name = [];
+
+ for (let item of src) {
+ let _name = {};
+
+ if (!_.isNil(item.id)) {
+ _name.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _name.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.productName)) {
+ _name.productName = item.productName;
+ }
+
+ if (!_.isNil(item.type)) {
+ _name.type = item.type;
+ }
+
+ if (!_.isNil(item.namePart)) {
+ _name.namePart = item.namePart;
+ }
+
+ if (!_.isNil(item.countryLanguage)) {
+ _name.countryLanguage = item.countryLanguage;
+ }
+
+ resource.name.push(_name);
+ }
+ }
+
+ if (!_.isNil(props.crossReference)) {
+ let src = props.crossReference;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.crossReference = [];
+
+ for (let item of src) {
+ let _crossReference = {};
+
+ if (!_.isNil(item.id)) {
+ _crossReference.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _crossReference.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.product)) {
+ _crossReference.product = item.product;
+ }
+
+ if (!_.isNil(item.type)) {
+ _crossReference.type = item.type;
+ }
+
+ resource.crossReference.push(_crossReference);
+ }
+ }
+
+ if (!_.isNil(props.operation)) {
+ let src = props.operation;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.operation = [];
+
+ for (let item of src) {
+ let _operation = {};
+
+ if (!_.isNil(item.id)) {
+ _operation.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _operation.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _operation.type = item.type;
+ }
+
+ if (!_.isNil(item.effectiveDate)) {
+ _operation.effectiveDate = item.effectiveDate;
+ }
+
+ if (!_.isNil(item.organization)) {
+ _operation.organization = item.organization;
+ }
+
+ if (!_.isNil(item.confidentialityIndicator)) {
+ _operation.confidentialityIndicator = item.confidentialityIndicator;
+ }
+
+ resource.operation.push(_operation);
+ }
+ }
+
+ if (!_.isNil(props.characteristic)) {
+ let src = props.characteristic;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.characteristic = [];
+
+ for (let item of src) {
+ let _characteristic = {};
+
+ if (!_.isNil(item.id)) {
+ _characteristic.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _characteristic.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _characteristic.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _characteristic.value = item.value;
+ }
+
+ resource.characteristic.push(_characteristic);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/MedicinalProductDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR MessageDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function messageDefinition(type, props) {
+ const mappings = {
+ "MessageDefinition": messageDefinition_MessageDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function messageDefinition_MessageDefinition(props) {
+ const resource = {
+ resourceType: "MessageDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.replaces)) {
+ resource.replaces = props.replaces;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.base)) {
+ resource.base = props.base;
+ }
+
+ if (!_.isNil(props.parent)) {
+ resource.parent = props.parent;
+ }
+
+ if (!_.isNil(props.event)) {
+ util.composite(resource, "event", props.event);
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.focus)) {
+ let src = props.focus;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.focus = [];
+
+ for (let item of src) {
+ let _focus = {};
+
+ if (!_.isNil(item.id)) {
+ _focus.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _focus.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _focus.code = item.code;
+ }
+
+ if (!_.isNil(item.profile)) {
+ _focus.profile = item.profile;
+ }
+
+ if (!_.isNil(item.min)) {
+ _focus.min = item.min;
+ }
+
+ if (!_.isNil(item.max)) {
+ _focus.max = item.max;
+ }
+
+ resource.focus.push(_focus);
+ }
+ }
+
+ if (!_.isNil(props.responseRequired)) {
+ resource.responseRequired = props.responseRequired;
+ }
+
+ if (!_.isNil(props.allowedResponse)) {
+ let src = props.allowedResponse;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.allowedResponse = [];
+
+ for (let item of src) {
+ let _allowedResponse = {};
+
+ if (!_.isNil(item.id)) {
+ _allowedResponse.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _allowedResponse.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.message)) {
+ _allowedResponse.message = item.message;
+ }
+
+ if (!_.isNil(item.situation)) {
+ _allowedResponse.situation = item.situation;
+ }
+
+ resource.allowedResponse.push(_allowedResponse);
+ }
+ }
+
+ if (!_.isNil(props.graph)) {
+ resource.graph = props.graph;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/MessageDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR MessageHeader resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function messageHeader(type, props) {
+ const mappings = {
+ "MessageHeader": messageHeader_MessageHeader
+ };
+
+ return mappings[type](props)
+}
+
+function messageHeader_MessageHeader(props) {
+ const resource = {
+ resourceType: "MessageHeader",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.event)) {
+ util.composite(resource, "event", props.event);
+ }
+
+ if (!_.isNil(props.destination)) {
+ let src = props.destination;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.destination = [];
+
+ for (let item of src) {
+ let _destination = {};
+
+ if (!_.isNil(item.id)) {
+ _destination.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _destination.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _destination.name = item.name;
+ }
+
+ if (!_.isNil(item.target)) {
+ _destination.target = item.target;
+ }
+
+ if (!_.isNil(item.endpoint)) {
+ _destination.endpoint = item.endpoint;
+ }
+
+ if (!_.isNil(item.receiver)) {
+ _destination.receiver = item.receiver;
+ }
+
+ resource.destination.push(_destination);
+ }
+ }
+
+ if (!_.isNil(props.sender)) {
+ resource.sender = util.reference(props.sender);
+ }
+
+ if (!_.isNil(props.enterer)) {
+ resource.enterer = util.reference(props.enterer);
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = util.reference(props.author);
+ }
+
+ if (!_.isNil(props.source)) {
+ let src = props.source;
+ let _source = {};
+
+ if (!_.isNil(src.id)) {
+ _source.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _source.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.name)) {
+ _source.name = src.name;
+ }
+
+ if (!_.isNil(src.software)) {
+ _source.software = src.software;
+ }
+
+ if (!_.isNil(src.version)) {
+ _source.version = src.version;
+ }
+
+ if (!_.isNil(src.contact)) {
+ _source.contact = src.contact;
+ }
+
+ if (!_.isNil(src.endpoint)) {
+ _source.endpoint = src.endpoint;
+ }
+
+ resource.source = _source;
+ }
+
+ if (!_.isNil(props.responsible)) {
+ resource.responsible = util.reference(props.responsible);
+ }
+
+ if (!_.isNil(props.reason)) {
+ resource.reason = props.reason;
+ }
+
+ if (!_.isNil(props.response)) {
+ let src = props.response;
+ let _response = {};
+
+ if (!_.isNil(src.id)) {
+ _response.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _response.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.identifier)) {
+ _response.identifier = src.identifier;
+ }
+
+ if (!_.isNil(src.code)) {
+ _response.code = src.code;
+ }
+
+ if (!_.isNil(src.details)) {
+ _response.details = src.details;
+ }
+
+ resource.response = _response;
+ }
+
+ if (!_.isNil(props.focus)) {
+ if (!Array.isArray(props.focus)) { props.focus = [props.focus]; }
+ resource.focus = util.reference(props.focus);
+ }
+
+ if (!_.isNil(props.definition)) {
+ resource.definition = props.definition;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/MessageHeader"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR MolecularSequence resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function molecularSequence(type, props) {
+ const mappings = {
+ "MolecularSequence": molecularSequence_MolecularSequence
+ };
+
+ return mappings[type](props)
+}
+
+function molecularSequence_MolecularSequence(props) {
+ const resource = {
+ resourceType: "MolecularSequence",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.coordinateSystem)) {
+ resource.coordinateSystem = props.coordinateSystem;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.specimen)) {
+ resource.specimen = util.reference(props.specimen);
+ }
+
+ if (!_.isNil(props.device)) {
+ resource.device = util.reference(props.device);
+ }
+
+ if (!_.isNil(props.performer)) {
+ resource.performer = util.reference(props.performer);
+ }
+
+ if (!_.isNil(props.quantity)) {
+ resource.quantity = props.quantity;
+ }
+
+ if (!_.isNil(props.referenceSeq)) {
+ let src = props.referenceSeq;
+ let _referenceSeq = {};
+
+ if (!_.isNil(src.id)) {
+ _referenceSeq.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _referenceSeq.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.chromosome)) {
+ _referenceSeq.chromosome = src.chromosome;
+ }
+
+ if (!_.isNil(src.genomeBuild)) {
+ _referenceSeq.genomeBuild = src.genomeBuild;
+ }
+
+ if (!_.isNil(src.orientation)) {
+ _referenceSeq.orientation = src.orientation;
+ }
+
+ if (!_.isNil(src.referenceSeqId)) {
+ _referenceSeq.referenceSeqId = src.referenceSeqId;
+ }
+
+ if (!_.isNil(src.referenceSeqPointer)) {
+ _referenceSeq.referenceSeqPointer = src.referenceSeqPointer;
+ }
+
+ if (!_.isNil(src.referenceSeqString)) {
+ _referenceSeq.referenceSeqString = src.referenceSeqString;
+ }
+
+ if (!_.isNil(src.strand)) {
+ _referenceSeq.strand = src.strand;
+ }
+
+ if (!_.isNil(src.windowStart)) {
+ _referenceSeq.windowStart = src.windowStart;
+ }
+
+ if (!_.isNil(src.windowEnd)) {
+ _referenceSeq.windowEnd = src.windowEnd;
+ }
+
+ resource.referenceSeq = _referenceSeq;
+ }
+
+ if (!_.isNil(props.variant)) {
+ let src = props.variant;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.variant = [];
+
+ for (let item of src) {
+ let _variant = {};
+
+ if (!_.isNil(item.id)) {
+ _variant.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _variant.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.start)) {
+ _variant.start = item.start;
+ }
+
+ if (!_.isNil(item.end)) {
+ _variant.end = item.end;
+ }
+
+ if (!_.isNil(item.observedAllele)) {
+ _variant.observedAllele = item.observedAllele;
+ }
+
+ if (!_.isNil(item.referenceAllele)) {
+ _variant.referenceAllele = item.referenceAllele;
+ }
+
+ if (!_.isNil(item.cigar)) {
+ _variant.cigar = item.cigar;
+ }
+
+ if (!_.isNil(item.variantPointer)) {
+ _variant.variantPointer = item.variantPointer;
+ }
+
+ resource.variant.push(_variant);
+ }
+ }
+
+ if (!_.isNil(props.observedSeq)) {
+ resource.observedSeq = props.observedSeq;
+ }
+
+ if (!_.isNil(props.quality)) {
+ let src = props.quality;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.quality = [];
+
+ for (let item of src) {
+ let _quality = {};
+
+ if (!_.isNil(item.id)) {
+ _quality.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _quality.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _quality.type = item.type;
+ }
+
+ if (!_.isNil(item.standardSequence)) {
+ _quality.standardSequence = item.standardSequence;
+ }
+
+ if (!_.isNil(item.start)) {
+ _quality.start = item.start;
+ }
+
+ if (!_.isNil(item.end)) {
+ _quality.end = item.end;
+ }
+
+ if (!_.isNil(item.score)) {
+ _quality.score = item.score;
+ }
+
+ if (!_.isNil(item.method)) {
+ _quality.method = item.method;
+ }
+
+ if (!_.isNil(item.truthTP)) {
+ _quality.truthTP = item.truthTP;
+ }
+
+ if (!_.isNil(item.queryTP)) {
+ _quality.queryTP = item.queryTP;
+ }
+
+ if (!_.isNil(item.truthFN)) {
+ _quality.truthFN = item.truthFN;
+ }
+
+ if (!_.isNil(item.queryFP)) {
+ _quality.queryFP = item.queryFP;
+ }
+
+ if (!_.isNil(item.gtFP)) {
+ _quality.gtFP = item.gtFP;
+ }
+
+ if (!_.isNil(item.precision)) {
+ _quality.precision = item.precision;
+ }
+
+ if (!_.isNil(item.recall)) {
+ _quality.recall = item.recall;
+ }
+
+ if (!_.isNil(item.fScore)) {
+ _quality.fScore = item.fScore;
+ }
+
+ if (!_.isNil(item.roc)) {
+ _quality.roc = item.roc;
+ }
+
+ resource.quality.push(_quality);
+ }
+ }
+
+ if (!_.isNil(props.readCoverage)) {
+ resource.readCoverage = props.readCoverage;
+ }
+
+ if (!_.isNil(props.repository)) {
+ let src = props.repository;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.repository = [];
+
+ for (let item of src) {
+ let _repository = {};
+
+ if (!_.isNil(item.id)) {
+ _repository.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _repository.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _repository.type = item.type;
+ }
+
+ if (!_.isNil(item.url)) {
+ _repository.url = item.url;
+ }
+
+ if (!_.isNil(item.name)) {
+ _repository.name = item.name;
+ }
+
+ if (!_.isNil(item.datasetId)) {
+ _repository.datasetId = item.datasetId;
+ }
+
+ if (!_.isNil(item.variantsetId)) {
+ _repository.variantsetId = item.variantsetId;
+ }
+
+ if (!_.isNil(item.readsetId)) {
+ _repository.readsetId = item.readsetId;
+ }
+
+ resource.repository.push(_repository);
+ }
+ }
+
+ if (!_.isNil(props.pointer)) {
+ if (!Array.isArray(props.pointer)) { props.pointer = [props.pointer]; }
+ resource.pointer = util.reference(props.pointer);
+ }
+
+ if (!_.isNil(props.structureVariant)) {
+ let src = props.structureVariant;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.structureVariant = [];
+
+ for (let item of src) {
+ let _structureVariant = {};
+
+ if (!_.isNil(item.id)) {
+ _structureVariant.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _structureVariant.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.variantType)) {
+ _structureVariant.variantType = item.variantType;
+ }
+
+ if (!_.isNil(item.exact)) {
+ _structureVariant.exact = item.exact;
+ }
+
+ if (!_.isNil(item.length)) {
+ _structureVariant.length = item.length;
+ }
+
+ if (!_.isNil(item.outer)) {
+ _structureVariant.outer = item.outer;
+ }
+
+ if (!_.isNil(item.inner)) {
+ _structureVariant.inner = item.inner;
+ }
+
+ resource.structureVariant.push(_structureVariant);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/MolecularSequence"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR NamingSystem resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function namingSystem(type, props) {
+ const mappings = {
+ "NamingSystem": namingSystem_NamingSystem
+ };
+
+ return mappings[type](props)
+}
+
+function namingSystem_NamingSystem(props) {
+ const resource = {
+ resourceType: "NamingSystem",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.kind)) {
+ resource.kind = props.kind;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.responsible)) {
+ resource.responsible = props.responsible;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.usage)) {
+ resource.usage = props.usage;
+ }
+
+ if (!_.isNil(props.uniqueId)) {
+ let src = props.uniqueId;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.uniqueId = [];
+
+ for (let item of src) {
+ let _uniqueId = {};
+
+ if (!_.isNil(item.id)) {
+ _uniqueId.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _uniqueId.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _uniqueId.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _uniqueId.value = item.value;
+ }
+
+ if (!_.isNil(item.preferred)) {
+ _uniqueId.preferred = item.preferred;
+ }
+
+ if (!_.isNil(item.comment)) {
+ _uniqueId.comment = item.comment;
+ }
+
+ if (!_.isNil(item.period)) {
+ _uniqueId.period = item.period;
+ }
+
+ resource.uniqueId.push(_uniqueId);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/NamingSystem"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR NutritionOrder resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function nutritionOrder(type, props) {
+ const mappings = {
+ "NutritionOrder": nutritionOrder_NutritionOrder
+ };
+
+ return mappings[type](props)
+}
+
+function nutritionOrder_NutritionOrder(props) {
+ const resource = {
+ resourceType: "NutritionOrder",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = props.instantiatesCanonical;
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.instantiates)) {
+ resource.instantiates = props.instantiates;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.intent)) {
+ resource.intent = props.intent;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.dateTime)) {
+ resource.dateTime = props.dateTime;
+ }
+
+ if (!_.isNil(props.orderer)) {
+ resource.orderer = util.reference(props.orderer);
+ }
+
+ if (!_.isNil(props.allergyIntolerance)) {
+ if (!Array.isArray(props.allergyIntolerance)) { props.allergyIntolerance = [props.allergyIntolerance]; }
+ resource.allergyIntolerance = util.reference(props.allergyIntolerance);
+ }
+
+ if (!_.isNil(props.foodPreferenceModifier)) {
+ resource.foodPreferenceModifier = props.foodPreferenceModifier;
+ }
+
+ if (!_.isNil(props.excludeFoodModifier)) {
+ resource.excludeFoodModifier = props.excludeFoodModifier;
+ }
+
+ if (!_.isNil(props.oralDiet)) {
+ let src = props.oralDiet;
+ let _oralDiet = {};
+
+ if (!_.isNil(src.id)) {
+ _oralDiet.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _oralDiet.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.type)) {
+ _oralDiet.type = src.type;
+ }
+
+ if (!_.isNil(src.schedule)) {
+ _oralDiet.schedule = src.schedule;
+ }
+
+ if (!_.isNil(src.nutrient)) {
+ _oralDiet.nutrient = src.nutrient;
+ }
+
+ if (!_.isNil(src.texture)) {
+ _oralDiet.texture = src.texture;
+ }
+
+ if (!_.isNil(src.fluidConsistencyType)) {
+ _oralDiet.fluidConsistencyType = src.fluidConsistencyType;
+ }
+
+ if (!_.isNil(src.instruction)) {
+ _oralDiet.instruction = src.instruction;
+ }
+
+ resource.oralDiet = _oralDiet;
+ }
+
+ if (!_.isNil(props.supplement)) {
+ let src = props.supplement;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.supplement = [];
+
+ for (let item of src) {
+ let _supplement = {};
+
+ if (!_.isNil(item.id)) {
+ _supplement.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _supplement.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _supplement.type = item.type;
+ }
+
+ if (!_.isNil(item.productName)) {
+ _supplement.productName = item.productName;
+ }
+
+ if (!_.isNil(item.schedule)) {
+ _supplement.schedule = item.schedule;
+ }
+
+ if (!_.isNil(item.quantity)) {
+ _supplement.quantity = item.quantity;
+ }
+
+ if (!_.isNil(item.instruction)) {
+ _supplement.instruction = item.instruction;
+ }
+
+ resource.supplement.push(_supplement);
+ }
+ }
+
+ if (!_.isNil(props.enteralFormula)) {
+ let src = props.enteralFormula;
+ let _enteralFormula = {};
+
+ if (!_.isNil(src.id)) {
+ _enteralFormula.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _enteralFormula.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.baseFormulaType)) {
+ _enteralFormula.baseFormulaType = src.baseFormulaType;
+ }
+
+ if (!_.isNil(src.baseFormulaProductName)) {
+ _enteralFormula.baseFormulaProductName = src.baseFormulaProductName;
+ }
+
+ if (!_.isNil(src.additiveType)) {
+ _enteralFormula.additiveType = src.additiveType;
+ }
+
+ if (!_.isNil(src.additiveProductName)) {
+ _enteralFormula.additiveProductName = src.additiveProductName;
+ }
+
+ if (!_.isNil(src.caloricDensity)) {
+ _enteralFormula.caloricDensity = src.caloricDensity;
+ }
+
+ if (!_.isNil(src.routeofAdministration)) {
+ _enteralFormula.routeofAdministration = src.routeofAdministration;
+ }
+
+ if (!_.isNil(src.administration)) {
+ _enteralFormula.administration = src.administration;
+ }
+
+ if (!_.isNil(src.maxVolumeToDeliver)) {
+ _enteralFormula.maxVolumeToDeliver = src.maxVolumeToDeliver;
+ }
+
+ if (!_.isNil(src.administrationInstruction)) {
+ _enteralFormula.administrationInstruction = src.administrationInstruction;
+ }
+
+ resource.enteralFormula = _enteralFormula;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/NutritionOrder"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR NutritionProduct resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function nutritionProduct(type, props) {
+ const mappings = {
+ "NutritionProduct": nutritionProduct_NutritionProduct
+ };
+
+ return mappings[type](props)
+}
+
+function nutritionProduct_NutritionProduct(props) {
+ const resource = {
+ resourceType: "NutritionProduct",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.manufacturer)) {
+ if (!Array.isArray(props.manufacturer)) { props.manufacturer = [props.manufacturer]; }
+ resource.manufacturer = util.reference(props.manufacturer);
+ }
+
+ if (!_.isNil(props.nutrient)) {
+ let src = props.nutrient;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.nutrient = [];
+
+ for (let item of src) {
+ let _nutrient = {};
+
+ if (!_.isNil(item.id)) {
+ _nutrient.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _nutrient.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.item)) {
+ _nutrient.item = item.item;
+ }
+
+ if (!_.isNil(item.amount)) {
+ _nutrient.amount = item.amount;
+ }
+
+ resource.nutrient.push(_nutrient);
+ }
+ }
+
+ if (!_.isNil(props.ingredient)) {
+ let src = props.ingredient;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.ingredient = [];
+
+ for (let item of src) {
+ let _ingredient = {};
+
+ if (!_.isNil(item.id)) {
+ _ingredient.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _ingredient.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.item)) {
+ _ingredient.item = item.item;
+ }
+
+ if (!_.isNil(item.amount)) {
+ _ingredient.amount = item.amount;
+ }
+
+ resource.ingredient.push(_ingredient);
+ }
+ }
+
+ if (!_.isNil(props.knownAllergen)) {
+ resource.knownAllergen = props.knownAllergen;
+ }
+
+ if (!_.isNil(props.productCharacteristic)) {
+ let src = props.productCharacteristic;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.productCharacteristic = [];
+
+ for (let item of src) {
+ let _productCharacteristic = {};
+
+ if (!_.isNil(item.id)) {
+ _productCharacteristic.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _productCharacteristic.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _productCharacteristic.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _productCharacteristic.value = item.value;
+ }
+
+ resource.productCharacteristic.push(_productCharacteristic);
+ }
+ }
+
+ if (!_.isNil(props.instance)) {
+ let src = props.instance;
+ let _instance = {};
+
+ if (!_.isNil(src.id)) {
+ _instance.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _instance.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.quantity)) {
+ _instance.quantity = src.quantity;
+ }
+
+ if (!_.isNil(src.identifier)) {
+ _instance.identifier = src.identifier;
+ }
+
+ if (!_.isNil(src.lotNumber)) {
+ _instance.lotNumber = src.lotNumber;
+ }
+
+ if (!_.isNil(src.expiry)) {
+ _instance.expiry = src.expiry;
+ }
+
+ if (!_.isNil(src.useBy)) {
+ _instance.useBy = src.useBy;
+ }
+
+ resource.instance = _instance;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/NutritionProduct"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Observation resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function observation(type, props) {
+ const mappings = {
+ "Observation": observation_Observation
+ };
+
+ return mappings[type](props)
+}
+
+function observation_Observation(props) {
+ const resource = {
+ resourceType: "Observation",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.focus)) {
+ if (!Array.isArray(props.focus)) { props.focus = [props.focus]; }
+ resource.focus = util.reference(props.focus);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.effective)) {
+ util.composite(resource, "effective", props.effective);
+ }
+
+ if (!_.isNil(props.issued)) {
+ resource.issued = props.issued;
+ }
+
+ if (!_.isNil(props.performer)) {
+ if (!Array.isArray(props.performer)) { props.performer = [props.performer]; }
+ resource.performer = util.reference(props.performer);
+ }
+
+ if (!_.isNil(props.value)) {
+ util.composite(resource, "value", props.value);
+ }
+
+ if (!_.isNil(props.dataAbsentReason)) {
+ resource.dataAbsentReason = props.dataAbsentReason;
+ }
+
+ if (!_.isNil(props.interpretation)) {
+ resource.interpretation = props.interpretation;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.bodySite)) {
+ resource.bodySite = props.bodySite;
+ }
+
+ if (!_.isNil(props.method)) {
+ resource.method = props.method;
+ }
+
+ if (!_.isNil(props.specimen)) {
+ resource.specimen = util.reference(props.specimen);
+ }
+
+ if (!_.isNil(props.device)) {
+ resource.device = util.reference(props.device);
+ }
+
+ if (!_.isNil(props.referenceRange)) {
+ let src = props.referenceRange;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.referenceRange = [];
+
+ for (let item of src) {
+ let _referenceRange = {};
+
+ if (!_.isNil(item.id)) {
+ _referenceRange.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _referenceRange.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.low)) {
+ _referenceRange.low = item.low;
+ }
+
+ if (!_.isNil(item.high)) {
+ _referenceRange.high = item.high;
+ }
+
+ if (!_.isNil(item.type)) {
+ _referenceRange.type = item.type;
+ }
+
+ if (!_.isNil(item.appliesTo)) {
+ _referenceRange.appliesTo = item.appliesTo;
+ }
+
+ if (!_.isNil(item.age)) {
+ _referenceRange.age = item.age;
+ }
+
+ if (!_.isNil(item.text)) {
+ _referenceRange.text = item.text;
+ }
+
+ resource.referenceRange.push(_referenceRange);
+ }
+ }
+
+ if (!_.isNil(props.hasMember)) {
+ if (!Array.isArray(props.hasMember)) { props.hasMember = [props.hasMember]; }
+ resource.hasMember = util.reference(props.hasMember);
+ }
+
+ if (!_.isNil(props.derivedFrom)) {
+ if (!Array.isArray(props.derivedFrom)) { props.derivedFrom = [props.derivedFrom]; }
+ resource.derivedFrom = util.reference(props.derivedFrom);
+ }
+
+ if (!_.isNil(props.component)) {
+ let src = props.component;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.component = [];
+
+ for (let item of src) {
+ let _component = {};
+
+ if (!_.isNil(item.id)) {
+ _component.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _component.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _component.code = item.code;
+ }
+
+ if (!_.isNil(item.value)) {
+ _component.value = item.value;
+ }
+
+ if (!_.isNil(item.dataAbsentReason)) {
+ _component.dataAbsentReason = item.dataAbsentReason;
+ }
+
+ if (!_.isNil(item.interpretation)) {
+ _component.interpretation = item.interpretation;
+ }
+
+ resource.component.push(_component);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Observation"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ObservationDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function observationDefinition(type, props) {
+ const mappings = {
+ "ObservationDefinition": observationDefinition_ObservationDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function observationDefinition_ObservationDefinition(props) {
+ const resource = {
+ resourceType: "ObservationDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.permittedDataType)) {
+ resource.permittedDataType = props.permittedDataType;
+ }
+
+ if (!_.isNil(props.multipleResultsAllowed)) {
+ resource.multipleResultsAllowed = props.multipleResultsAllowed;
+ }
+
+ if (!_.isNil(props.method)) {
+ resource.method = props.method;
+ }
+
+ if (!_.isNil(props.preferredReportName)) {
+ resource.preferredReportName = props.preferredReportName;
+ }
+
+ if (!_.isNil(props.quantitativeDetails)) {
+ let src = props.quantitativeDetails;
+ let _quantitativeDetails = {};
+
+ if (!_.isNil(src.id)) {
+ _quantitativeDetails.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _quantitativeDetails.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.customaryUnit)) {
+ _quantitativeDetails.customaryUnit = src.customaryUnit;
+ }
+
+ if (!_.isNil(src.unit)) {
+ _quantitativeDetails.unit = src.unit;
+ }
+
+ if (!_.isNil(src.conversionFactor)) {
+ _quantitativeDetails.conversionFactor = src.conversionFactor;
+ }
+
+ if (!_.isNil(src.decimalPrecision)) {
+ _quantitativeDetails.decimalPrecision = src.decimalPrecision;
+ }
+
+ resource.quantitativeDetails = _quantitativeDetails;
+ }
+
+ if (!_.isNil(props.qualifiedInterval)) {
+ let src = props.qualifiedInterval;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.qualifiedInterval = [];
+
+ for (let item of src) {
+ let _qualifiedInterval = {};
+
+ if (!_.isNil(item.id)) {
+ _qualifiedInterval.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _qualifiedInterval.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.category)) {
+ _qualifiedInterval.category = item.category;
+ }
+
+ if (!_.isNil(item.range)) {
+ _qualifiedInterval.range = item.range;
+ }
+
+ if (!_.isNil(item.context)) {
+ _qualifiedInterval.context = item.context;
+ }
+
+ if (!_.isNil(item.appliesTo)) {
+ _qualifiedInterval.appliesTo = item.appliesTo;
+ }
+
+ if (!_.isNil(item.gender)) {
+ _qualifiedInterval.gender = item.gender;
+ }
+
+ if (!_.isNil(item.age)) {
+ _qualifiedInterval.age = item.age;
+ }
+
+ if (!_.isNil(item.gestationalAge)) {
+ _qualifiedInterval.gestationalAge = item.gestationalAge;
+ }
+
+ if (!_.isNil(item.condition)) {
+ _qualifiedInterval.condition = item.condition;
+ }
+
+ resource.qualifiedInterval.push(_qualifiedInterval);
+ }
+ }
+
+ if (!_.isNil(props.validCodedValueSet)) {
+ resource.validCodedValueSet = util.reference(props.validCodedValueSet);
+ }
+
+ if (!_.isNil(props.normalCodedValueSet)) {
+ resource.normalCodedValueSet = util.reference(props.normalCodedValueSet);
+ }
+
+ if (!_.isNil(props.abnormalCodedValueSet)) {
+ resource.abnormalCodedValueSet = util.reference(props.abnormalCodedValueSet);
+ }
+
+ if (!_.isNil(props.criticalCodedValueSet)) {
+ resource.criticalCodedValueSet = util.reference(props.criticalCodedValueSet);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ObservationDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR OperationDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function operationDefinition(type, props) {
+ const mappings = {
+ "OperationDefinition": operationDefinition_OperationDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function operationDefinition_OperationDefinition(props) {
+ const resource = {
+ resourceType: "OperationDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.kind)) {
+ resource.kind = props.kind;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.affectsState)) {
+ resource.affectsState = props.affectsState;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.comment)) {
+ resource.comment = props.comment;
+ }
+
+ if (!_.isNil(props.base)) {
+ resource.base = props.base;
+ }
+
+ if (!_.isNil(props.resource)) {
+ resource.resource = props.resource;
+ }
+
+ if (!_.isNil(props.system)) {
+ resource.system = props.system;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.instance)) {
+ resource.instance = props.instance;
+ }
+
+ if (!_.isNil(props.inputProfile)) {
+ resource.inputProfile = props.inputProfile;
+ }
+
+ if (!_.isNil(props.outputProfile)) {
+ resource.outputProfile = props.outputProfile;
+ }
+
+ if (!_.isNil(props.parameter)) {
+ let src = props.parameter;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.parameter = [];
+
+ for (let item of src) {
+ let _parameter = {};
+
+ if (!_.isNil(item.id)) {
+ _parameter.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _parameter.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _parameter.name = item.name;
+ }
+
+ if (!_.isNil(item.use)) {
+ _parameter.use = item.use;
+ }
+
+ if (!_.isNil(item.min)) {
+ _parameter.min = item.min;
+ }
+
+ if (!_.isNil(item.max)) {
+ _parameter.max = item.max;
+ }
+
+ if (!_.isNil(item.documentation)) {
+ _parameter.documentation = item.documentation;
+ }
+
+ if (!_.isNil(item.type)) {
+ _parameter.type = item.type;
+ }
+
+ if (!_.isNil(item.targetProfile)) {
+ _parameter.targetProfile = item.targetProfile;
+ }
+
+ if (!_.isNil(item.searchType)) {
+ _parameter.searchType = item.searchType;
+ }
+
+ if (!_.isNil(item.binding)) {
+ _parameter.binding = item.binding;
+ }
+
+ if (!_.isNil(item.referencedFrom)) {
+ _parameter.referencedFrom = item.referencedFrom;
+ }
+
+ resource.parameter.push(_parameter);
+ }
+ }
+
+ if (!_.isNil(props.overload)) {
+ let src = props.overload;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.overload = [];
+
+ for (let item of src) {
+ let _overload = {};
+
+ if (!_.isNil(item.id)) {
+ _overload.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _overload.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.parameterName)) {
+ _overload.parameterName = item.parameterName;
+ }
+
+ if (!_.isNil(item.comment)) {
+ _overload.comment = item.comment;
+ }
+
+ resource.overload.push(_overload);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/OperationDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR OperationOutcome resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function operationOutcome(type, props) {
+ const mappings = {
+ "OperationOutcome": operationOutcome_OperationOutcome
+ };
+
+ return mappings[type](props)
+}
+
+function operationOutcome_OperationOutcome(props) {
+ const resource = {
+ resourceType: "OperationOutcome",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.issue)) {
+ let src = props.issue;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.issue = [];
+
+ for (let item of src) {
+ let _issue = {};
+
+ if (!_.isNil(item.id)) {
+ _issue.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _issue.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.severity)) {
+ _issue.severity = item.severity;
+ }
+
+ if (!_.isNil(item.code)) {
+ _issue.code = item.code;
+ }
+
+ if (!_.isNil(item.details)) {
+ _issue.details = item.details;
+ }
+
+ if (!_.isNil(item.diagnostics)) {
+ _issue.diagnostics = item.diagnostics;
+ }
+
+ if (!_.isNil(item.location)) {
+ _issue.location = item.location;
+ }
+
+ if (!_.isNil(item.expression)) {
+ _issue.expression = item.expression;
+ }
+
+ resource.issue.push(_issue);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/OperationOutcome"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Organization resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function organization(type, props) {
+ const mappings = {
+ "Organization": organization_Organization
+ };
+
+ return mappings[type](props)
+}
+
+function organization_Organization(props) {
+ const resource = {
+ resourceType: "Organization",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.alias)) {
+ resource.alias = props.alias;
+ }
+
+ if (!_.isNil(props.telecom)) {
+ resource.telecom = props.telecom;
+ }
+
+ if (!_.isNil(props.address)) {
+ resource.address = props.address;
+ }
+
+ if (!_.isNil(props.partOf)) {
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.contact)) {
+ let src = props.contact;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.contact = [];
+
+ for (let item of src) {
+ let _contact = {};
+
+ if (!_.isNil(item.id)) {
+ _contact.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _contact.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.purpose)) {
+ _contact.purpose = item.purpose;
+ }
+
+ if (!_.isNil(item.name)) {
+ _contact.name = item.name;
+ }
+
+ if (!_.isNil(item.telecom)) {
+ _contact.telecom = item.telecom;
+ }
+
+ if (!_.isNil(item.address)) {
+ _contact.address = item.address;
+ }
+
+ resource.contact.push(_contact);
+ }
+ }
+
+ if (!_.isNil(props.endpoint)) {
+ if (!Array.isArray(props.endpoint)) { props.endpoint = [props.endpoint]; }
+ resource.endpoint = util.reference(props.endpoint);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Organization"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR OrganizationAffiliation resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function organizationAffiliation(type, props) {
+ const mappings = {
+ "OrganizationAffiliation": organizationAffiliation_OrganizationAffiliation
+ };
+
+ return mappings[type](props)
+}
+
+function organizationAffiliation_OrganizationAffiliation(props) {
+ const resource = {
+ resourceType: "OrganizationAffiliation",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.organization)) {
+ resource.organization = util.reference(props.organization);
+ }
+
+ if (!_.isNil(props.participatingOrganization)) {
+ resource.participatingOrganization = util.reference(props.participatingOrganization);
+ }
+
+ if (!_.isNil(props.network)) {
+ if (!Array.isArray(props.network)) { props.network = [props.network]; }
+ resource.network = util.reference(props.network);
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.specialty)) {
+ resource.specialty = props.specialty;
+ }
+
+ if (!_.isNil(props.location)) {
+ if (!Array.isArray(props.location)) { props.location = [props.location]; }
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.healthcareService)) {
+ if (!Array.isArray(props.healthcareService)) { props.healthcareService = [props.healthcareService]; }
+ resource.healthcareService = util.reference(props.healthcareService);
+ }
+
+ if (!_.isNil(props.telecom)) {
+ resource.telecom = props.telecom;
+ }
+
+ if (!_.isNil(props.endpoint)) {
+ if (!Array.isArray(props.endpoint)) { props.endpoint = [props.endpoint]; }
+ resource.endpoint = util.reference(props.endpoint);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/OrganizationAffiliation"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR PackagedProductDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function packagedProductDefinition(type, props) {
+ const mappings = {
+ "PackagedProductDefinition": packagedProductDefinition_PackagedProductDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function packagedProductDefinition_PackagedProductDefinition(props) {
+ const resource = {
+ resourceType: "PackagedProductDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.packageFor)) {
+ if (!Array.isArray(props.packageFor)) { props.packageFor = [props.packageFor]; }
+ resource.packageFor = util.reference(props.packageFor);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusDate)) {
+ resource.statusDate = props.statusDate;
+ }
+
+ if (!_.isNil(props.containedItemQuantity)) {
+ resource.containedItemQuantity = props.containedItemQuantity;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.legalStatusOfSupply)) {
+ let src = props.legalStatusOfSupply;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.legalStatusOfSupply = [];
+
+ for (let item of src) {
+ let _legalStatusOfSupply = {};
+
+ if (!_.isNil(item.id)) {
+ _legalStatusOfSupply.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _legalStatusOfSupply.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _legalStatusOfSupply.code = item.code;
+ }
+
+ if (!_.isNil(item.jurisdiction)) {
+ _legalStatusOfSupply.jurisdiction = item.jurisdiction;
+ }
+
+ resource.legalStatusOfSupply.push(_legalStatusOfSupply);
+ }
+ }
+
+ if (!_.isNil(props.marketingStatus)) {
+ resource.marketingStatus = props.marketingStatus;
+ }
+
+ if (!_.isNil(props.characteristic)) {
+ resource.characteristic = props.characteristic;
+ }
+
+ if (!_.isNil(props.copackagedIndicator)) {
+ resource.copackagedIndicator = props.copackagedIndicator;
+ }
+
+ if (!_.isNil(props.manufacturer)) {
+ if (!Array.isArray(props.manufacturer)) { props.manufacturer = [props.manufacturer]; }
+ resource.manufacturer = util.reference(props.manufacturer);
+ }
+
+ if (!_.isNil(props.package)) {
+ let src = props.package;
+ let _package = {};
+
+ if (!_.isNil(src.id)) {
+ _package.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _package.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.identifier)) {
+ _package.identifier = src.identifier;
+ }
+
+ if (!_.isNil(src.type)) {
+ _package.type = src.type;
+ }
+
+ if (!_.isNil(src.quantity)) {
+ _package.quantity = src.quantity;
+ }
+
+ if (!_.isNil(src.material)) {
+ _package.material = src.material;
+ }
+
+ if (!_.isNil(src.alternateMaterial)) {
+ _package.alternateMaterial = src.alternateMaterial;
+ }
+
+ if (!_.isNil(src.shelfLifeStorage)) {
+ _package.shelfLifeStorage = src.shelfLifeStorage;
+ }
+
+ if (!_.isNil(src.manufacturer)) {
+ _package.manufacturer = src.manufacturer;
+ }
+
+ if (!_.isNil(src.property)) {
+ _package.property = src.property;
+ }
+
+ if (!_.isNil(src.containedItem)) {
+ _package.containedItem = src.containedItem;
+ }
+
+ resource.package = _package;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/PackagedProductDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Parameters resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function parameters(type, props) {
+ const mappings = {
+ "Parameters": parameters_Parameters
+ };
+
+ return mappings[type](props)
+}
+
+function parameters_Parameters(props) {
+ const resource = {
+ resourceType: "Parameters",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.parameter)) {
+ let src = props.parameter;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.parameter = [];
+
+ for (let item of src) {
+ let _parameter = {};
+
+ if (!_.isNil(item.id)) {
+ _parameter.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _parameter.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _parameter.name = item.name;
+ }
+
+ if (!_.isNil(item.value)) {
+ _parameter.value = item.value;
+ }
+
+ if (!_.isNil(item.resource)) {
+ _parameter.resource = item.resource;
+ }
+
+ resource.parameter.push(_parameter);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Parameters"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Patient resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function patient(type, props) {
+ const mappings = {
+ "Patient": patient_Patient
+ };
+
+ return mappings[type](props)
+}
+
+function patient_Patient(props) {
+ const resource = {
+ resourceType: "Patient",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.telecom)) {
+ resource.telecom = props.telecom;
+ }
+
+ if (!_.isNil(props.gender)) {
+ resource.gender = props.gender;
+ }
+
+ if (!_.isNil(props.birthDate)) {
+ resource.birthDate = props.birthDate;
+ }
+
+ if (!_.isNil(props.deceased)) {
+ util.composite(resource, "deceased", props.deceased);
+ }
+
+ if (!_.isNil(props.address)) {
+ resource.address = props.address;
+ }
+
+ if (!_.isNil(props.maritalStatus)) {
+ resource.maritalStatus = props.maritalStatus;
+ }
+
+ if (!_.isNil(props.multipleBirth)) {
+ util.composite(resource, "multipleBirth", props.multipleBirth);
+ }
+
+ if (!_.isNil(props.photo)) {
+ resource.photo = props.photo;
+ }
+
+ if (!_.isNil(props.contact)) {
+ let src = props.contact;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.contact = [];
+
+ for (let item of src) {
+ let _contact = {};
+
+ if (!_.isNil(item.id)) {
+ _contact.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _contact.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.relationship)) {
+ _contact.relationship = item.relationship;
+ }
+
+ if (!_.isNil(item.name)) {
+ _contact.name = item.name;
+ }
+
+ if (!_.isNil(item.telecom)) {
+ _contact.telecom = item.telecom;
+ }
+
+ if (!_.isNil(item.address)) {
+ _contact.address = item.address;
+ }
+
+ if (!_.isNil(item.gender)) {
+ _contact.gender = item.gender;
+ }
+
+ if (!_.isNil(item.organization)) {
+ _contact.organization = item.organization;
+ }
+
+ if (!_.isNil(item.period)) {
+ _contact.period = item.period;
+ }
+
+ resource.contact.push(_contact);
+ }
+ }
+
+ if (!_.isNil(props.communication)) {
+ let src = props.communication;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.communication = [];
+
+ for (let item of src) {
+ let _communication = {};
+
+ if (!_.isNil(item.id)) {
+ _communication.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _communication.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.language)) {
+ _communication.language = item.language;
+ }
+
+ if (!_.isNil(item.preferred)) {
+ _communication.preferred = item.preferred;
+ }
+
+ resource.communication.push(_communication);
+ }
+ }
+
+ if (!_.isNil(props.generalPractitioner)) {
+ if (!Array.isArray(props.generalPractitioner)) { props.generalPractitioner = [props.generalPractitioner]; }
+ resource.generalPractitioner = util.reference(props.generalPractitioner);
+ }
+
+ if (!_.isNil(props.managingOrganization)) {
+ resource.managingOrganization = util.reference(props.managingOrganization);
+ }
+
+ if (!_.isNil(props.link)) {
+ let src = props.link;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.link = [];
+
+ for (let item of src) {
+ let _link = {};
+
+ if (!_.isNil(item.id)) {
+ _link.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _link.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.other)) {
+ _link.other = item.other;
+ }
+
+ if (!_.isNil(item.type)) {
+ _link.type = item.type;
+ }
+
+ resource.link.push(_link);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Patient"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR PaymentNotice resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function paymentNotice(type, props) {
+ const mappings = {
+ "PaymentNotice": paymentNotice_PaymentNotice
+ };
+
+ return mappings[type](props)
+}
+
+function paymentNotice_PaymentNotice(props) {
+ const resource = {
+ resourceType: "PaymentNotice",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.request)) {
+ resource.request = util.reference(props.request);
+ }
+
+ if (!_.isNil(props.response)) {
+ resource.response = util.reference(props.response);
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.provider)) {
+ resource.provider = util.reference(props.provider);
+ }
+
+ if (!_.isNil(props.payment)) {
+ resource.payment = util.reference(props.payment);
+ }
+
+ if (!_.isNil(props.paymentDate)) {
+ resource.paymentDate = props.paymentDate;
+ }
+
+ if (!_.isNil(props.payee)) {
+ resource.payee = util.reference(props.payee);
+ }
+
+ if (!_.isNil(props.recipient)) {
+ resource.recipient = util.reference(props.recipient);
+ }
+
+ if (!_.isNil(props.amount)) {
+ resource.amount = props.amount;
+ }
+
+ if (!_.isNil(props.paymentStatus)) {
+ resource.paymentStatus = props.paymentStatus;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/PaymentNotice"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR PaymentReconciliation resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function paymentReconciliation(type, props) {
+ const mappings = {
+ "PaymentReconciliation": paymentReconciliation_PaymentReconciliation
+ };
+
+ return mappings[type](props)
+}
+
+function paymentReconciliation_PaymentReconciliation(props) {
+ const resource = {
+ resourceType: "PaymentReconciliation",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.paymentIssuer)) {
+ resource.paymentIssuer = util.reference(props.paymentIssuer);
+ }
+
+ if (!_.isNil(props.request)) {
+ resource.request = util.reference(props.request);
+ }
+
+ if (!_.isNil(props.requestor)) {
+ resource.requestor = util.reference(props.requestor);
+ }
+
+ if (!_.isNil(props.outcome)) {
+ resource.outcome = props.outcome;
+ }
+
+ if (!_.isNil(props.disposition)) {
+ resource.disposition = props.disposition;
+ }
+
+ if (!_.isNil(props.paymentDate)) {
+ resource.paymentDate = props.paymentDate;
+ }
+
+ if (!_.isNil(props.paymentAmount)) {
+ resource.paymentAmount = props.paymentAmount;
+ }
+
+ if (!_.isNil(props.paymentIdentifier)) {
+ resource.paymentIdentifier = util.identifier(props.paymentIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.detail)) {
+ let src = props.detail;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.detail = [];
+
+ for (let item of src) {
+ let _detail = {};
+
+ if (!_.isNil(item.id)) {
+ _detail.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _detail.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.identifier)) {
+ _detail.identifier = item.identifier;
+ }
+
+ if (!_.isNil(item.predecessor)) {
+ _detail.predecessor = item.predecessor;
+ }
+
+ if (!_.isNil(item.type)) {
+ _detail.type = item.type;
+ }
+
+ if (!_.isNil(item.request)) {
+ _detail.request = item.request;
+ }
+
+ if (!_.isNil(item.submitter)) {
+ _detail.submitter = item.submitter;
+ }
+
+ if (!_.isNil(item.response)) {
+ _detail.response = item.response;
+ }
+
+ if (!_.isNil(item.date)) {
+ _detail.date = item.date;
+ }
+
+ if (!_.isNil(item.responsible)) {
+ _detail.responsible = item.responsible;
+ }
+
+ if (!_.isNil(item.payee)) {
+ _detail.payee = item.payee;
+ }
+
+ if (!_.isNil(item.amount)) {
+ _detail.amount = item.amount;
+ }
+
+ resource.detail.push(_detail);
+ }
+ }
+
+ if (!_.isNil(props.formCode)) {
+ resource.formCode = props.formCode;
+ }
+
+ if (!_.isNil(props.processNote)) {
+ let src = props.processNote;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.processNote = [];
+
+ for (let item of src) {
+ let _processNote = {};
+
+ if (!_.isNil(item.id)) {
+ _processNote.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _processNote.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _processNote.type = item.type;
+ }
+
+ if (!_.isNil(item.text)) {
+ _processNote.text = item.text;
+ }
+
+ resource.processNote.push(_processNote);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/PaymentReconciliation"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Person resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function person(type, props) {
+ const mappings = {
+ "Person": person_Person
+ };
+
+ return mappings[type](props)
+}
+
+function person_Person(props) {
+ const resource = {
+ resourceType: "Person",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.telecom)) {
+ resource.telecom = props.telecom;
+ }
+
+ if (!_.isNil(props.gender)) {
+ resource.gender = props.gender;
+ }
+
+ if (!_.isNil(props.birthDate)) {
+ resource.birthDate = props.birthDate;
+ }
+
+ if (!_.isNil(props.address)) {
+ resource.address = props.address;
+ }
+
+ if (!_.isNil(props.photo)) {
+ resource.photo = props.photo;
+ }
+
+ if (!_.isNil(props.managingOrganization)) {
+ resource.managingOrganization = util.reference(props.managingOrganization);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.link)) {
+ let src = props.link;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.link = [];
+
+ for (let item of src) {
+ let _link = {};
+
+ if (!_.isNil(item.id)) {
+ _link.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _link.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.target)) {
+ _link.target = item.target;
+ }
+
+ if (!_.isNil(item.assurance)) {
+ _link.assurance = item.assurance;
+ }
+
+ resource.link.push(_link);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Person"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR PlanDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function planDefinition(type, props) {
+ const mappings = {
+ "PlanDefinition": planDefinition_PlanDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function planDefinition_PlanDefinition(props) {
+ const resource = {
+ resourceType: "PlanDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.subtitle)) {
+ resource.subtitle = props.subtitle;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.subject)) {
+ util.composite(resource, "subject", props.subject);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.usage)) {
+ resource.usage = props.usage;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.topic)) {
+ resource.topic = props.topic;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.library)) {
+ resource.library = props.library;
+ }
+
+ if (!_.isNil(props.goal)) {
+ let src = props.goal;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.goal = [];
+
+ for (let item of src) {
+ let _goal = {};
+
+ if (!_.isNil(item.id)) {
+ _goal.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _goal.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.category)) {
+ _goal.category = item.category;
+ }
+
+ if (!_.isNil(item.description)) {
+ _goal.description = item.description;
+ }
+
+ if (!_.isNil(item.priority)) {
+ _goal.priority = item.priority;
+ }
+
+ if (!_.isNil(item.start)) {
+ _goal.start = item.start;
+ }
+
+ if (!_.isNil(item.addresses)) {
+ _goal.addresses = item.addresses;
+ }
+
+ if (!_.isNil(item.documentation)) {
+ _goal.documentation = item.documentation;
+ }
+
+ if (!_.isNil(item.target)) {
+ _goal.target = item.target;
+ }
+
+ resource.goal.push(_goal);
+ }
+ }
+
+ if (!_.isNil(props.action)) {
+ let src = props.action;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.action = [];
+
+ for (let item of src) {
+ let _action = {};
+
+ if (!_.isNil(item.id)) {
+ _action.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _action.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.prefix)) {
+ _action.prefix = item.prefix;
+ }
+
+ if (!_.isNil(item.title)) {
+ _action.title = item.title;
+ }
+
+ if (!_.isNil(item.description)) {
+ _action.description = item.description;
+ }
+
+ if (!_.isNil(item.textEquivalent)) {
+ _action.textEquivalent = item.textEquivalent;
+ }
+
+ if (!_.isNil(item.priority)) {
+ _action.priority = item.priority;
+ }
+
+ if (!_.isNil(item.code)) {
+ _action.code = item.code;
+ }
+
+ if (!_.isNil(item.reason)) {
+ _action.reason = item.reason;
+ }
+
+ if (!_.isNil(item.documentation)) {
+ _action.documentation = item.documentation;
+ }
+
+ if (!_.isNil(item.goalId)) {
+ _action.goalId = item.goalId;
+ }
+
+ if (!_.isNil(item.subject)) {
+ _action.subject = item.subject;
+ }
+
+ if (!_.isNil(item.trigger)) {
+ _action.trigger = item.trigger;
+ }
+
+ if (!_.isNil(item.condition)) {
+ _action.condition = item.condition;
+ }
+
+ if (!_.isNil(item.input)) {
+ _action.input = item.input;
+ }
+
+ if (!_.isNil(item.output)) {
+ _action.output = item.output;
+ }
+
+ if (!_.isNil(item.relatedAction)) {
+ _action.relatedAction = item.relatedAction;
+ }
+
+ if (!_.isNil(item.timing)) {
+ _action.timing = item.timing;
+ }
+
+ if (!_.isNil(item.participant)) {
+ _action.participant = item.participant;
+ }
+
+ if (!_.isNil(item.type)) {
+ _action.type = item.type;
+ }
+
+ if (!_.isNil(item.groupingBehavior)) {
+ _action.groupingBehavior = item.groupingBehavior;
+ }
+
+ if (!_.isNil(item.selectionBehavior)) {
+ _action.selectionBehavior = item.selectionBehavior;
+ }
+
+ if (!_.isNil(item.requiredBehavior)) {
+ _action.requiredBehavior = item.requiredBehavior;
+ }
+
+ if (!_.isNil(item.precheckBehavior)) {
+ _action.precheckBehavior = item.precheckBehavior;
+ }
+
+ if (!_.isNil(item.cardinalityBehavior)) {
+ _action.cardinalityBehavior = item.cardinalityBehavior;
+ }
+
+ if (!_.isNil(item.definition)) {
+ _action.definition = item.definition;
+ }
+
+ if (!_.isNil(item.transform)) {
+ _action.transform = item.transform;
+ }
+
+ if (!_.isNil(item.dynamicValue)) {
+ _action.dynamicValue = item.dynamicValue;
+ }
+
+ resource.action.push(_action);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/PlanDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Practitioner resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function practitioner(type, props) {
+ const mappings = {
+ "Practitioner": practitioner_Practitioner
+ };
+
+ return mappings[type](props)
+}
+
+function practitioner_Practitioner(props) {
+ const resource = {
+ resourceType: "Practitioner",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.telecom)) {
+ resource.telecom = props.telecom;
+ }
+
+ if (!_.isNil(props.address)) {
+ resource.address = props.address;
+ }
+
+ if (!_.isNil(props.gender)) {
+ resource.gender = props.gender;
+ }
+
+ if (!_.isNil(props.birthDate)) {
+ resource.birthDate = props.birthDate;
+ }
+
+ if (!_.isNil(props.photo)) {
+ resource.photo = props.photo;
+ }
+
+ if (!_.isNil(props.qualification)) {
+ let src = props.qualification;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.qualification = [];
+
+ for (let item of src) {
+ let _qualification = {};
+
+ if (!_.isNil(item.id)) {
+ _qualification.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _qualification.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.identifier)) {
+ _qualification.identifier = item.identifier;
+ }
+
+ if (!_.isNil(item.code)) {
+ _qualification.code = item.code;
+ }
+
+ if (!_.isNil(item.period)) {
+ _qualification.period = item.period;
+ }
+
+ if (!_.isNil(item.issuer)) {
+ _qualification.issuer = item.issuer;
+ }
+
+ resource.qualification.push(_qualification);
+ }
+ }
+
+ if (!_.isNil(props.communication)) {
+ resource.communication = props.communication;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Practitioner"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR PractitionerRole resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function practitionerRole(type, props) {
+ const mappings = {
+ "PractitionerRole": practitionerRole_PractitionerRole
+ };
+
+ return mappings[type](props)
+}
+
+function practitionerRole_PractitionerRole(props) {
+ const resource = {
+ resourceType: "PractitionerRole",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.practitioner)) {
+ resource.practitioner = util.reference(props.practitioner);
+ }
+
+ if (!_.isNil(props.organization)) {
+ resource.organization = util.reference(props.organization);
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.specialty)) {
+ resource.specialty = props.specialty;
+ }
+
+ if (!_.isNil(props.location)) {
+ if (!Array.isArray(props.location)) { props.location = [props.location]; }
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.healthcareService)) {
+ if (!Array.isArray(props.healthcareService)) { props.healthcareService = [props.healthcareService]; }
+ resource.healthcareService = util.reference(props.healthcareService);
+ }
+
+ if (!_.isNil(props.telecom)) {
+ resource.telecom = props.telecom;
+ }
+
+ if (!_.isNil(props.availableTime)) {
+ let src = props.availableTime;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.availableTime = [];
+
+ for (let item of src) {
+ let _availableTime = {};
+
+ if (!_.isNil(item.id)) {
+ _availableTime.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _availableTime.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.daysOfWeek)) {
+ _availableTime.daysOfWeek = item.daysOfWeek;
+ }
+
+ if (!_.isNil(item.allDay)) {
+ _availableTime.allDay = item.allDay;
+ }
+
+ if (!_.isNil(item.availableStartTime)) {
+ _availableTime.availableStartTime = item.availableStartTime;
+ }
+
+ if (!_.isNil(item.availableEndTime)) {
+ _availableTime.availableEndTime = item.availableEndTime;
+ }
+
+ resource.availableTime.push(_availableTime);
+ }
+ }
+
+ if (!_.isNil(props.notAvailable)) {
+ let src = props.notAvailable;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.notAvailable = [];
+
+ for (let item of src) {
+ let _notAvailable = {};
+
+ if (!_.isNil(item.id)) {
+ _notAvailable.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _notAvailable.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _notAvailable.description = item.description;
+ }
+
+ if (!_.isNil(item.during)) {
+ _notAvailable.during = item.during;
+ }
+
+ resource.notAvailable.push(_notAvailable);
+ }
+ }
+
+ if (!_.isNil(props.availabilityExceptions)) {
+ resource.availabilityExceptions = props.availabilityExceptions;
+ }
+
+ if (!_.isNil(props.endpoint)) {
+ if (!Array.isArray(props.endpoint)) { props.endpoint = [props.endpoint]; }
+ resource.endpoint = util.reference(props.endpoint);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/PractitionerRole"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Procedure resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function procedure(type, props) {
+ const mappings = {
+ "Procedure": procedure_Procedure
+ };
+
+ return mappings[type](props)
+}
+
+function procedure_Procedure(props) {
+ const resource = {
+ resourceType: "Procedure",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = props.instantiatesCanonical;
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.performed)) {
+ util.composite(resource, "performed", props.performed);
+ }
+
+ if (!_.isNil(props.recorder)) {
+ resource.recorder = util.reference(props.recorder);
+ }
+
+ if (!_.isNil(props.asserter)) {
+ resource.asserter = util.reference(props.asserter);
+ }
+
+ if (!_.isNil(props.performer)) {
+ let src = props.performer;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.performer = [];
+
+ for (let item of src) {
+ let _performer = {};
+
+ if (!_.isNil(item.id)) {
+ _performer.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _performer.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.function)) {
+ _performer.function = item.function;
+ }
+
+ if (!_.isNil(item.actor)) {
+ _performer.actor = item.actor;
+ }
+
+ if (!_.isNil(item.onBehalfOf)) {
+ _performer.onBehalfOf = item.onBehalfOf;
+ }
+
+ resource.performer.push(_performer);
+ }
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.bodySite)) {
+ resource.bodySite = props.bodySite;
+ }
+
+ if (!_.isNil(props.outcome)) {
+ resource.outcome = props.outcome;
+ }
+
+ if (!_.isNil(props.report)) {
+ if (!Array.isArray(props.report)) { props.report = [props.report]; }
+ resource.report = util.reference(props.report);
+ }
+
+ if (!_.isNil(props.complication)) {
+ resource.complication = props.complication;
+ }
+
+ if (!_.isNil(props.complicationDetail)) {
+ if (!Array.isArray(props.complicationDetail)) { props.complicationDetail = [props.complicationDetail]; }
+ resource.complicationDetail = util.reference(props.complicationDetail);
+ }
+
+ if (!_.isNil(props.followUp)) {
+ resource.followUp = props.followUp;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.focalDevice)) {
+ let src = props.focalDevice;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.focalDevice = [];
+
+ for (let item of src) {
+ let _focalDevice = {};
+
+ if (!_.isNil(item.id)) {
+ _focalDevice.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _focalDevice.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.action)) {
+ _focalDevice.action = item.action;
+ }
+
+ if (!_.isNil(item.manipulated)) {
+ _focalDevice.manipulated = item.manipulated;
+ }
+
+ resource.focalDevice.push(_focalDevice);
+ }
+ }
+
+ if (!_.isNil(props.usedReference)) {
+ if (!Array.isArray(props.usedReference)) { props.usedReference = [props.usedReference]; }
+ resource.usedReference = util.reference(props.usedReference);
+ }
+
+ if (!_.isNil(props.usedCode)) {
+ resource.usedCode = props.usedCode;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Procedure"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Provenance resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function provenance(type, props) {
+ const mappings = {
+ "Provenance": provenance_Provenance
+ };
+
+ return mappings[type](props)
+}
+
+function provenance_Provenance(props) {
+ const resource = {
+ resourceType: "Provenance",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.target)) {
+ if (!Array.isArray(props.target)) { props.target = [props.target]; }
+ resource.target = util.reference(props.target);
+ }
+
+ if (!_.isNil(props.occurred)) {
+ util.composite(resource, "occurred", props.occurred);
+ }
+
+ if (!_.isNil(props.recorded)) {
+ resource.recorded = props.recorded;
+ }
+
+ if (!_.isNil(props.policy)) {
+ resource.policy = props.policy;
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.reason)) {
+ resource.reason = props.reason;
+ }
+
+ if (!_.isNil(props.activity)) {
+ resource.activity = props.activity;
+ }
+
+ if (!_.isNil(props.agent)) {
+ let src = props.agent;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.agent = [];
+
+ for (let item of src) {
+ let _agent = {};
+
+ if (!_.isNil(item.id)) {
+ _agent.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _agent.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _agent.type = item.type;
+ }
+
+ if (!_.isNil(item.role)) {
+ _agent.role = item.role;
+ }
+
+ if (!_.isNil(item.who)) {
+ _agent.who = item.who;
+ }
+
+ if (!_.isNil(item.onBehalfOf)) {
+ _agent.onBehalfOf = item.onBehalfOf;
+ }
+
+ resource.agent.push(_agent);
+ }
+ }
+
+ if (!_.isNil(props.entity)) {
+ let src = props.entity;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.entity = [];
+
+ for (let item of src) {
+ let _entity = {};
+
+ if (!_.isNil(item.id)) {
+ _entity.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _entity.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.role)) {
+ _entity.role = item.role;
+ }
+
+ if (!_.isNil(item.what)) {
+ _entity.what = item.what;
+ }
+
+ resource.entity.push(_entity);
+ }
+ }
+
+ if (!_.isNil(props.signature)) {
+ resource.signature = props.signature;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Provenance"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Questionnaire resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function questionnaire(type, props) {
+ const mappings = {
+ "Questionnaire": questionnaire_Questionnaire
+ };
+
+ return mappings[type](props)
+}
+
+function questionnaire_Questionnaire(props) {
+ const resource = {
+ resourceType: "Questionnaire",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.derivedFrom)) {
+ resource.derivedFrom = props.derivedFrom;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.subjectType)) {
+ resource.subjectType = props.subjectType;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.item)) {
+ let src = props.item;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.item = [];
+
+ for (let item of src) {
+ let _item = {};
+
+ if (!_.isNil(item.id)) {
+ _item.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _item.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.linkId)) {
+ _item.linkId = item.linkId;
+ }
+
+ if (!_.isNil(item.definition)) {
+ _item.definition = item.definition;
+ }
+
+ if (!_.isNil(item.code)) {
+ _item.code = item.code;
+ }
+
+ if (!_.isNil(item.prefix)) {
+ _item.prefix = item.prefix;
+ }
+
+ if (!_.isNil(item.text)) {
+ _item.text = item.text;
+ }
+
+ if (!_.isNil(item.type)) {
+ _item.type = item.type;
+ }
+
+ if (!_.isNil(item.enableWhen)) {
+ _item.enableWhen = item.enableWhen;
+ }
+
+ if (!_.isNil(item.enableBehavior)) {
+ _item.enableBehavior = item.enableBehavior;
+ }
+
+ if (!_.isNil(item.required)) {
+ _item.required = item.required;
+ }
+
+ if (!_.isNil(item.repeats)) {
+ _item.repeats = item.repeats;
+ }
+
+ if (!_.isNil(item.readOnly)) {
+ _item.readOnly = item.readOnly;
+ }
+
+ if (!_.isNil(item.maxLength)) {
+ _item.maxLength = item.maxLength;
+ }
+
+ if (!_.isNil(item.answerValueSet)) {
+ _item.answerValueSet = item.answerValueSet;
+ }
+
+ if (!_.isNil(item.answerOption)) {
+ _item.answerOption = item.answerOption;
+ }
+
+ if (!_.isNil(item.initial)) {
+ _item.initial = item.initial;
+ }
+
+ resource.item.push(_item);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Questionnaire"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR QuestionnaireResponse resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function questionnaireResponse(type, props) {
+ const mappings = {
+ "QuestionnaireResponse": questionnaireResponse_QuestionnaireResponse
+ };
+
+ return mappings[type](props)
+}
+
+function questionnaireResponse_QuestionnaireResponse(props) {
+ const resource = {
+ resourceType: "QuestionnaireResponse",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.questionnaire)) {
+ resource.questionnaire = props.questionnaire;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.authored)) {
+ resource.authored = props.authored;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = util.reference(props.author);
+ }
+
+ if (!_.isNil(props.source)) {
+ resource.source = util.reference(props.source);
+ }
+
+ if (!_.isNil(props.item)) {
+ let src = props.item;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.item = [];
+
+ for (let item of src) {
+ let _item = {};
+
+ if (!_.isNil(item.id)) {
+ _item.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _item.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.linkId)) {
+ _item.linkId = item.linkId;
+ }
+
+ if (!_.isNil(item.definition)) {
+ _item.definition = item.definition;
+ }
+
+ if (!_.isNil(item.text)) {
+ _item.text = item.text;
+ }
+
+ if (!_.isNil(item.answer)) {
+ _item.answer = item.answer;
+ }
+
+ resource.item.push(_item);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR RegulatedAuthorization resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function regulatedAuthorization(type, props) {
+ const mappings = {
+ "RegulatedAuthorization": regulatedAuthorization_RegulatedAuthorization
+ };
+
+ return mappings[type](props)
+}
+
+function regulatedAuthorization_RegulatedAuthorization(props) {
+ const resource = {
+ resourceType: "RegulatedAuthorization",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.subject)) {
+ if (!Array.isArray(props.subject)) { props.subject = [props.subject]; }
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.region)) {
+ resource.region = props.region;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusDate)) {
+ resource.statusDate = props.statusDate;
+ }
+
+ if (!_.isNil(props.validityPeriod)) {
+ resource.validityPeriod = props.validityPeriod;
+ }
+
+ if (!_.isNil(props.indication)) {
+ resource.indication = props.indication;
+ }
+
+ if (!_.isNil(props.intendedUse)) {
+ resource.intendedUse = props.intendedUse;
+ }
+
+ if (!_.isNil(props.basis)) {
+ resource.basis = props.basis;
+ }
+
+ if (!_.isNil(props.holder)) {
+ resource.holder = util.reference(props.holder);
+ }
+
+ if (!_.isNil(props.regulator)) {
+ resource.regulator = util.reference(props.regulator);
+ }
+
+ if (!_.isNil(props.case)) {
+ let src = props.case;
+ let _case = {};
+
+ if (!_.isNil(src.id)) {
+ _case.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _case.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.identifier)) {
+ _case.identifier = src.identifier;
+ }
+
+ if (!_.isNil(src.type)) {
+ _case.type = src.type;
+ }
+
+ if (!_.isNil(src.status)) {
+ _case.status = src.status;
+ }
+
+ if (!_.isNil(src.date)) {
+ _case.date = src.date;
+ }
+
+ resource.case = _case;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/RegulatedAuthorization"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR RelatedPerson resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function relatedPerson(type, props) {
+ const mappings = {
+ "RelatedPerson": relatedPerson_RelatedPerson
+ };
+
+ return mappings[type](props)
+}
+
+function relatedPerson_RelatedPerson(props) {
+ const resource = {
+ resourceType: "RelatedPerson",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.relationship)) {
+ resource.relationship = props.relationship;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.telecom)) {
+ resource.telecom = props.telecom;
+ }
+
+ if (!_.isNil(props.gender)) {
+ resource.gender = props.gender;
+ }
+
+ if (!_.isNil(props.birthDate)) {
+ resource.birthDate = props.birthDate;
+ }
+
+ if (!_.isNil(props.address)) {
+ resource.address = props.address;
+ }
+
+ if (!_.isNil(props.photo)) {
+ resource.photo = props.photo;
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.communication)) {
+ let src = props.communication;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.communication = [];
+
+ for (let item of src) {
+ let _communication = {};
+
+ if (!_.isNil(item.id)) {
+ _communication.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _communication.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.language)) {
+ _communication.language = item.language;
+ }
+
+ if (!_.isNil(item.preferred)) {
+ _communication.preferred = item.preferred;
+ }
+
+ resource.communication.push(_communication);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/RelatedPerson"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR RequestGroup resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function requestGroup(type, props) {
+ const mappings = {
+ "RequestGroup": requestGroup_RequestGroup
+ };
+
+ return mappings[type](props)
+}
+
+function requestGroup_RequestGroup(props) {
+ const resource = {
+ resourceType: "RequestGroup",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = props.instantiatesCanonical;
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.replaces)) {
+ if (!Array.isArray(props.replaces)) { props.replaces = [props.replaces]; }
+ resource.replaces = util.reference(props.replaces);
+ }
+
+ if (!_.isNil(props.groupIdentifier)) {
+ resource.groupIdentifier = util.identifier(props.groupIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.intent)) {
+ resource.intent = props.intent;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.authoredOn)) {
+ resource.authoredOn = props.authoredOn;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = util.reference(props.author);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.action)) {
+ let src = props.action;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.action = [];
+
+ for (let item of src) {
+ let _action = {};
+
+ if (!_.isNil(item.id)) {
+ _action.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _action.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.prefix)) {
+ _action.prefix = item.prefix;
+ }
+
+ if (!_.isNil(item.title)) {
+ _action.title = item.title;
+ }
+
+ if (!_.isNil(item.description)) {
+ _action.description = item.description;
+ }
+
+ if (!_.isNil(item.textEquivalent)) {
+ _action.textEquivalent = item.textEquivalent;
+ }
+
+ if (!_.isNil(item.priority)) {
+ _action.priority = item.priority;
+ }
+
+ if (!_.isNil(item.code)) {
+ _action.code = item.code;
+ }
+
+ if (!_.isNil(item.documentation)) {
+ _action.documentation = item.documentation;
+ }
+
+ if (!_.isNil(item.condition)) {
+ _action.condition = item.condition;
+ }
+
+ if (!_.isNil(item.relatedAction)) {
+ _action.relatedAction = item.relatedAction;
+ }
+
+ if (!_.isNil(item.timing)) {
+ _action.timing = item.timing;
+ }
+
+ if (!_.isNil(item.participant)) {
+ _action.participant = item.participant;
+ }
+
+ if (!_.isNil(item.type)) {
+ _action.type = item.type;
+ }
+
+ if (!_.isNil(item.groupingBehavior)) {
+ _action.groupingBehavior = item.groupingBehavior;
+ }
+
+ if (!_.isNil(item.selectionBehavior)) {
+ _action.selectionBehavior = item.selectionBehavior;
+ }
+
+ if (!_.isNil(item.requiredBehavior)) {
+ _action.requiredBehavior = item.requiredBehavior;
+ }
+
+ if (!_.isNil(item.precheckBehavior)) {
+ _action.precheckBehavior = item.precheckBehavior;
+ }
+
+ if (!_.isNil(item.cardinalityBehavior)) {
+ _action.cardinalityBehavior = item.cardinalityBehavior;
+ }
+
+ if (!_.isNil(item.resource)) {
+ _action.resource = item.resource;
+ }
+
+ resource.action.push(_action);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/RequestGroup"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ResearchDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function researchDefinition(type, props) {
+ const mappings = {
+ "ResearchDefinition": researchDefinition_ResearchDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function researchDefinition_ResearchDefinition(props) {
+ const resource = {
+ resourceType: "ResearchDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.shortTitle)) {
+ resource.shortTitle = props.shortTitle;
+ }
+
+ if (!_.isNil(props.subtitle)) {
+ resource.subtitle = props.subtitle;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.subject)) {
+ util.composite(resource, "subject", props.subject);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.comment)) {
+ resource.comment = props.comment;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.usage)) {
+ resource.usage = props.usage;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.topic)) {
+ resource.topic = props.topic;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.library)) {
+ resource.library = props.library;
+ }
+
+ if (!_.isNil(props.population)) {
+ resource.population = util.reference(props.population);
+ }
+
+ if (!_.isNil(props.exposure)) {
+ resource.exposure = util.reference(props.exposure);
+ }
+
+ if (!_.isNil(props.exposureAlternative)) {
+ resource.exposureAlternative = util.reference(props.exposureAlternative);
+ }
+
+ if (!_.isNil(props.outcome)) {
+ resource.outcome = util.reference(props.outcome);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ResearchDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ResearchElementDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function researchElementDefinition(type, props) {
+ const mappings = {
+ "ResearchElementDefinition": researchElementDefinition_ResearchElementDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function researchElementDefinition_ResearchElementDefinition(props) {
+ const resource = {
+ resourceType: "ResearchElementDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.shortTitle)) {
+ resource.shortTitle = props.shortTitle;
+ }
+
+ if (!_.isNil(props.subtitle)) {
+ resource.subtitle = props.subtitle;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.subject)) {
+ util.composite(resource, "subject", props.subject);
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.comment)) {
+ resource.comment = props.comment;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.usage)) {
+ resource.usage = props.usage;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.topic)) {
+ resource.topic = props.topic;
+ }
+
+ if (!_.isNil(props.author)) {
+ resource.author = props.author;
+ }
+
+ if (!_.isNil(props.editor)) {
+ resource.editor = props.editor;
+ }
+
+ if (!_.isNil(props.reviewer)) {
+ resource.reviewer = props.reviewer;
+ }
+
+ if (!_.isNil(props.endorser)) {
+ resource.endorser = props.endorser;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.library)) {
+ resource.library = props.library;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.variableType)) {
+ resource.variableType = props.variableType;
+ }
+
+ if (!_.isNil(props.characteristic)) {
+ let src = props.characteristic;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.characteristic = [];
+
+ for (let item of src) {
+ let _characteristic = {};
+
+ if (!_.isNil(item.id)) {
+ _characteristic.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _characteristic.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.definition)) {
+ _characteristic.definition = item.definition;
+ }
+
+ if (!_.isNil(item.usageContext)) {
+ _characteristic.usageContext = item.usageContext;
+ }
+
+ if (!_.isNil(item.exclude)) {
+ _characteristic.exclude = item.exclude;
+ }
+
+ if (!_.isNil(item.unitOfMeasure)) {
+ _characteristic.unitOfMeasure = item.unitOfMeasure;
+ }
+
+ if (!_.isNil(item.studyEffectiveDescription)) {
+ _characteristic.studyEffectiveDescription = item.studyEffectiveDescription;
+ }
+
+ if (!_.isNil(item.studyEffective)) {
+ _characteristic.studyEffective = item.studyEffective;
+ }
+
+ if (!_.isNil(item.studyEffectiveTimeFromStart)) {
+ _characteristic.studyEffectiveTimeFromStart = item.studyEffectiveTimeFromStart;
+ }
+
+ if (!_.isNil(item.studyEffectiveGroupMeasure)) {
+ _characteristic.studyEffectiveGroupMeasure = item.studyEffectiveGroupMeasure;
+ }
+
+ if (!_.isNil(item.participantEffectiveDescription)) {
+ _characteristic.participantEffectiveDescription = item.participantEffectiveDescription;
+ }
+
+ if (!_.isNil(item.participantEffective)) {
+ _characteristic.participantEffective = item.participantEffective;
+ }
+
+ if (!_.isNil(item.participantEffectiveTimeFromStart)) {
+ _characteristic.participantEffectiveTimeFromStart = item.participantEffectiveTimeFromStart;
+ }
+
+ if (!_.isNil(item.participantEffectiveGroupMeasure)) {
+ _characteristic.participantEffectiveGroupMeasure = item.participantEffectiveGroupMeasure;
+ }
+
+ resource.characteristic.push(_characteristic);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ResearchElementDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ResearchStudy resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function researchStudy(type, props) {
+ const mappings = {
+ "ResearchStudy": researchStudy_ResearchStudy
+ };
+
+ return mappings[type](props)
+}
+
+function researchStudy_ResearchStudy(props) {
+ const resource = {
+ resourceType: "ResearchStudy",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.protocol)) {
+ if (!Array.isArray(props.protocol)) { props.protocol = [props.protocol]; }
+ resource.protocol = util.reference(props.protocol);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.primaryPurposeType)) {
+ resource.primaryPurposeType = props.primaryPurposeType;
+ }
+
+ if (!_.isNil(props.phase)) {
+ resource.phase = props.phase;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.focus)) {
+ resource.focus = props.focus;
+ }
+
+ if (!_.isNil(props.condition)) {
+ resource.condition = props.condition;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.relatedArtifact)) {
+ resource.relatedArtifact = props.relatedArtifact;
+ }
+
+ if (!_.isNil(props.keyword)) {
+ resource.keyword = props.keyword;
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = props.location;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.enrollment)) {
+ if (!Array.isArray(props.enrollment)) { props.enrollment = [props.enrollment]; }
+ resource.enrollment = util.reference(props.enrollment);
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.sponsor)) {
+ resource.sponsor = util.reference(props.sponsor);
+ }
+
+ if (!_.isNil(props.principalInvestigator)) {
+ resource.principalInvestigator = util.reference(props.principalInvestigator);
+ }
+
+ if (!_.isNil(props.site)) {
+ if (!Array.isArray(props.site)) { props.site = [props.site]; }
+ resource.site = util.reference(props.site);
+ }
+
+ if (!_.isNil(props.reasonStopped)) {
+ resource.reasonStopped = props.reasonStopped;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.arm)) {
+ let src = props.arm;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.arm = [];
+
+ for (let item of src) {
+ let _arm = {};
+
+ if (!_.isNil(item.id)) {
+ _arm.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _arm.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _arm.name = item.name;
+ }
+
+ if (!_.isNil(item.type)) {
+ _arm.type = item.type;
+ }
+
+ if (!_.isNil(item.description)) {
+ _arm.description = item.description;
+ }
+
+ resource.arm.push(_arm);
+ }
+ }
+
+ if (!_.isNil(props.objective)) {
+ let src = props.objective;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.objective = [];
+
+ for (let item of src) {
+ let _objective = {};
+
+ if (!_.isNil(item.id)) {
+ _objective.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _objective.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _objective.name = item.name;
+ }
+
+ if (!_.isNil(item.type)) {
+ _objective.type = item.type;
+ }
+
+ resource.objective.push(_objective);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ResearchStudy"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ResearchSubject resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function researchSubject(type, props) {
+ const mappings = {
+ "ResearchSubject": researchSubject_ResearchSubject
+ };
+
+ return mappings[type](props)
+}
+
+function researchSubject_ResearchSubject(props) {
+ const resource = {
+ resourceType: "ResearchSubject",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.period)) {
+ resource.period = props.period;
+ }
+
+ if (!_.isNil(props.study)) {
+ resource.study = util.reference(props.study);
+ }
+
+ if (!_.isNil(props.individual)) {
+ resource.individual = util.reference(props.individual);
+ }
+
+ if (!_.isNil(props.assignedArm)) {
+ resource.assignedArm = props.assignedArm;
+ }
+
+ if (!_.isNil(props.actualArm)) {
+ resource.actualArm = props.actualArm;
+ }
+
+ if (!_.isNil(props.consent)) {
+ resource.consent = util.reference(props.consent);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ResearchSubject"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Resource resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function resource(type, props) {
+ const mappings = {
+ "Resource": resource_Resource
+ };
+
+ return mappings[type](props)
+}
+
+function resource_Resource(props) {
+ const resource = {
+ resourceType: "Resource",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Resource"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR RiskAssessment resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function riskAssessment(type, props) {
+ const mappings = {
+ "RiskAssessment": riskAssessment_RiskAssessment
+ };
+
+ return mappings[type](props)
+}
+
+function riskAssessment_RiskAssessment(props) {
+ const resource = {
+ resourceType: "RiskAssessment",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.parent)) {
+ resource.parent = util.reference(props.parent);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.method)) {
+ resource.method = props.method;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.occurrence)) {
+ util.composite(resource, "occurrence", props.occurrence);
+ }
+
+ if (!_.isNil(props.condition)) {
+ resource.condition = util.reference(props.condition);
+ }
+
+ if (!_.isNil(props.performer)) {
+ resource.performer = util.reference(props.performer);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.basis)) {
+ if (!Array.isArray(props.basis)) { props.basis = [props.basis]; }
+ resource.basis = util.reference(props.basis);
+ }
+
+ if (!_.isNil(props.prediction)) {
+ let src = props.prediction;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.prediction = [];
+
+ for (let item of src) {
+ let _prediction = {};
+
+ if (!_.isNil(item.id)) {
+ _prediction.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _prediction.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.outcome)) {
+ _prediction.outcome = item.outcome;
+ }
+
+ if (!_.isNil(item.probability)) {
+ _prediction.probability = item.probability;
+ }
+
+ if (!_.isNil(item.qualitativeRisk)) {
+ _prediction.qualitativeRisk = item.qualitativeRisk;
+ }
+
+ if (!_.isNil(item.relativeRisk)) {
+ _prediction.relativeRisk = item.relativeRisk;
+ }
+
+ if (!_.isNil(item.when)) {
+ _prediction.when = item.when;
+ }
+
+ if (!_.isNil(item.rationale)) {
+ _prediction.rationale = item.rationale;
+ }
+
+ resource.prediction.push(_prediction);
+ }
+ }
+
+ if (!_.isNil(props.mitigation)) {
+ resource.mitigation = props.mitigation;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/RiskAssessment"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Schedule resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function schedule(type, props) {
+ const mappings = {
+ "Schedule": schedule_Schedule
+ };
+
+ return mappings[type](props)
+}
+
+function schedule_Schedule(props) {
+ const resource = {
+ resourceType: "Schedule",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.active)) {
+ resource.active = props.active;
+ }
+
+ if (!_.isNil(props.serviceCategory)) {
+ resource.serviceCategory = props.serviceCategory;
+ }
+
+ if (!_.isNil(props.serviceType)) {
+ resource.serviceType = props.serviceType;
+ }
+
+ if (!_.isNil(props.specialty)) {
+ resource.specialty = props.specialty;
+ }
+
+ if (!_.isNil(props.actor)) {
+ if (!Array.isArray(props.actor)) { props.actor = [props.actor]; }
+ resource.actor = util.reference(props.actor);
+ }
+
+ if (!_.isNil(props.planningHorizon)) {
+ resource.planningHorizon = props.planningHorizon;
+ }
+
+ if (!_.isNil(props.comment)) {
+ resource.comment = props.comment;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Schedule"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR SearchParameter resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function searchParameter(type, props) {
+ const mappings = {
+ "SearchParameter": searchParameter_SearchParameter
+ };
+
+ return mappings[type](props)
+}
+
+function searchParameter_SearchParameter(props) {
+ const resource = {
+ resourceType: "SearchParameter",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.derivedFrom)) {
+ resource.derivedFrom = props.derivedFrom;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.base)) {
+ resource.base = props.base;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.expression)) {
+ resource.expression = props.expression;
+ }
+
+ if (!_.isNil(props.xpath)) {
+ resource.xpath = props.xpath;
+ }
+
+ if (!_.isNil(props.xpathUsage)) {
+ resource.xpathUsage = props.xpathUsage;
+ }
+
+ if (!_.isNil(props.target)) {
+ resource.target = props.target;
+ }
+
+ if (!_.isNil(props.multipleOr)) {
+ resource.multipleOr = props.multipleOr;
+ }
+
+ if (!_.isNil(props.multipleAnd)) {
+ resource.multipleAnd = props.multipleAnd;
+ }
+
+ if (!_.isNil(props.comparator)) {
+ resource.comparator = props.comparator;
+ }
+
+ if (!_.isNil(props.modifier)) {
+ resource.modifier = props.modifier;
+ }
+
+ if (!_.isNil(props.chain)) {
+ resource.chain = props.chain;
+ }
+
+ if (!_.isNil(props.component)) {
+ let src = props.component;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.component = [];
+
+ for (let item of src) {
+ let _component = {};
+
+ if (!_.isNil(item.id)) {
+ _component.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _component.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.definition)) {
+ _component.definition = item.definition;
+ }
+
+ if (!_.isNil(item.expression)) {
+ _component.expression = item.expression;
+ }
+
+ resource.component.push(_component);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/SearchParameter"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ServiceRequest resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function serviceRequest(type, props) {
+ const mappings = {
+ "ServiceRequest": serviceRequest_ServiceRequest
+ };
+
+ return mappings[type](props)
+}
+
+function serviceRequest_ServiceRequest(props) {
+ const resource = {
+ resourceType: "ServiceRequest",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = props.instantiatesCanonical;
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.replaces)) {
+ if (!Array.isArray(props.replaces)) { props.replaces = [props.replaces]; }
+ resource.replaces = util.reference(props.replaces);
+ }
+
+ if (!_.isNil(props.requisition)) {
+ resource.requisition = util.identifier(props.requisition, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.intent)) {
+ resource.intent = props.intent;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.doNotPerform)) {
+ resource.doNotPerform = props.doNotPerform;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.orderDetail)) {
+ resource.orderDetail = props.orderDetail;
+ }
+
+ if (!_.isNil(props.quantity)) {
+ util.composite(resource, "quantity", props.quantity);
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.occurrence)) {
+ util.composite(resource, "occurrence", props.occurrence);
+ }
+
+ if (!_.isNil(props.asNeeded)) {
+ util.composite(resource, "asNeeded", props.asNeeded);
+ }
+
+ if (!_.isNil(props.authoredOn)) {
+ resource.authoredOn = props.authoredOn;
+ }
+
+ if (!_.isNil(props.requester)) {
+ resource.requester = util.reference(props.requester);
+ }
+
+ if (!_.isNil(props.performerType)) {
+ resource.performerType = props.performerType;
+ }
+
+ if (!_.isNil(props.performer)) {
+ if (!Array.isArray(props.performer)) { props.performer = [props.performer]; }
+ resource.performer = util.reference(props.performer);
+ }
+
+ if (!_.isNil(props.locationCode)) {
+ resource.locationCode = props.locationCode;
+ }
+
+ if (!_.isNil(props.locationReference)) {
+ if (!Array.isArray(props.locationReference)) { props.locationReference = [props.locationReference]; }
+ resource.locationReference = util.reference(props.locationReference);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.insurance)) {
+ if (!Array.isArray(props.insurance)) { props.insurance = [props.insurance]; }
+ resource.insurance = util.reference(props.insurance);
+ }
+
+ if (!_.isNil(props.supportingInfo)) {
+ if (!Array.isArray(props.supportingInfo)) { props.supportingInfo = [props.supportingInfo]; }
+ resource.supportingInfo = util.reference(props.supportingInfo);
+ }
+
+ if (!_.isNil(props.specimen)) {
+ if (!Array.isArray(props.specimen)) { props.specimen = [props.specimen]; }
+ resource.specimen = util.reference(props.specimen);
+ }
+
+ if (!_.isNil(props.bodySite)) {
+ resource.bodySite = props.bodySite;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.patientInstruction)) {
+ resource.patientInstruction = props.patientInstruction;
+ }
+
+ if (!_.isNil(props.relevantHistory)) {
+ if (!Array.isArray(props.relevantHistory)) { props.relevantHistory = [props.relevantHistory]; }
+ resource.relevantHistory = util.reference(props.relevantHistory);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ServiceRequest"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Slot resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function slot(type, props) {
+ const mappings = {
+ "Slot": slot_Slot
+ };
+
+ return mappings[type](props)
+}
+
+function slot_Slot(props) {
+ const resource = {
+ resourceType: "Slot",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.serviceCategory)) {
+ resource.serviceCategory = props.serviceCategory;
+ }
+
+ if (!_.isNil(props.serviceType)) {
+ resource.serviceType = props.serviceType;
+ }
+
+ if (!_.isNil(props.specialty)) {
+ resource.specialty = props.specialty;
+ }
+
+ if (!_.isNil(props.appointmentType)) {
+ resource.appointmentType = props.appointmentType;
+ }
+
+ if (!_.isNil(props.schedule)) {
+ resource.schedule = util.reference(props.schedule);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.start)) {
+ resource.start = props.start;
+ }
+
+ if (!_.isNil(props.end)) {
+ resource.end = props.end;
+ }
+
+ if (!_.isNil(props.overbooked)) {
+ resource.overbooked = props.overbooked;
+ }
+
+ if (!_.isNil(props.comment)) {
+ resource.comment = props.comment;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Slot"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Specimen resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function specimen(type, props) {
+ const mappings = {
+ "Specimen": specimen_Specimen
+ };
+
+ return mappings[type](props)
+}
+
+function specimen_Specimen(props) {
+ const resource = {
+ resourceType: "Specimen",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.accessionIdentifier)) {
+ resource.accessionIdentifier = util.identifier(props.accessionIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.subject)) {
+ resource.subject = util.reference(props.subject);
+ }
+
+ if (!_.isNil(props.receivedTime)) {
+ resource.receivedTime = props.receivedTime;
+ }
+
+ if (!_.isNil(props.parent)) {
+ if (!Array.isArray(props.parent)) { props.parent = [props.parent]; }
+ resource.parent = util.reference(props.parent);
+ }
+
+ if (!_.isNil(props.request)) {
+ if (!Array.isArray(props.request)) { props.request = [props.request]; }
+ resource.request = util.reference(props.request);
+ }
+
+ if (!_.isNil(props.collection)) {
+ let src = props.collection;
+ let _collection = {};
+
+ if (!_.isNil(src.id)) {
+ _collection.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _collection.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.collector)) {
+ _collection.collector = src.collector;
+ }
+
+ if (!_.isNil(src.collected)) {
+ _collection.collected = src.collected;
+ }
+
+ if (!_.isNil(src.duration)) {
+ _collection.duration = src.duration;
+ }
+
+ if (!_.isNil(src.quantity)) {
+ _collection.quantity = src.quantity;
+ }
+
+ if (!_.isNil(src.method)) {
+ _collection.method = src.method;
+ }
+
+ if (!_.isNil(src.bodySite)) {
+ _collection.bodySite = src.bodySite;
+ }
+
+ if (!_.isNil(src.fastingStatus)) {
+ _collection.fastingStatus = src.fastingStatus;
+ }
+
+ resource.collection = _collection;
+ }
+
+ if (!_.isNil(props.processing)) {
+ let src = props.processing;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.processing = [];
+
+ for (let item of src) {
+ let _processing = {};
+
+ if (!_.isNil(item.id)) {
+ _processing.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _processing.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _processing.description = item.description;
+ }
+
+ if (!_.isNil(item.procedure)) {
+ _processing.procedure = item.procedure;
+ }
+
+ if (!_.isNil(item.additive)) {
+ _processing.additive = item.additive;
+ }
+
+ if (!_.isNil(item.time)) {
+ _processing.time = item.time;
+ }
+
+ resource.processing.push(_processing);
+ }
+ }
+
+ if (!_.isNil(props.container)) {
+ let src = props.container;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.container = [];
+
+ for (let item of src) {
+ let _container = {};
+
+ if (!_.isNil(item.id)) {
+ _container.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _container.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.identifier)) {
+ _container.identifier = item.identifier;
+ }
+
+ if (!_.isNil(item.description)) {
+ _container.description = item.description;
+ }
+
+ if (!_.isNil(item.type)) {
+ _container.type = item.type;
+ }
+
+ if (!_.isNil(item.capacity)) {
+ _container.capacity = item.capacity;
+ }
+
+ if (!_.isNil(item.specimenQuantity)) {
+ _container.specimenQuantity = item.specimenQuantity;
+ }
+
+ if (!_.isNil(item.additive)) {
+ _container.additive = item.additive;
+ }
+
+ resource.container.push(_container);
+ }
+ }
+
+ if (!_.isNil(props.condition)) {
+ resource.condition = props.condition;
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Specimen"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR SpecimenDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function specimenDefinition(type, props) {
+ const mappings = {
+ "SpecimenDefinition": specimenDefinition_SpecimenDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function specimenDefinition_SpecimenDefinition(props) {
+ const resource = {
+ resourceType: "SpecimenDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.typeCollected)) {
+ resource.typeCollected = props.typeCollected;
+ }
+
+ if (!_.isNil(props.patientPreparation)) {
+ resource.patientPreparation = props.patientPreparation;
+ }
+
+ if (!_.isNil(props.timeAspect)) {
+ resource.timeAspect = props.timeAspect;
+ }
+
+ if (!_.isNil(props.collection)) {
+ resource.collection = props.collection;
+ }
+
+ if (!_.isNil(props.typeTested)) {
+ let src = props.typeTested;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.typeTested = [];
+
+ for (let item of src) {
+ let _typeTested = {};
+
+ if (!_.isNil(item.id)) {
+ _typeTested.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _typeTested.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.isDerived)) {
+ _typeTested.isDerived = item.isDerived;
+ }
+
+ if (!_.isNil(item.type)) {
+ _typeTested.type = item.type;
+ }
+
+ if (!_.isNil(item.preference)) {
+ _typeTested.preference = item.preference;
+ }
+
+ if (!_.isNil(item.container)) {
+ _typeTested.container = item.container;
+ }
+
+ if (!_.isNil(item.requirement)) {
+ _typeTested.requirement = item.requirement;
+ }
+
+ if (!_.isNil(item.retentionTime)) {
+ _typeTested.retentionTime = item.retentionTime;
+ }
+
+ if (!_.isNil(item.rejectionCriterion)) {
+ _typeTested.rejectionCriterion = item.rejectionCriterion;
+ }
+
+ if (!_.isNil(item.handling)) {
+ _typeTested.handling = item.handling;
+ }
+
+ resource.typeTested.push(_typeTested);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/SpecimenDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR StructureDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function structureDefinition(type, props) {
+ const mappings = {
+ "StructureDefinition": structureDefinition_StructureDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function structureDefinition_StructureDefinition(props) {
+ const resource = {
+ resourceType: "StructureDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.keyword)) {
+ resource.keyword = props.keyword;
+ }
+
+ if (!_.isNil(props.fhirVersion)) {
+ resource.fhirVersion = props.fhirVersion;
+ }
+
+ if (!_.isNil(props.mapping)) {
+ let src = props.mapping;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.mapping = [];
+
+ for (let item of src) {
+ let _mapping = {};
+
+ if (!_.isNil(item.id)) {
+ _mapping.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _mapping.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.identity)) {
+ _mapping.identity = item.identity;
+ }
+
+ if (!_.isNil(item.uri)) {
+ _mapping.uri = item.uri;
+ }
+
+ if (!_.isNil(item.name)) {
+ _mapping.name = item.name;
+ }
+
+ if (!_.isNil(item.comment)) {
+ _mapping.comment = item.comment;
+ }
+
+ resource.mapping.push(_mapping);
+ }
+ }
+
+ if (!_.isNil(props.kind)) {
+ resource.kind = props.kind;
+ }
+
+ if (!_.isNil(props.abstract)) {
+ resource.abstract = props.abstract;
+ }
+
+ if (!_.isNil(props.context)) {
+ let src = props.context;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.context = [];
+
+ for (let item of src) {
+ let _context = {};
+
+ if (!_.isNil(item.id)) {
+ _context.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _context.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _context.type = item.type;
+ }
+
+ if (!_.isNil(item.expression)) {
+ _context.expression = item.expression;
+ }
+
+ resource.context.push(_context);
+ }
+ }
+
+ if (!_.isNil(props.contextInvariant)) {
+ resource.contextInvariant = props.contextInvariant;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.baseDefinition)) {
+ resource.baseDefinition = props.baseDefinition;
+ }
+
+ if (!_.isNil(props.derivation)) {
+ resource.derivation = props.derivation;
+ }
+
+ if (!_.isNil(props.snapshot)) {
+ let src = props.snapshot;
+ let _snapshot = {};
+
+ if (!_.isNil(src.id)) {
+ _snapshot.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _snapshot.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.element)) {
+ _snapshot.element = src.element;
+ }
+
+ resource.snapshot = _snapshot;
+ }
+
+ if (!_.isNil(props.differential)) {
+ let src = props.differential;
+ let _differential = {};
+
+ if (!_.isNil(src.id)) {
+ _differential.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _differential.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.element)) {
+ _differential.element = src.element;
+ }
+
+ resource.differential = _differential;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR StructureMap resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function structureMap(type, props) {
+ const mappings = {
+ "StructureMap": structureMap_StructureMap
+ };
+
+ return mappings[type](props)
+}
+
+function structureMap_StructureMap(props) {
+ const resource = {
+ resourceType: "StructureMap",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.structure)) {
+ let src = props.structure;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.structure = [];
+
+ for (let item of src) {
+ let _structure = {};
+
+ if (!_.isNil(item.id)) {
+ _structure.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _structure.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.url)) {
+ _structure.url = item.url;
+ }
+
+ if (!_.isNil(item.mode)) {
+ _structure.mode = item.mode;
+ }
+
+ if (!_.isNil(item.alias)) {
+ _structure.alias = item.alias;
+ }
+
+ if (!_.isNil(item.documentation)) {
+ _structure.documentation = item.documentation;
+ }
+
+ resource.structure.push(_structure);
+ }
+ }
+
+ if (!_.isNil(props.import)) {
+ resource.import = props.import;
+ }
+
+ if (!_.isNil(props.group)) {
+ let src = props.group;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.group = [];
+
+ for (let item of src) {
+ let _group = {};
+
+ if (!_.isNil(item.id)) {
+ _group.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _group.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _group.name = item.name;
+ }
+
+ if (!_.isNil(item.extends)) {
+ _group.extends = item.extends;
+ }
+
+ if (!_.isNil(item.typeMode)) {
+ _group.typeMode = item.typeMode;
+ }
+
+ if (!_.isNil(item.documentation)) {
+ _group.documentation = item.documentation;
+ }
+
+ if (!_.isNil(item.input)) {
+ _group.input = item.input;
+ }
+
+ if (!_.isNil(item.rule)) {
+ _group.rule = item.rule;
+ }
+
+ resource.group.push(_group);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/StructureMap"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Subscription resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function subscription(type, props) {
+ const mappings = {
+ "Subscription": subscription_Subscription
+ };
+
+ return mappings[type](props)
+}
+
+function subscription_Subscription(props) {
+ const resource = {
+ resourceType: "Subscription",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.end)) {
+ resource.end = props.end;
+ }
+
+ if (!_.isNil(props.reason)) {
+ resource.reason = props.reason;
+ }
+
+ if (!_.isNil(props.criteria)) {
+ resource.criteria = props.criteria;
+ }
+
+ if (!_.isNil(props.error)) {
+ resource.error = props.error;
+ }
+
+ if (!_.isNil(props.channel)) {
+ let src = props.channel;
+ let _channel = {};
+
+ if (!_.isNil(src.id)) {
+ _channel.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _channel.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.type)) {
+ _channel.type = src.type;
+ }
+
+ if (!_.isNil(src.endpoint)) {
+ _channel.endpoint = src.endpoint;
+ }
+
+ if (!_.isNil(src.payload)) {
+ _channel.payload = src.payload;
+ }
+
+ if (!_.isNil(src.header)) {
+ _channel.header = src.header;
+ }
+
+ resource.channel = _channel;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Subscription"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR SubscriptionStatus resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function subscriptionStatus(type, props) {
+ const mappings = {
+ "SubscriptionStatus": subscriptionStatus_SubscriptionStatus
+ };
+
+ return mappings[type](props)
+}
+
+function subscriptionStatus_SubscriptionStatus(props) {
+ const resource = {
+ resourceType: "SubscriptionStatus",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.eventsSinceSubscriptionStart)) {
+ resource.eventsSinceSubscriptionStart = props.eventsSinceSubscriptionStart;
+ }
+
+ if (!_.isNil(props.notificationEvent)) {
+ let src = props.notificationEvent;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.notificationEvent = [];
+
+ for (let item of src) {
+ let _notificationEvent = {};
+
+ if (!_.isNil(item.id)) {
+ _notificationEvent.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _notificationEvent.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.eventNumber)) {
+ _notificationEvent.eventNumber = item.eventNumber;
+ }
+
+ if (!_.isNil(item.timestamp)) {
+ _notificationEvent.timestamp = item.timestamp;
+ }
+
+ if (!_.isNil(item.focus)) {
+ _notificationEvent.focus = item.focus;
+ }
+
+ if (!_.isNil(item.additionalContext)) {
+ _notificationEvent.additionalContext = item.additionalContext;
+ }
+
+ resource.notificationEvent.push(_notificationEvent);
+ }
+ }
+
+ if (!_.isNil(props.subscription)) {
+ resource.subscription = util.reference(props.subscription);
+ }
+
+ if (!_.isNil(props.topic)) {
+ resource.topic = props.topic;
+ }
+
+ if (!_.isNil(props.error)) {
+ resource.error = props.error;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/SubscriptionStatus"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR SubscriptionTopic resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function subscriptionTopic(type, props) {
+ const mappings = {
+ "SubscriptionTopic": subscriptionTopic_SubscriptionTopic
+ };
+
+ return mappings[type](props)
+}
+
+function subscriptionTopic_SubscriptionTopic(props) {
+ const resource = {
+ resourceType: "SubscriptionTopic",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.derivedFrom)) {
+ resource.derivedFrom = props.derivedFrom;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.approvalDate)) {
+ resource.approvalDate = props.approvalDate;
+ }
+
+ if (!_.isNil(props.lastReviewDate)) {
+ resource.lastReviewDate = props.lastReviewDate;
+ }
+
+ if (!_.isNil(props.effectivePeriod)) {
+ resource.effectivePeriod = props.effectivePeriod;
+ }
+
+ if (!_.isNil(props.resourceTrigger)) {
+ let src = props.resourceTrigger;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.resourceTrigger = [];
+
+ for (let item of src) {
+ let _resourceTrigger = {};
+
+ if (!_.isNil(item.id)) {
+ _resourceTrigger.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _resourceTrigger.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _resourceTrigger.description = item.description;
+ }
+
+ if (!_.isNil(item.resource)) {
+ _resourceTrigger.resource = item.resource;
+ }
+
+ if (!_.isNil(item.supportedInteraction)) {
+ _resourceTrigger.supportedInteraction = item.supportedInteraction;
+ }
+
+ if (!_.isNil(item.queryCriteria)) {
+ _resourceTrigger.queryCriteria = item.queryCriteria;
+ }
+
+ if (!_.isNil(item.fhirPathCriteria)) {
+ _resourceTrigger.fhirPathCriteria = item.fhirPathCriteria;
+ }
+
+ resource.resourceTrigger.push(_resourceTrigger);
+ }
+ }
+
+ if (!_.isNil(props.eventTrigger)) {
+ let src = props.eventTrigger;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.eventTrigger = [];
+
+ for (let item of src) {
+ let _eventTrigger = {};
+
+ if (!_.isNil(item.id)) {
+ _eventTrigger.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _eventTrigger.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _eventTrigger.description = item.description;
+ }
+
+ if (!_.isNil(item.event)) {
+ _eventTrigger.event = item.event;
+ }
+
+ if (!_.isNil(item.resource)) {
+ _eventTrigger.resource = item.resource;
+ }
+
+ resource.eventTrigger.push(_eventTrigger);
+ }
+ }
+
+ if (!_.isNil(props.canFilterBy)) {
+ let src = props.canFilterBy;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.canFilterBy = [];
+
+ for (let item of src) {
+ let _canFilterBy = {};
+
+ if (!_.isNil(item.id)) {
+ _canFilterBy.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _canFilterBy.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.description)) {
+ _canFilterBy.description = item.description;
+ }
+
+ if (!_.isNil(item.resource)) {
+ _canFilterBy.resource = item.resource;
+ }
+
+ if (!_.isNil(item.filterParameter)) {
+ _canFilterBy.filterParameter = item.filterParameter;
+ }
+
+ if (!_.isNil(item.filterDefinition)) {
+ _canFilterBy.filterDefinition = item.filterDefinition;
+ }
+
+ if (!_.isNil(item.modifier)) {
+ _canFilterBy.modifier = item.modifier;
+ }
+
+ resource.canFilterBy.push(_canFilterBy);
+ }
+ }
+
+ if (!_.isNil(props.notificationShape)) {
+ let src = props.notificationShape;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.notificationShape = [];
+
+ for (let item of src) {
+ let _notificationShape = {};
+
+ if (!_.isNil(item.id)) {
+ _notificationShape.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _notificationShape.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.resource)) {
+ _notificationShape.resource = item.resource;
+ }
+
+ if (!_.isNil(item.include)) {
+ _notificationShape.include = item.include;
+ }
+
+ if (!_.isNil(item.revInclude)) {
+ _notificationShape.revInclude = item.revInclude;
+ }
+
+ resource.notificationShape.push(_notificationShape);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/SubscriptionTopic"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Substance resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function substance(type, props) {
+ const mappings = {
+ "Substance": substance_Substance
+ };
+
+ return mappings[type](props)
+}
+
+function substance_Substance(props) {
+ const resource = {
+ resourceType: "Substance",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.instance)) {
+ let src = props.instance;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.instance = [];
+
+ for (let item of src) {
+ let _instance = {};
+
+ if (!_.isNil(item.id)) {
+ _instance.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _instance.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.identifier)) {
+ _instance.identifier = item.identifier;
+ }
+
+ if (!_.isNil(item.expiry)) {
+ _instance.expiry = item.expiry;
+ }
+
+ if (!_.isNil(item.quantity)) {
+ _instance.quantity = item.quantity;
+ }
+
+ resource.instance.push(_instance);
+ }
+ }
+
+ if (!_.isNil(props.ingredient)) {
+ let src = props.ingredient;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.ingredient = [];
+
+ for (let item of src) {
+ let _ingredient = {};
+
+ if (!_.isNil(item.id)) {
+ _ingredient.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _ingredient.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.quantity)) {
+ _ingredient.quantity = item.quantity;
+ }
+
+ if (!_.isNil(item.substance)) {
+ _ingredient.substance = item.substance;
+ }
+
+ resource.ingredient.push(_ingredient);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Substance"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR SubstanceDefinition resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function substanceDefinition(type, props) {
+ const mappings = {
+ "SubstanceDefinition": substanceDefinition_SubstanceDefinition
+ };
+
+ return mappings[type](props)
+}
+
+function substanceDefinition_SubstanceDefinition(props) {
+ const resource = {
+ resourceType: "SubstanceDefinition",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.classification)) {
+ resource.classification = props.classification;
+ }
+
+ if (!_.isNil(props.domain)) {
+ resource.domain = props.domain;
+ }
+
+ if (!_.isNil(props.grade)) {
+ resource.grade = props.grade;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.informationSource)) {
+ if (!Array.isArray(props.informationSource)) { props.informationSource = [props.informationSource]; }
+ resource.informationSource = util.reference(props.informationSource);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.manufacturer)) {
+ if (!Array.isArray(props.manufacturer)) { props.manufacturer = [props.manufacturer]; }
+ resource.manufacturer = util.reference(props.manufacturer);
+ }
+
+ if (!_.isNil(props.supplier)) {
+ if (!Array.isArray(props.supplier)) { props.supplier = [props.supplier]; }
+ resource.supplier = util.reference(props.supplier);
+ }
+
+ if (!_.isNil(props.moiety)) {
+ let src = props.moiety;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.moiety = [];
+
+ for (let item of src) {
+ let _moiety = {};
+
+ if (!_.isNil(item.id)) {
+ _moiety.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _moiety.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.role)) {
+ _moiety.role = item.role;
+ }
+
+ if (!_.isNil(item.identifier)) {
+ _moiety.identifier = item.identifier;
+ }
+
+ if (!_.isNil(item.name)) {
+ _moiety.name = item.name;
+ }
+
+ if (!_.isNil(item.stereochemistry)) {
+ _moiety.stereochemistry = item.stereochemistry;
+ }
+
+ if (!_.isNil(item.opticalActivity)) {
+ _moiety.opticalActivity = item.opticalActivity;
+ }
+
+ if (!_.isNil(item.molecularFormula)) {
+ _moiety.molecularFormula = item.molecularFormula;
+ }
+
+ if (!_.isNil(item.amount)) {
+ _moiety.amount = item.amount;
+ }
+
+ if (!_.isNil(item.measurementType)) {
+ _moiety.measurementType = item.measurementType;
+ }
+
+ resource.moiety.push(_moiety);
+ }
+ }
+
+ if (!_.isNil(props.property)) {
+ let src = props.property;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.property = [];
+
+ for (let item of src) {
+ let _property = {};
+
+ if (!_.isNil(item.id)) {
+ _property.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _property.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _property.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _property.value = item.value;
+ }
+
+ resource.property.push(_property);
+ }
+ }
+
+ if (!_.isNil(props.molecularWeight)) {
+ let src = props.molecularWeight;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.molecularWeight = [];
+
+ for (let item of src) {
+ let _molecularWeight = {};
+
+ if (!_.isNil(item.id)) {
+ _molecularWeight.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _molecularWeight.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.method)) {
+ _molecularWeight.method = item.method;
+ }
+
+ if (!_.isNil(item.type)) {
+ _molecularWeight.type = item.type;
+ }
+
+ if (!_.isNil(item.amount)) {
+ _molecularWeight.amount = item.amount;
+ }
+
+ resource.molecularWeight.push(_molecularWeight);
+ }
+ }
+
+ if (!_.isNil(props.structure)) {
+ let src = props.structure;
+ let _structure = {};
+
+ if (!_.isNil(src.id)) {
+ _structure.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _structure.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.stereochemistry)) {
+ _structure.stereochemistry = src.stereochemistry;
+ }
+
+ if (!_.isNil(src.opticalActivity)) {
+ _structure.opticalActivity = src.opticalActivity;
+ }
+
+ if (!_.isNil(src.molecularFormula)) {
+ _structure.molecularFormula = src.molecularFormula;
+ }
+
+ if (!_.isNil(src.molecularFormulaByMoiety)) {
+ _structure.molecularFormulaByMoiety = src.molecularFormulaByMoiety;
+ }
+
+ if (!_.isNil(src.technique)) {
+ _structure.technique = src.technique;
+ }
+
+ if (!_.isNil(src.sourceDocument)) {
+ _structure.sourceDocument = src.sourceDocument;
+ }
+
+ if (!_.isNil(src.representation)) {
+ _structure.representation = src.representation;
+ }
+
+ resource.structure = _structure;
+ }
+
+ if (!_.isNil(props.code)) {
+ let src = props.code;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.code = [];
+
+ for (let item of src) {
+ let _code = {};
+
+ if (!_.isNil(item.id)) {
+ _code.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _code.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _code.code = item.code;
+ }
+
+ if (!_.isNil(item.status)) {
+ _code.status = item.status;
+ }
+
+ if (!_.isNil(item.statusDate)) {
+ _code.statusDate = item.statusDate;
+ }
+
+ if (!_.isNil(item.note)) {
+ _code.note = item.note;
+ }
+
+ if (!_.isNil(item.source)) {
+ _code.source = item.source;
+ }
+
+ resource.code.push(_code);
+ }
+ }
+
+ if (!_.isNil(props.name)) {
+ let src = props.name;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.name = [];
+
+ for (let item of src) {
+ let _name = {};
+
+ if (!_.isNil(item.id)) {
+ _name.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _name.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _name.name = item.name;
+ }
+
+ if (!_.isNil(item.type)) {
+ _name.type = item.type;
+ }
+
+ if (!_.isNil(item.status)) {
+ _name.status = item.status;
+ }
+
+ if (!_.isNil(item.preferred)) {
+ _name.preferred = item.preferred;
+ }
+
+ if (!_.isNil(item.language)) {
+ _name.language = item.language;
+ }
+
+ if (!_.isNil(item.domain)) {
+ _name.domain = item.domain;
+ }
+
+ if (!_.isNil(item.jurisdiction)) {
+ _name.jurisdiction = item.jurisdiction;
+ }
+
+ if (!_.isNil(item.official)) {
+ _name.official = item.official;
+ }
+
+ if (!_.isNil(item.source)) {
+ _name.source = item.source;
+ }
+
+ resource.name.push(_name);
+ }
+ }
+
+ if (!_.isNil(props.relationship)) {
+ let src = props.relationship;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.relationship = [];
+
+ for (let item of src) {
+ let _relationship = {};
+
+ if (!_.isNil(item.id)) {
+ _relationship.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _relationship.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.substanceDefinition)) {
+ _relationship.substanceDefinition = item.substanceDefinition;
+ }
+
+ if (!_.isNil(item.type)) {
+ _relationship.type = item.type;
+ }
+
+ if (!_.isNil(item.isDefining)) {
+ _relationship.isDefining = item.isDefining;
+ }
+
+ if (!_.isNil(item.amount)) {
+ _relationship.amount = item.amount;
+ }
+
+ if (!_.isNil(item.ratioHighLimitAmount)) {
+ _relationship.ratioHighLimitAmount = item.ratioHighLimitAmount;
+ }
+
+ if (!_.isNil(item.comparator)) {
+ _relationship.comparator = item.comparator;
+ }
+
+ if (!_.isNil(item.source)) {
+ _relationship.source = item.source;
+ }
+
+ resource.relationship.push(_relationship);
+ }
+ }
+
+ if (!_.isNil(props.sourceMaterial)) {
+ let src = props.sourceMaterial;
+ let _sourceMaterial = {};
+
+ if (!_.isNil(src.id)) {
+ _sourceMaterial.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _sourceMaterial.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.type)) {
+ _sourceMaterial.type = src.type;
+ }
+
+ if (!_.isNil(src.genus)) {
+ _sourceMaterial.genus = src.genus;
+ }
+
+ if (!_.isNil(src.species)) {
+ _sourceMaterial.species = src.species;
+ }
+
+ if (!_.isNil(src.part)) {
+ _sourceMaterial.part = src.part;
+ }
+
+ if (!_.isNil(src.countryOfOrigin)) {
+ _sourceMaterial.countryOfOrigin = src.countryOfOrigin;
+ }
+
+ resource.sourceMaterial = _sourceMaterial;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/SubstanceDefinition"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR SupplyDelivery resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function supplyDelivery(type, props) {
+ const mappings = {
+ "SupplyDelivery": supplyDelivery_SupplyDelivery
+ };
+
+ return mappings[type](props)
+}
+
+function supplyDelivery_SupplyDelivery(props) {
+ const resource = {
+ resourceType: "SupplyDelivery",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.type)) {
+ resource.type = props.type;
+ }
+
+ if (!_.isNil(props.suppliedItem)) {
+ let src = props.suppliedItem;
+ let _suppliedItem = {};
+
+ if (!_.isNil(src.id)) {
+ _suppliedItem.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _suppliedItem.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.quantity)) {
+ _suppliedItem.quantity = src.quantity;
+ }
+
+ if (!_.isNil(src.item)) {
+ _suppliedItem.item = src.item;
+ }
+
+ resource.suppliedItem = _suppliedItem;
+ }
+
+ if (!_.isNil(props.occurrence)) {
+ util.composite(resource, "occurrence", props.occurrence);
+ }
+
+ if (!_.isNil(props.supplier)) {
+ resource.supplier = util.reference(props.supplier);
+ }
+
+ if (!_.isNil(props.destination)) {
+ resource.destination = util.reference(props.destination);
+ }
+
+ if (!_.isNil(props.receiver)) {
+ if (!Array.isArray(props.receiver)) { props.receiver = [props.receiver]; }
+ resource.receiver = util.reference(props.receiver);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/SupplyDelivery"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR SupplyRequest resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function supplyRequest(type, props) {
+ const mappings = {
+ "SupplyRequest": supplyRequest_SupplyRequest
+ };
+
+ return mappings[type](props)
+}
+
+function supplyRequest_SupplyRequest(props) {
+ const resource = {
+ resourceType: "SupplyRequest",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.category)) {
+ resource.category = props.category;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.item)) {
+ util.composite(resource, "item", props.item);
+ }
+
+ if (!_.isNil(props.quantity)) {
+ resource.quantity = props.quantity;
+ }
+
+ if (!_.isNil(props.parameter)) {
+ let src = props.parameter;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.parameter = [];
+
+ for (let item of src) {
+ let _parameter = {};
+
+ if (!_.isNil(item.id)) {
+ _parameter.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _parameter.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.code)) {
+ _parameter.code = item.code;
+ }
+
+ if (!_.isNil(item.value)) {
+ _parameter.value = item.value;
+ }
+
+ resource.parameter.push(_parameter);
+ }
+ }
+
+ if (!_.isNil(props.occurrence)) {
+ util.composite(resource, "occurrence", props.occurrence);
+ }
+
+ if (!_.isNil(props.authoredOn)) {
+ resource.authoredOn = props.authoredOn;
+ }
+
+ if (!_.isNil(props.requester)) {
+ resource.requester = util.reference(props.requester);
+ }
+
+ if (!_.isNil(props.supplier)) {
+ if (!Array.isArray(props.supplier)) { props.supplier = [props.supplier]; }
+ resource.supplier = util.reference(props.supplier);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ if (!Array.isArray(props.reasonReference)) { props.reasonReference = [props.reasonReference]; }
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.deliverFrom)) {
+ resource.deliverFrom = util.reference(props.deliverFrom);
+ }
+
+ if (!_.isNil(props.deliverTo)) {
+ resource.deliverTo = util.reference(props.deliverTo);
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/SupplyRequest"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR Task resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function task(type, props) {
+ const mappings = {
+ "Task": task_Task
+ };
+
+ return mappings[type](props)
+}
+
+function task_Task(props) {
+ const resource = {
+ resourceType: "Task",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.instantiatesCanonical)) {
+ resource.instantiatesCanonical = props.instantiatesCanonical;
+ }
+
+ if (!_.isNil(props.instantiatesUri)) {
+ resource.instantiatesUri = props.instantiatesUri;
+ }
+
+ if (!_.isNil(props.basedOn)) {
+ if (!Array.isArray(props.basedOn)) { props.basedOn = [props.basedOn]; }
+ resource.basedOn = util.reference(props.basedOn);
+ }
+
+ if (!_.isNil(props.groupIdentifier)) {
+ resource.groupIdentifier = util.identifier(props.groupIdentifier, undefined);
+ }
+
+ if (!_.isNil(props.partOf)) {
+ if (!Array.isArray(props.partOf)) { props.partOf = [props.partOf]; }
+ resource.partOf = util.reference(props.partOf);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusReason)) {
+ resource.statusReason = props.statusReason;
+ }
+
+ if (!_.isNil(props.businessStatus)) {
+ resource.businessStatus = props.businessStatus;
+ }
+
+ if (!_.isNil(props.intent)) {
+ resource.intent = props.intent;
+ }
+
+ if (!_.isNil(props.priority)) {
+ resource.priority = props.priority;
+ }
+
+ if (!_.isNil(props.code)) {
+ resource.code = props.code;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.focus)) {
+ resource.focus = util.reference(props.focus);
+ }
+
+ if (!_.isNil(props.for)) {
+ resource.for = util.reference(props.for);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.executionPeriod)) {
+ resource.executionPeriod = props.executionPeriod;
+ }
+
+ if (!_.isNil(props.authoredOn)) {
+ resource.authoredOn = props.authoredOn;
+ }
+
+ if (!_.isNil(props.lastModified)) {
+ resource.lastModified = props.lastModified;
+ }
+
+ if (!_.isNil(props.requester)) {
+ resource.requester = util.reference(props.requester);
+ }
+
+ if (!_.isNil(props.performerType)) {
+ resource.performerType = props.performerType;
+ }
+
+ if (!_.isNil(props.owner)) {
+ resource.owner = util.reference(props.owner);
+ }
+
+ if (!_.isNil(props.location)) {
+ resource.location = util.reference(props.location);
+ }
+
+ if (!_.isNil(props.reasonCode)) {
+ resource.reasonCode = props.reasonCode;
+ }
+
+ if (!_.isNil(props.reasonReference)) {
+ resource.reasonReference = util.reference(props.reasonReference);
+ }
+
+ if (!_.isNil(props.insurance)) {
+ if (!Array.isArray(props.insurance)) { props.insurance = [props.insurance]; }
+ resource.insurance = util.reference(props.insurance);
+ }
+
+ if (!_.isNil(props.note)) {
+ resource.note = props.note;
+ }
+
+ if (!_.isNil(props.relevantHistory)) {
+ if (!Array.isArray(props.relevantHistory)) { props.relevantHistory = [props.relevantHistory]; }
+ resource.relevantHistory = util.reference(props.relevantHistory);
+ }
+
+ if (!_.isNil(props.restriction)) {
+ let src = props.restriction;
+ let _restriction = {};
+
+ if (!_.isNil(src.id)) {
+ _restriction.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _restriction.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.repetitions)) {
+ _restriction.repetitions = src.repetitions;
+ }
+
+ if (!_.isNil(src.period)) {
+ _restriction.period = src.period;
+ }
+
+ if (!_.isNil(src.recipient)) {
+ _restriction.recipient = src.recipient;
+ }
+
+ resource.restriction = _restriction;
+ }
+
+ if (!_.isNil(props.input)) {
+ let src = props.input;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.input = [];
+
+ for (let item of src) {
+ let _input = {};
+
+ if (!_.isNil(item.id)) {
+ _input.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _input.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _input.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _input.value = item.value;
+ }
+
+ resource.input.push(_input);
+ }
+ }
+
+ if (!_.isNil(props.output)) {
+ let src = props.output;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.output = [];
+
+ for (let item of src) {
+ let _output = {};
+
+ if (!_.isNil(item.id)) {
+ _output.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _output.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _output.type = item.type;
+ }
+
+ if (!_.isNil(item.value)) {
+ _output.value = item.value;
+ }
+
+ resource.output.push(_output);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/Task"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR TerminologyCapabilities resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function terminologyCapabilities(type, props) {
+ const mappings = {
+ "TerminologyCapabilities": terminologyCapabilities_TerminologyCapabilities
+ };
+
+ return mappings[type](props)
+}
+
+function terminologyCapabilities_TerminologyCapabilities(props) {
+ const resource = {
+ resourceType: "TerminologyCapabilities",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.kind)) {
+ resource.kind = props.kind;
+ }
+
+ if (!_.isNil(props.software)) {
+ let src = props.software;
+ let _software = {};
+
+ if (!_.isNil(src.id)) {
+ _software.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _software.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.name)) {
+ _software.name = src.name;
+ }
+
+ if (!_.isNil(src.version)) {
+ _software.version = src.version;
+ }
+
+ resource.software = _software;
+ }
+
+ if (!_.isNil(props.implementation)) {
+ let src = props.implementation;
+ let _implementation = {};
+
+ if (!_.isNil(src.id)) {
+ _implementation.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _implementation.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.description)) {
+ _implementation.description = src.description;
+ }
+
+ if (!_.isNil(src.url)) {
+ _implementation.url = src.url;
+ }
+
+ resource.implementation = _implementation;
+ }
+
+ if (!_.isNil(props.lockedDate)) {
+ resource.lockedDate = props.lockedDate;
+ }
+
+ if (!_.isNil(props.codeSystem)) {
+ let src = props.codeSystem;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.codeSystem = [];
+
+ for (let item of src) {
+ let _codeSystem = {};
+
+ if (!_.isNil(item.id)) {
+ _codeSystem.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _codeSystem.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.uri)) {
+ _codeSystem.uri = item.uri;
+ }
+
+ if (!_.isNil(item.version)) {
+ _codeSystem.version = item.version;
+ }
+
+ if (!_.isNil(item.subsumption)) {
+ _codeSystem.subsumption = item.subsumption;
+ }
+
+ resource.codeSystem.push(_codeSystem);
+ }
+ }
+
+ if (!_.isNil(props.expansion)) {
+ let src = props.expansion;
+ let _expansion = {};
+
+ if (!_.isNil(src.id)) {
+ _expansion.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _expansion.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.hierarchical)) {
+ _expansion.hierarchical = src.hierarchical;
+ }
+
+ if (!_.isNil(src.paging)) {
+ _expansion.paging = src.paging;
+ }
+
+ if (!_.isNil(src.incomplete)) {
+ _expansion.incomplete = src.incomplete;
+ }
+
+ if (!_.isNil(src.parameter)) {
+ _expansion.parameter = src.parameter;
+ }
+
+ if (!_.isNil(src.textFilter)) {
+ _expansion.textFilter = src.textFilter;
+ }
+
+ resource.expansion = _expansion;
+ }
+
+ if (!_.isNil(props.codeSearch)) {
+ resource.codeSearch = props.codeSearch;
+ }
+
+ if (!_.isNil(props.validateCode)) {
+ let src = props.validateCode;
+ let _validateCode = {};
+
+ if (!_.isNil(src.id)) {
+ _validateCode.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _validateCode.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.translations)) {
+ _validateCode.translations = src.translations;
+ }
+
+ resource.validateCode = _validateCode;
+ }
+
+ if (!_.isNil(props.translation)) {
+ let src = props.translation;
+ let _translation = {};
+
+ if (!_.isNil(src.id)) {
+ _translation.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _translation.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.needsMap)) {
+ _translation.needsMap = src.needsMap;
+ }
+
+ resource.translation = _translation;
+ }
+
+ if (!_.isNil(props.closure)) {
+ let src = props.closure;
+ let _closure = {};
+
+ if (!_.isNil(src.id)) {
+ _closure.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _closure.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.translation)) {
+ _closure.translation = src.translation;
+ }
+
+ resource.closure = _closure;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/TerminologyCapabilities"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR TestReport resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function testReport(type, props) {
+ const mappings = {
+ "TestReport": testReport_TestReport
+ };
+
+ return mappings[type](props)
+}
+
+function testReport_TestReport(props) {
+ const resource = {
+ resourceType: "TestReport",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.testScript)) {
+ resource.testScript = util.reference(props.testScript);
+ }
+
+ if (!_.isNil(props.result)) {
+ resource.result = props.result;
+ }
+
+ if (!_.isNil(props.score)) {
+ resource.score = props.score;
+ }
+
+ if (!_.isNil(props.tester)) {
+ resource.tester = props.tester;
+ }
+
+ if (!_.isNil(props.issued)) {
+ resource.issued = props.issued;
+ }
+
+ if (!_.isNil(props.participant)) {
+ let src = props.participant;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.participant = [];
+
+ for (let item of src) {
+ let _participant = {};
+
+ if (!_.isNil(item.id)) {
+ _participant.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _participant.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.type)) {
+ _participant.type = item.type;
+ }
+
+ if (!_.isNil(item.uri)) {
+ _participant.uri = item.uri;
+ }
+
+ if (!_.isNil(item.display)) {
+ _participant.display = item.display;
+ }
+
+ resource.participant.push(_participant);
+ }
+ }
+
+ if (!_.isNil(props.setup)) {
+ let src = props.setup;
+ let _setup = {};
+
+ if (!_.isNil(src.id)) {
+ _setup.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _setup.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.action)) {
+ _setup.action = src.action;
+ }
+
+ resource.setup = _setup;
+ }
+
+ if (!_.isNil(props.test)) {
+ let src = props.test;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.test = [];
+
+ for (let item of src) {
+ let _test = {};
+
+ if (!_.isNil(item.id)) {
+ _test.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _test.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _test.name = item.name;
+ }
+
+ if (!_.isNil(item.description)) {
+ _test.description = item.description;
+ }
+
+ if (!_.isNil(item.action)) {
+ _test.action = item.action;
+ }
+
+ resource.test.push(_test);
+ }
+ }
+
+ if (!_.isNil(props.teardown)) {
+ let src = props.teardown;
+ let _teardown = {};
+
+ if (!_.isNil(src.id)) {
+ _teardown.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _teardown.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.action)) {
+ _teardown.action = src.action;
+ }
+
+ resource.teardown = _teardown;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/TestReport"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR TestScript resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function testScript(type, props) {
+ const mappings = {
+ "TestScript": testScript_TestScript
+ };
+
+ return mappings[type](props)
+}
+
+function testScript_TestScript(props) {
+ const resource = {
+ resourceType: "TestScript",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.origin)) {
+ let src = props.origin;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.origin = [];
+
+ for (let item of src) {
+ let _origin = {};
+
+ if (!_.isNil(item.id)) {
+ _origin.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _origin.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.index)) {
+ _origin.index = item.index;
+ }
+
+ if (!_.isNil(item.profile)) {
+ _origin.profile = item.profile;
+ }
+
+ resource.origin.push(_origin);
+ }
+ }
+
+ if (!_.isNil(props.destination)) {
+ let src = props.destination;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.destination = [];
+
+ for (let item of src) {
+ let _destination = {};
+
+ if (!_.isNil(item.id)) {
+ _destination.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _destination.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.index)) {
+ _destination.index = item.index;
+ }
+
+ if (!_.isNil(item.profile)) {
+ _destination.profile = item.profile;
+ }
+
+ resource.destination.push(_destination);
+ }
+ }
+
+ if (!_.isNil(props.metadata)) {
+ let src = props.metadata;
+ let _metadata = {};
+
+ if (!_.isNil(src.id)) {
+ _metadata.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _metadata.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.link)) {
+ _metadata.link = src.link;
+ }
+
+ if (!_.isNil(src.capability)) {
+ _metadata.capability = src.capability;
+ }
+
+ resource.metadata = _metadata;
+ }
+
+ if (!_.isNil(props.fixture)) {
+ let src = props.fixture;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.fixture = [];
+
+ for (let item of src) {
+ let _fixture = {};
+
+ if (!_.isNil(item.id)) {
+ _fixture.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _fixture.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.autocreate)) {
+ _fixture.autocreate = item.autocreate;
+ }
+
+ if (!_.isNil(item.autodelete)) {
+ _fixture.autodelete = item.autodelete;
+ }
+
+ if (!_.isNil(item.resource)) {
+ _fixture.resource = item.resource;
+ }
+
+ resource.fixture.push(_fixture);
+ }
+ }
+
+ if (!_.isNil(props.profile)) {
+ if (!Array.isArray(props.profile)) { props.profile = [props.profile]; }
+ resource.profile = util.reference(props.profile);
+ }
+
+ if (!_.isNil(props.variable)) {
+ let src = props.variable;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.variable = [];
+
+ for (let item of src) {
+ let _variable = {};
+
+ if (!_.isNil(item.id)) {
+ _variable.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _variable.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _variable.name = item.name;
+ }
+
+ if (!_.isNil(item.defaultValue)) {
+ _variable.defaultValue = item.defaultValue;
+ }
+
+ if (!_.isNil(item.description)) {
+ _variable.description = item.description;
+ }
+
+ if (!_.isNil(item.expression)) {
+ _variable.expression = item.expression;
+ }
+
+ if (!_.isNil(item.headerField)) {
+ _variable.headerField = item.headerField;
+ }
+
+ if (!_.isNil(item.hint)) {
+ _variable.hint = item.hint;
+ }
+
+ if (!_.isNil(item.path)) {
+ _variable.path = item.path;
+ }
+
+ if (!_.isNil(item.sourceId)) {
+ _variable.sourceId = item.sourceId;
+ }
+
+ resource.variable.push(_variable);
+ }
+ }
+
+ if (!_.isNil(props.setup)) {
+ let src = props.setup;
+ let _setup = {};
+
+ if (!_.isNil(src.id)) {
+ _setup.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _setup.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.action)) {
+ _setup.action = src.action;
+ }
+
+ resource.setup = _setup;
+ }
+
+ if (!_.isNil(props.test)) {
+ let src = props.test;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.test = [];
+
+ for (let item of src) {
+ let _test = {};
+
+ if (!_.isNil(item.id)) {
+ _test.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _test.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.name)) {
+ _test.name = item.name;
+ }
+
+ if (!_.isNil(item.description)) {
+ _test.description = item.description;
+ }
+
+ if (!_.isNil(item.action)) {
+ _test.action = item.action;
+ }
+
+ resource.test.push(_test);
+ }
+ }
+
+ if (!_.isNil(props.teardown)) {
+ let src = props.teardown;
+ let _teardown = {};
+
+ if (!_.isNil(src.id)) {
+ _teardown.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _teardown.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.action)) {
+ _teardown.action = src.action;
+ }
+
+ resource.teardown = _teardown;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/TestScript"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR ValueSet resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function valueSet(type, props) {
+ const mappings = {
+ "ValueSet": valueSet_ValueSet
+ };
+
+ return mappings[type](props)
+}
+
+function valueSet_ValueSet(props) {
+ const resource = {
+ resourceType: "ValueSet",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.url)) {
+ resource.url = props.url;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.version)) {
+ resource.version = props.version;
+ }
+
+ if (!_.isNil(props.name)) {
+ resource.name = props.name;
+ }
+
+ if (!_.isNil(props.title)) {
+ resource.title = props.title;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.experimental)) {
+ resource.experimental = props.experimental;
+ }
+
+ if (!_.isNil(props.date)) {
+ resource.date = props.date;
+ }
+
+ if (!_.isNil(props.publisher)) {
+ resource.publisher = props.publisher;
+ }
+
+ if (!_.isNil(props.contact)) {
+ resource.contact = props.contact;
+ }
+
+ if (!_.isNil(props.description)) {
+ resource.description = props.description;
+ }
+
+ if (!_.isNil(props.useContext)) {
+ resource.useContext = props.useContext;
+ }
+
+ if (!_.isNil(props.jurisdiction)) {
+ resource.jurisdiction = props.jurisdiction;
+ }
+
+ if (!_.isNil(props.immutable)) {
+ resource.immutable = props.immutable;
+ }
+
+ if (!_.isNil(props.purpose)) {
+ resource.purpose = props.purpose;
+ }
+
+ if (!_.isNil(props.copyright)) {
+ resource.copyright = props.copyright;
+ }
+
+ if (!_.isNil(props.compose)) {
+ let src = props.compose;
+ let _compose = {};
+
+ if (!_.isNil(src.id)) {
+ _compose.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _compose.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.lockedDate)) {
+ _compose.lockedDate = src.lockedDate;
+ }
+
+ if (!_.isNil(src.inactive)) {
+ _compose.inactive = src.inactive;
+ }
+
+ if (!_.isNil(src.include)) {
+ _compose.include = src.include;
+ }
+
+ resource.compose = _compose;
+ }
+
+ if (!_.isNil(props.expansion)) {
+ let src = props.expansion;
+ let _expansion = {};
+
+ if (!_.isNil(src.id)) {
+ _expansion.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _expansion.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.identifier)) {
+ _expansion.identifier = src.identifier;
+ }
+
+ if (!_.isNil(src.timestamp)) {
+ _expansion.timestamp = src.timestamp;
+ }
+
+ if (!_.isNil(src.total)) {
+ _expansion.total = src.total;
+ }
+
+ if (!_.isNil(src.offset)) {
+ _expansion.offset = src.offset;
+ }
+
+ if (!_.isNil(src.parameter)) {
+ _expansion.parameter = src.parameter;
+ }
+
+ if (!_.isNil(src.contains)) {
+ _expansion.contains = src.contains;
+ }
+
+ resource.expansion = _expansion;
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR VerificationResult resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function verificationResult(type, props) {
+ const mappings = {
+ "VerificationResult": verificationResult_VerificationResult
+ };
+
+ return mappings[type](props)
+}
+
+function verificationResult_VerificationResult(props) {
+ const resource = {
+ resourceType: "VerificationResult",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.target)) {
+ if (!Array.isArray(props.target)) { props.target = [props.target]; }
+ resource.target = util.reference(props.target);
+ }
+
+ if (!_.isNil(props.targetLocation)) {
+ resource.targetLocation = props.targetLocation;
+ }
+
+ if (!_.isNil(props.need)) {
+ resource.need = props.need;
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.statusDate)) {
+ resource.statusDate = props.statusDate;
+ }
+
+ if (!_.isNil(props.validationType)) {
+ resource.validationType = props.validationType;
+ }
+
+ if (!_.isNil(props.validationProcess)) {
+ resource.validationProcess = props.validationProcess;
+ }
+
+ if (!_.isNil(props.frequency)) {
+ resource.frequency = props.frequency;
+ }
+
+ if (!_.isNil(props.lastPerformed)) {
+ resource.lastPerformed = props.lastPerformed;
+ }
+
+ if (!_.isNil(props.nextScheduled)) {
+ resource.nextScheduled = props.nextScheduled;
+ }
+
+ if (!_.isNil(props.failureAction)) {
+ resource.failureAction = props.failureAction;
+ }
+
+ if (!_.isNil(props.primarySource)) {
+ let src = props.primarySource;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.primarySource = [];
+
+ for (let item of src) {
+ let _primarySource = {};
+
+ if (!_.isNil(item.id)) {
+ _primarySource.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _primarySource.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.who)) {
+ _primarySource.who = item.who;
+ }
+
+ if (!_.isNil(item.type)) {
+ _primarySource.type = item.type;
+ }
+
+ if (!_.isNil(item.communicationMethod)) {
+ _primarySource.communicationMethod = item.communicationMethod;
+ }
+
+ if (!_.isNil(item.validationStatus)) {
+ _primarySource.validationStatus = item.validationStatus;
+ }
+
+ if (!_.isNil(item.validationDate)) {
+ _primarySource.validationDate = item.validationDate;
+ }
+
+ if (!_.isNil(item.canPushUpdates)) {
+ _primarySource.canPushUpdates = item.canPushUpdates;
+ }
+
+ if (!_.isNil(item.pushTypeAvailable)) {
+ _primarySource.pushTypeAvailable = item.pushTypeAvailable;
+ }
+
+ resource.primarySource.push(_primarySource);
+ }
+ }
+
+ if (!_.isNil(props.attestation)) {
+ let src = props.attestation;
+ let _attestation = {};
+
+ if (!_.isNil(src.id)) {
+ _attestation.id = src.id;
+ }
+
+ if (!_.isNil(src.modifierExtension)) {
+ _attestation.modifierExtension = src.modifierExtension;
+ }
+
+ if (!_.isNil(src.who)) {
+ _attestation.who = src.who;
+ }
+
+ if (!_.isNil(src.onBehalfOf)) {
+ _attestation.onBehalfOf = src.onBehalfOf;
+ }
+
+ if (!_.isNil(src.communicationMethod)) {
+ _attestation.communicationMethod = src.communicationMethod;
+ }
+
+ if (!_.isNil(src.date)) {
+ _attestation.date = src.date;
+ }
+
+ if (!_.isNil(src.sourceIdentityCertificate)) {
+ _attestation.sourceIdentityCertificate = src.sourceIdentityCertificate;
+ }
+
+ if (!_.isNil(src.proxyIdentityCertificate)) {
+ _attestation.proxyIdentityCertificate = src.proxyIdentityCertificate;
+ }
+
+ if (!_.isNil(src.proxySignature)) {
+ _attestation.proxySignature = src.proxySignature;
+ }
+
+ if (!_.isNil(src.sourceSignature)) {
+ _attestation.sourceSignature = src.sourceSignature;
+ }
+
+ resource.attestation = _attestation;
+ }
+
+ if (!_.isNil(props.validator)) {
+ let src = props.validator;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.validator = [];
+
+ for (let item of src) {
+ let _validator = {};
+
+ if (!_.isNil(item.id)) {
+ _validator.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _validator.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.organization)) {
+ _validator.organization = item.organization;
+ }
+
+ if (!_.isNil(item.identityCertificate)) {
+ _validator.identityCertificate = item.identityCertificate;
+ }
+
+ if (!_.isNil(item.attestationSignature)) {
+ _validator.attestationSignature = item.attestationSignature;
+ }
+
+ resource.validator.push(_validator);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/VerificationResult"]
+ };
+
+ return resource;
+}
+
+/**
+ * Create a FHIR VisionPrescription resource.
+ * @public
+ * @function
+ * @param {string} type - The profile id for the resource variant
+ * @param props - Properties to apply to the resource
+ */
+export function visionPrescription(type, props) {
+ const mappings = {
+ "VisionPrescription": visionPrescription_VisionPrescription
+ };
+
+ return mappings[type](props)
+}
+
+function visionPrescription_VisionPrescription(props) {
+ const resource = {
+ resourceType: "VisionPrescription",
+
+ text: {
+ status: "generated",
+ div: ""
+ }
+ };
+
+ if (!_.isNil(props.id)) {
+ resource.id = props.id;
+ }
+
+ if (!_.isNil(props.implicitRules)) {
+ resource.implicitRules = props.implicitRules;
+ }
+
+ if (!_.isNil(props.language)) {
+ resource.language = props.language;
+ }
+
+ if (!_.isNil(props.text)) {
+ resource.text = props.text;
+ }
+
+ if (!_.isNil(props.contained)) {
+ resource.contained = props.contained;
+ }
+
+ if (!_.isNil(props.extension)) {
+ resource.extension = props.extension;
+ }
+
+ if (!_.isNil(props.modifierExtension)) {
+ resource.modifierExtension = props.modifierExtension;
+ }
+
+ if (!_.isNil(props.identifier)) {
+ if (!Array.isArray(props.identifier)) { props.identifier = [props.identifier]; }
+ resource.identifier = util.identifier(props.identifier, undefined);
+ }
+
+ if (!_.isNil(props.status)) {
+ resource.status = props.status;
+ }
+
+ if (!_.isNil(props.created)) {
+ resource.created = props.created;
+ }
+
+ if (!_.isNil(props.patient)) {
+ resource.patient = util.reference(props.patient);
+ }
+
+ if (!_.isNil(props.encounter)) {
+ resource.encounter = util.reference(props.encounter);
+ }
+
+ if (!_.isNil(props.dateWritten)) {
+ resource.dateWritten = props.dateWritten;
+ }
+
+ if (!_.isNil(props.prescriber)) {
+ resource.prescriber = util.reference(props.prescriber);
+ }
+
+ if (!_.isNil(props.lensSpecification)) {
+ let src = props.lensSpecification;
+ if (!Array.isArray(src)) { src = [src]; }
+ resource.lensSpecification = [];
+
+ for (let item of src) {
+ let _lensSpecification = {};
+
+ if (!_.isNil(item.id)) {
+ _lensSpecification.id = item.id;
+ }
+
+ if (!_.isNil(item.modifierExtension)) {
+ _lensSpecification.modifierExtension = item.modifierExtension;
+ }
+
+ if (!_.isNil(item.product)) {
+ _lensSpecification.product = item.product;
+ }
+
+ if (!_.isNil(item.eye)) {
+ _lensSpecification.eye = item.eye;
+ }
+
+ if (!_.isNil(item.sphere)) {
+ _lensSpecification.sphere = item.sphere;
+ }
+
+ if (!_.isNil(item.cylinder)) {
+ _lensSpecification.cylinder = item.cylinder;
+ }
+
+ if (!_.isNil(item.axis)) {
+ _lensSpecification.axis = item.axis;
+ }
+
+ if (!_.isNil(item.prism)) {
+ _lensSpecification.prism = item.prism;
+ }
+
+ if (!_.isNil(item.add)) {
+ _lensSpecification.add = item.add;
+ }
+
+ if (!_.isNil(item.power)) {
+ _lensSpecification.power = item.power;
+ }
+
+ if (!_.isNil(item.backCurve)) {
+ _lensSpecification.backCurve = item.backCurve;
+ }
+
+ if (!_.isNil(item.diameter)) {
+ _lensSpecification.diameter = item.diameter;
+ }
+
+ if (!_.isNil(item.duration)) {
+ _lensSpecification.duration = item.duration;
+ }
+
+ if (!_.isNil(item.color)) {
+ _lensSpecification.color = item.color;
+ }
+
+ if (!_.isNil(item.brand)) {
+ _lensSpecification.brand = item.brand;
+ }
+
+ if (!_.isNil(item.note)) {
+ _lensSpecification.note = item.note;
+ }
+
+ resource.lensSpecification.push(_lensSpecification);
+ }
+ }
+
+ resource.meta = {
+ profile: ["http://hl7.org/fhir/StructureDefinition/VisionPrescription"]
+ };
+
+ return resource;
+}
diff --git a/packages/fhir-4/src/index.js b/packages/fhir-4/src/index.js
new file mode 100644
index 000000000..e4c24a992
--- /dev/null
+++ b/packages/fhir-4/src/index.js
@@ -0,0 +1,9 @@
+import * as Adaptor from './Adaptor';
+export default Adaptor;
+
+export * from './Adaptor';
+
+export * as util from './utils';
+
+import * as builders from './builders';
+export { builders, builders as b };
diff --git a/packages/fhir-4/src/index.ts b/packages/fhir-4/src/index.ts
new file mode 100644
index 000000000..c8a91375e
--- /dev/null
+++ b/packages/fhir-4/src/index.ts
@@ -0,0 +1,9 @@
+import './builders';
+
+import * as Adaptor from './Adaptor';
+export default Adaptor;
+
+export * as util from './utils';
+
+export * as builders from './builders';
+export * as b from './builders';
diff --git a/packages/fhir-4/src/utils.js b/packages/fhir-4/src/utils.js
new file mode 100644
index 000000000..89f8a9f45
--- /dev/null
+++ b/packages/fhir-4/src/utils.js
@@ -0,0 +1,317 @@
+import _ from 'lodash';
+
+let systemMap = {};
+
+// https://hl7.org/fhir/R4/datatypes.html#dateTime
+const datetimeregex =
+ /([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?/;
+
+export const mapSystems = obj => {
+ if (Array.isArray(obj)) {
+ return obj.map(mapSystems);
+ }
+
+ if (obj.system in systemMap) {
+ return {
+ ...obj,
+ system: systemMap[obj.system],
+ };
+ }
+ return obj;
+};
+
+/**
+ * Define a set of mapped system values.
+ *
+ * Builder functions will use this mappings when they encounter them in system keys. Useful for setting shortcuts.
+ * @public
+ * @function
+ * @example Set shortcut system mappings
+ * util.setSystemMap({
+ * SmartCareID: 'http://moh.gov.et/fhir/hiv/identifier/SmartCareID'
+ * });
+ * builders.patient('patient', { identifier: util.identifier('xyz', 'SmartCareId') })
+ * };
+ */
+export const setSystemMap = newMappings => {
+ systemMap = newMappings;
+};
+
+export const extendSystemMap = newMappings => {
+ Object.assign(systemMap, newMappings);
+};
+
+/**
+ * Create an Identifier. Systems will be mapped against the system map.
+ * Value can be a string value or a value/system pair.
+ * Extras can be any other valid Identifier keys
+ * If input is an array of identifiers, an array of mapped/parsed values will be returned.
+ * @public
+ * @function
+ * @param input - an array of strings, or a identifier value as a string or object
+ * @param {string} [system] - the string system to use by default if
+ */
+// TODO not sure about the extras arg really. Should it just all be one object?
+export const identifier = (value, extras) => {
+ // If an array of inputs is passed in, map each element of the array
+ // because it's very common to support a set of identifiers, rather than just one
+ // Note that in this mode, each argument should be an object
+ if (Array.isArray(value)) {
+ return value.map(i => identifier(i));
+ }
+
+ const i = {};
+ if (typeof value === 'string') {
+ i.value = value;
+ } else {
+ Object.assign(i, value);
+ }
+
+ Object.assign(i, extras);
+ return mapSystems(i);
+};
+
+// TODO identifier takes many many things!
+// This API is insufficent really, and not well typed
+// technically all identifier fields are optional
+// but really there will usually be a value, and the value should usually have a system
+// everything else is optional
+// TODO how do we handle extensions?
+// export const identifier = (input, system) => {
+// // If an array of inputs is passed in, map each element of the array
+// // because it's very common to support a set of identifiers, rather than just one
+// if (Array.isArray(input)) {
+// return input.map(i => identifier(i, system));
+// }
+
+// if (input) {
+// if (typeof input === 'string') {
+// return mapSystems({
+// value: input,
+// system,
+// });
+// } else if (system) {
+// return mapSystems({
+// // Is system a default or override?
+// // Probably a default?
+// system,
+// ...input,
+// });
+// } else {
+// return mapSystems(input);
+// }
+// }
+// };
+
+/**
+ * Alias for util.identifier()
+ * @public
+ * @function
+ */
+export const id = identifier;
+
+/**
+ * Add an extension to a resource (or object).
+ * An object will be created and added to an `extension` array on the provided resource.
+ * The extension array will be set if it does not exist on the resource.
+ * The value will be smartly written to the object, ie, valueDateTime or valueReference or valueString
+ * @public
+ * @function
+ * @param resource - a FHIR resource object to add an extension too
+ * @param {string} url - the URL to set for the extension
+ * @param value - the value that the extension should contain
+ */
+export const addExtension = (resource, url, value) => {
+ const obj = {
+ url: url,
+ };
+
+ composite(obj, 'value', value);
+
+ resource.extension ??= [];
+ resource.extension.push(obj);
+};
+
+/**
+ * Find an extension with a given url in some array
+ * @public
+ * @function
+ * @param obj - a fhir resource
+ * @param {string} targetUrl - the extension URL you want to find
+ * @param {string} [path] - a path to extract from the resource. Optional.
+ */
+export const findExtension = (obj, targetUrl, path) => {
+ const result = obj.extension?.find(ext => ext.url === targetUrl);
+ if (result && path) {
+ return _.get(result, path);
+ }
+ return result;
+};
+
+// TODO should this also take display text?
+
+/**
+ * Create a coding object { code, system }. Systems will be mapped using the system map.
+ * @public
+ * @function
+ * @param {string} code - the code value
+ * @param {string} system - URL to the system. Well be mapped using the system map.
+ */
+export const coding = (code, system) => ({ code, system: mapSystems(system) });
+
+/**
+ * Create a value object { code, system } with optional system. Systems will be mapped.
+ * @public
+ * @function
+ * @param {string} value - the value
+ * @param {string} system - URL to the system. Well be mapped using the system map.
+ */
+export const value = (value, system, ...extra) =>
+ mapSystems({
+ value,
+ system,
+ ...extra,
+ });
+
+/**
+ * Create a codeableConcept. Codings can be coding objects or
+ * [code, system] tuples
+ * if the first argument is a string, it will be set as the text.
+ * Systems will be mapped with the system map
+ * @public
+ * @function
+ * @example
+ * const myConcept = util.concept(['abc', 'http://moh.gov.et/fhir/hiv/identifier/SmartCareID'])
+ * * @example
+ * const myConcept = util.concept('smart care id', ['abc', 'http://moh.gov.et/fhir/hiv/identifier/SmartCareID'])
+ */
+export const concept = (text, ...codings) => {
+ const result = {};
+ let incomingCodings = codings;
+ if (typeof text === 'string') {
+ result.text = text;
+ } else {
+ incomingCodings = [text].concat(codings);
+ }
+
+ const c = [];
+ for (const item of incomingCodings) {
+ if (Array.isArray(item)) {
+ c.push(coding(item[0], item[1]));
+ } else {
+ c.push(item);
+ }
+ }
+ result.coding = c;
+
+ return result;
+};
+
+/**
+ * Alias for util.concept()
+ * @public
+ * @function
+ */
+export const cc = concept;
+
+/**
+ * Create a reference object of the form { reference }
+ * If ref is an array, each item will be mapped and an array returned.
+ * If ref is a FHIR resource, a reference to it will be generated
+ * If ref is a string, it'll be treated as a reference id and returned as an object
+ * If ref is a valid FHIR reference, it'll just be returned.
+ * @public
+ * @function
+ * @param ref - the thing to generate a reference from
+ */
+export const reference = (ref, opts) => {
+ if (Array.isArray(ref)) {
+ return ref.map(reference, opts);
+ }
+ // If passed a resource, generate a reference to this resource
+ if (ref.resourceType && ref.id) {
+ // TODO is this right? Or just the id?
+ return { reference: `${ref.resourceType}/${ref.id}` };
+ }
+ // if passed an existing reference object, just return it
+ if (ref.reference) {
+ return ref;
+ }
+
+ const result = {};
+
+ if (typeof ref === 'string') {
+ result.reference = ref;
+ }
+
+ if (opts) {
+ Object.assign(result, opts);
+ }
+
+ return result;
+};
+
+/**
+ * Alias for util.reference()
+ * @public
+ * @function
+ */
+export const ref = reference;
+
+/**
+ * Write a value to the target object using a typed key
+ * Ie, if key is `value` and the value is a date time string,
+ * this function will write `valueDateTime` to the object.
+ *
+ * This function is poorly named.
+ * @public
+ * @function
+ * @param object - the object to write the composite key to
+ * @param {string} key - the base key to use to write the value
+ * @param value - some value to write to the object
+ */
+export const composite = (object, key, value) => {
+ const k = [key];
+
+ // TODO identify date time and period
+ // is there a better way we can do this?
+ // like how would we tell date time from a string?
+
+ if (value.coding) {
+ k.push('CodeableConcept');
+ } else if (value.reference) {
+ k.push('Reference');
+ }
+ // if the incoming value is a reference or another resource, make it a reference
+ // TODO Is this a bit cheeky? A bit presumptuous?
+ else if (value.id && value.meta && value.resourceType) {
+ k.push('Reference');
+ // eslint-disable-next-line no-param-reassign
+ value = reference(value);
+ } else if (value.start || value.end) {
+ // TODO maybe we should test that start/end are datetimes using that fancy regex?
+ k.push('Period');
+ } else if (value.dateTime) {
+ k.push('DateTime');
+ } else if (typeof value === 'string') {
+ if (datetimeregex.test(value)) {
+ k.push('DateTime');
+ } else {
+ k.push('String');
+ }
+ } else if (typeof value === 'boolean') {
+ k.push('Boolean');
+ } else if (typeof value === 'number') {
+ k.push('Integer');
+ }
+ // TODO: other data types need mapping
+
+ if (k.length === 2) {
+ const finalKey = k.join('');
+ object[finalKey] = value;
+ } else {
+ console.warn(
+ `WARNING: Failed to map ${key}: unrecognised data type (see utils.composite)`
+ );
+ }
+};
diff --git a/packages/fhir-4/test/Account.test.js b/packages/fhir-4/test/Account.test.js
new file mode 100644
index 000000000..00fbd20e5
--- /dev/null
+++ b/packages/fhir-4/test/Account.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Account", () => {
+ it("should create a simple Account", () => {
+ const resource = builders.account("Account", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ActivityDefinition.test.js b/packages/fhir-4/test/ActivityDefinition.test.js
new file mode 100644
index 000000000..92e5e2a2f
--- /dev/null
+++ b/packages/fhir-4/test/ActivityDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ActivityDefinition", () => {
+ it("should create a simple ActivityDefinition", () => {
+ const resource = builders.activityDefinition("ActivityDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/AdministrableProductDefinition.test.js b/packages/fhir-4/test/AdministrableProductDefinition.test.js
new file mode 100644
index 000000000..d53bed641
--- /dev/null
+++ b/packages/fhir-4/test/AdministrableProductDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("AdministrableProductDefinition", () => {
+ it("should create a simple AdministrableProductDefinition", () => {
+ const resource = builders.administrableProductDefinition("AdministrableProductDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/AdverseEvent.test.js b/packages/fhir-4/test/AdverseEvent.test.js
new file mode 100644
index 000000000..0d9117880
--- /dev/null
+++ b/packages/fhir-4/test/AdverseEvent.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("AdverseEvent", () => {
+ it("should create a simple AdverseEvent", () => {
+ const resource = builders.adverseEvent("AdverseEvent", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/AllergyIntolerance.test.js b/packages/fhir-4/test/AllergyIntolerance.test.js
new file mode 100644
index 000000000..6f25ef578
--- /dev/null
+++ b/packages/fhir-4/test/AllergyIntolerance.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("AllergyIntolerance", () => {
+ it("should create a simple AllergyIntolerance", () => {
+ const resource = builders.allergyIntolerance("AllergyIntolerance", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Appointment.test.js b/packages/fhir-4/test/Appointment.test.js
new file mode 100644
index 000000000..93d9af052
--- /dev/null
+++ b/packages/fhir-4/test/Appointment.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Appointment", () => {
+ it("should create a simple Appointment", () => {
+ const resource = builders.appointment("Appointment", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/AppointmentResponse.test.js b/packages/fhir-4/test/AppointmentResponse.test.js
new file mode 100644
index 000000000..128155a26
--- /dev/null
+++ b/packages/fhir-4/test/AppointmentResponse.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("AppointmentResponse", () => {
+ it("should create a simple AppointmentResponse", () => {
+ const resource = builders.appointmentResponse("AppointmentResponse", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/AuditEvent.test.js b/packages/fhir-4/test/AuditEvent.test.js
new file mode 100644
index 000000000..4d1e012b3
--- /dev/null
+++ b/packages/fhir-4/test/AuditEvent.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("AuditEvent", () => {
+ it("should create a simple AuditEvent", () => {
+ const resource = builders.auditEvent("AuditEvent", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Basic.test.js b/packages/fhir-4/test/Basic.test.js
new file mode 100644
index 000000000..a8c5aa940
--- /dev/null
+++ b/packages/fhir-4/test/Basic.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Basic", () => {
+ it("should create a simple Basic", () => {
+ const resource = builders.basic("Basic", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Binary.test.js b/packages/fhir-4/test/Binary.test.js
new file mode 100644
index 000000000..67fc238ad
--- /dev/null
+++ b/packages/fhir-4/test/Binary.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Binary", () => {
+ it("should create a simple Binary", () => {
+ const resource = builders.binary("Binary", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/BiologicallyDerivedProduct.test.js b/packages/fhir-4/test/BiologicallyDerivedProduct.test.js
new file mode 100644
index 000000000..a721e29ac
--- /dev/null
+++ b/packages/fhir-4/test/BiologicallyDerivedProduct.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("BiologicallyDerivedProduct", () => {
+ it("should create a simple BiologicallyDerivedProduct", () => {
+ const resource = builders.biologicallyDerivedProduct("BiologicallyDerivedProduct", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/BodyStructure.test.js b/packages/fhir-4/test/BodyStructure.test.js
new file mode 100644
index 000000000..50e895551
--- /dev/null
+++ b/packages/fhir-4/test/BodyStructure.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("BodyStructure", () => {
+ it("should create a simple BodyStructure", () => {
+ const resource = builders.bodyStructure("BodyStructure", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Bundle.test.js b/packages/fhir-4/test/Bundle.test.js
new file mode 100644
index 000000000..20e27a0f8
--- /dev/null
+++ b/packages/fhir-4/test/Bundle.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Bundle", () => {
+ it("should create a simple Bundle", () => {
+ const resource = builders.bundle("Bundle", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/CapabilityStatement.test.js b/packages/fhir-4/test/CapabilityStatement.test.js
new file mode 100644
index 000000000..ac018fa3d
--- /dev/null
+++ b/packages/fhir-4/test/CapabilityStatement.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("CapabilityStatement", () => {
+ it("should create a simple CapabilityStatement", () => {
+ const resource = builders.capabilityStatement("CapabilityStatement", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/CarePlan.test.js b/packages/fhir-4/test/CarePlan.test.js
new file mode 100644
index 000000000..eed1658da
--- /dev/null
+++ b/packages/fhir-4/test/CarePlan.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("CarePlan", () => {
+ it("should create a simple CarePlan", () => {
+ const resource = builders.carePlan("CarePlan", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/CareTeam.test.js b/packages/fhir-4/test/CareTeam.test.js
new file mode 100644
index 000000000..7c589e8bb
--- /dev/null
+++ b/packages/fhir-4/test/CareTeam.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("CareTeam", () => {
+ it("should create a simple CareTeam", () => {
+ const resource = builders.careTeam("CareTeam", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/CatalogEntry.test.js b/packages/fhir-4/test/CatalogEntry.test.js
new file mode 100644
index 000000000..c776fd122
--- /dev/null
+++ b/packages/fhir-4/test/CatalogEntry.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("CatalogEntry", () => {
+ it("should create a simple CatalogEntry", () => {
+ const resource = builders.catalogEntry("CatalogEntry", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ChargeItem.test.js b/packages/fhir-4/test/ChargeItem.test.js
new file mode 100644
index 000000000..11f607533
--- /dev/null
+++ b/packages/fhir-4/test/ChargeItem.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ChargeItem", () => {
+ it("should create a simple ChargeItem", () => {
+ const resource = builders.chargeItem("ChargeItem", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ChargeItemDefinition.test.js b/packages/fhir-4/test/ChargeItemDefinition.test.js
new file mode 100644
index 000000000..a3c59bcbd
--- /dev/null
+++ b/packages/fhir-4/test/ChargeItemDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ChargeItemDefinition", () => {
+ it("should create a simple ChargeItemDefinition", () => {
+ const resource = builders.chargeItemDefinition("ChargeItemDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Citation.test.js b/packages/fhir-4/test/Citation.test.js
new file mode 100644
index 000000000..d1640f2c7
--- /dev/null
+++ b/packages/fhir-4/test/Citation.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Citation", () => {
+ it("should create a simple Citation", () => {
+ const resource = builders.citation("Citation", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Claim.test.js b/packages/fhir-4/test/Claim.test.js
new file mode 100644
index 000000000..4035cdd7c
--- /dev/null
+++ b/packages/fhir-4/test/Claim.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Claim", () => {
+ it("should create a simple Claim", () => {
+ const resource = builders.claim("Claim", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ClaimResponse.test.js b/packages/fhir-4/test/ClaimResponse.test.js
new file mode 100644
index 000000000..dc6570e96
--- /dev/null
+++ b/packages/fhir-4/test/ClaimResponse.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ClaimResponse", () => {
+ it("should create a simple ClaimResponse", () => {
+ const resource = builders.claimResponse("ClaimResponse", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ClinicalImpression.test.js b/packages/fhir-4/test/ClinicalImpression.test.js
new file mode 100644
index 000000000..a5acb00d2
--- /dev/null
+++ b/packages/fhir-4/test/ClinicalImpression.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ClinicalImpression", () => {
+ it("should create a simple ClinicalImpression", () => {
+ const resource = builders.clinicalImpression("ClinicalImpression", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ClinicalUseDefinition.test.js b/packages/fhir-4/test/ClinicalUseDefinition.test.js
new file mode 100644
index 000000000..c18070d0d
--- /dev/null
+++ b/packages/fhir-4/test/ClinicalUseDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ClinicalUseDefinition", () => {
+ it("should create a simple ClinicalUseDefinition", () => {
+ const resource = builders.clinicalUseDefinition("ClinicalUseDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/CodeSystem.test.js b/packages/fhir-4/test/CodeSystem.test.js
new file mode 100644
index 000000000..5a8c103a1
--- /dev/null
+++ b/packages/fhir-4/test/CodeSystem.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("CodeSystem", () => {
+ it("should create a simple CodeSystem", () => {
+ const resource = builders.codeSystem("CodeSystem", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Communication.test.js b/packages/fhir-4/test/Communication.test.js
new file mode 100644
index 000000000..65e0bfdd2
--- /dev/null
+++ b/packages/fhir-4/test/Communication.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Communication", () => {
+ it("should create a simple Communication", () => {
+ const resource = builders.communication("Communication", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/CommunicationRequest.test.js b/packages/fhir-4/test/CommunicationRequest.test.js
new file mode 100644
index 000000000..fa5c3c45c
--- /dev/null
+++ b/packages/fhir-4/test/CommunicationRequest.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("CommunicationRequest", () => {
+ it("should create a simple CommunicationRequest", () => {
+ const resource = builders.communicationRequest("CommunicationRequest", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/CompartmentDefinition.test.js b/packages/fhir-4/test/CompartmentDefinition.test.js
new file mode 100644
index 000000000..ad64e9add
--- /dev/null
+++ b/packages/fhir-4/test/CompartmentDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("CompartmentDefinition", () => {
+ it("should create a simple CompartmentDefinition", () => {
+ const resource = builders.compartmentDefinition("CompartmentDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Composition.test.js b/packages/fhir-4/test/Composition.test.js
new file mode 100644
index 000000000..da3767879
--- /dev/null
+++ b/packages/fhir-4/test/Composition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Composition", () => {
+ it("should create a simple Composition", () => {
+ const resource = builders.composition("Composition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ConceptMap.test.js b/packages/fhir-4/test/ConceptMap.test.js
new file mode 100644
index 000000000..60875decf
--- /dev/null
+++ b/packages/fhir-4/test/ConceptMap.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ConceptMap", () => {
+ it("should create a simple ConceptMap", () => {
+ const resource = builders.conceptMap("ConceptMap", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Condition.test.js b/packages/fhir-4/test/Condition.test.js
new file mode 100644
index 000000000..9e32a2868
--- /dev/null
+++ b/packages/fhir-4/test/Condition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Condition", () => {
+ it("should create a simple Condition", () => {
+ const resource = builders.condition("Condition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Consent.test.js b/packages/fhir-4/test/Consent.test.js
new file mode 100644
index 000000000..1854c7dba
--- /dev/null
+++ b/packages/fhir-4/test/Consent.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Consent", () => {
+ it("should create a simple Consent", () => {
+ const resource = builders.consent("Consent", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Contract.test.js b/packages/fhir-4/test/Contract.test.js
new file mode 100644
index 000000000..77525a724
--- /dev/null
+++ b/packages/fhir-4/test/Contract.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Contract", () => {
+ it("should create a simple Contract", () => {
+ const resource = builders.contract("Contract", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Coverage.test.js b/packages/fhir-4/test/Coverage.test.js
new file mode 100644
index 000000000..833f07c50
--- /dev/null
+++ b/packages/fhir-4/test/Coverage.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Coverage", () => {
+ it("should create a simple Coverage", () => {
+ const resource = builders.coverage("Coverage", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/CoverageEligibilityRequest.test.js b/packages/fhir-4/test/CoverageEligibilityRequest.test.js
new file mode 100644
index 000000000..3401e9c25
--- /dev/null
+++ b/packages/fhir-4/test/CoverageEligibilityRequest.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("CoverageEligibilityRequest", () => {
+ it("should create a simple CoverageEligibilityRequest", () => {
+ const resource = builders.coverageEligibilityRequest("CoverageEligibilityRequest", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/CoverageEligibilityResponse.test.js b/packages/fhir-4/test/CoverageEligibilityResponse.test.js
new file mode 100644
index 000000000..5cf42abcf
--- /dev/null
+++ b/packages/fhir-4/test/CoverageEligibilityResponse.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("CoverageEligibilityResponse", () => {
+ it("should create a simple CoverageEligibilityResponse", () => {
+ const resource = builders.coverageEligibilityResponse("CoverageEligibilityResponse", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/DetectedIssue.test.js b/packages/fhir-4/test/DetectedIssue.test.js
new file mode 100644
index 000000000..a9db09607
--- /dev/null
+++ b/packages/fhir-4/test/DetectedIssue.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("DetectedIssue", () => {
+ it("should create a simple DetectedIssue", () => {
+ const resource = builders.detectedIssue("DetectedIssue", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Device.test.js b/packages/fhir-4/test/Device.test.js
new file mode 100644
index 000000000..cae8ad51b
--- /dev/null
+++ b/packages/fhir-4/test/Device.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Device", () => {
+ it("should create a simple Device", () => {
+ const resource = builders.device("Device", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/DeviceDefinition.test.js b/packages/fhir-4/test/DeviceDefinition.test.js
new file mode 100644
index 000000000..98b2623c6
--- /dev/null
+++ b/packages/fhir-4/test/DeviceDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("DeviceDefinition", () => {
+ it("should create a simple DeviceDefinition", () => {
+ const resource = builders.deviceDefinition("DeviceDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/DeviceMetric.test.js b/packages/fhir-4/test/DeviceMetric.test.js
new file mode 100644
index 000000000..3451d795d
--- /dev/null
+++ b/packages/fhir-4/test/DeviceMetric.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("DeviceMetric", () => {
+ it("should create a simple DeviceMetric", () => {
+ const resource = builders.deviceMetric("DeviceMetric", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/DeviceRequest.test.js b/packages/fhir-4/test/DeviceRequest.test.js
new file mode 100644
index 000000000..5ba8c6f83
--- /dev/null
+++ b/packages/fhir-4/test/DeviceRequest.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("DeviceRequest", () => {
+ it("should create a simple DeviceRequest", () => {
+ const resource = builders.deviceRequest("DeviceRequest", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/DeviceUseStatement.test.js b/packages/fhir-4/test/DeviceUseStatement.test.js
new file mode 100644
index 000000000..73061ee52
--- /dev/null
+++ b/packages/fhir-4/test/DeviceUseStatement.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("DeviceUseStatement", () => {
+ it("should create a simple DeviceUseStatement", () => {
+ const resource = builders.deviceUseStatement("DeviceUseStatement", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/DiagnosticReport.test.js b/packages/fhir-4/test/DiagnosticReport.test.js
new file mode 100644
index 000000000..3dcdaadcc
--- /dev/null
+++ b/packages/fhir-4/test/DiagnosticReport.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("DiagnosticReport", () => {
+ it("should create a simple DiagnosticReport", () => {
+ const resource = builders.diagnosticReport("DiagnosticReport", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/DocumentManifest.test.js b/packages/fhir-4/test/DocumentManifest.test.js
new file mode 100644
index 000000000..74329b385
--- /dev/null
+++ b/packages/fhir-4/test/DocumentManifest.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("DocumentManifest", () => {
+ it("should create a simple DocumentManifest", () => {
+ const resource = builders.documentManifest("DocumentManifest", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/DocumentReference.test.js b/packages/fhir-4/test/DocumentReference.test.js
new file mode 100644
index 000000000..81324ef6b
--- /dev/null
+++ b/packages/fhir-4/test/DocumentReference.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("DocumentReference", () => {
+ it("should create a simple DocumentReference", () => {
+ const resource = builders.documentReference("DocumentReference", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/DomainResource.test.js b/packages/fhir-4/test/DomainResource.test.js
new file mode 100644
index 000000000..bf3df1739
--- /dev/null
+++ b/packages/fhir-4/test/DomainResource.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("DomainResource", () => {
+ it("should create a simple DomainResource", () => {
+ const resource = builders.domainResource("DomainResource", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Encounter.test.js b/packages/fhir-4/test/Encounter.test.js
new file mode 100644
index 000000000..3ae60a4f1
--- /dev/null
+++ b/packages/fhir-4/test/Encounter.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Encounter", () => {
+ it("should create a simple Encounter", () => {
+ const resource = builders.encounter("Encounter", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Endpoint.test.js b/packages/fhir-4/test/Endpoint.test.js
new file mode 100644
index 000000000..0e220dc24
--- /dev/null
+++ b/packages/fhir-4/test/Endpoint.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Endpoint", () => {
+ it("should create a simple Endpoint", () => {
+ const resource = builders.endpoint("Endpoint", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/EnrollmentRequest.test.js b/packages/fhir-4/test/EnrollmentRequest.test.js
new file mode 100644
index 000000000..762b7cece
--- /dev/null
+++ b/packages/fhir-4/test/EnrollmentRequest.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("EnrollmentRequest", () => {
+ it("should create a simple EnrollmentRequest", () => {
+ const resource = builders.enrollmentRequest("EnrollmentRequest", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/EnrollmentResponse.test.js b/packages/fhir-4/test/EnrollmentResponse.test.js
new file mode 100644
index 000000000..9c16c3ec3
--- /dev/null
+++ b/packages/fhir-4/test/EnrollmentResponse.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("EnrollmentResponse", () => {
+ it("should create a simple EnrollmentResponse", () => {
+ const resource = builders.enrollmentResponse("EnrollmentResponse", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/EpisodeOfCare.test.js b/packages/fhir-4/test/EpisodeOfCare.test.js
new file mode 100644
index 000000000..a6861a9fb
--- /dev/null
+++ b/packages/fhir-4/test/EpisodeOfCare.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("EpisodeOfCare", () => {
+ it("should create a simple EpisodeOfCare", () => {
+ const resource = builders.episodeOfCare("EpisodeOfCare", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/EventDefinition.test.js b/packages/fhir-4/test/EventDefinition.test.js
new file mode 100644
index 000000000..38712186f
--- /dev/null
+++ b/packages/fhir-4/test/EventDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("EventDefinition", () => {
+ it("should create a simple EventDefinition", () => {
+ const resource = builders.eventDefinition("EventDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Evidence.test.js b/packages/fhir-4/test/Evidence.test.js
new file mode 100644
index 000000000..a84955861
--- /dev/null
+++ b/packages/fhir-4/test/Evidence.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Evidence", () => {
+ it("should create a simple Evidence", () => {
+ const resource = builders.evidence("Evidence", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/EvidenceReport.test.js b/packages/fhir-4/test/EvidenceReport.test.js
new file mode 100644
index 000000000..355eafca3
--- /dev/null
+++ b/packages/fhir-4/test/EvidenceReport.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("EvidenceReport", () => {
+ it("should create a simple EvidenceReport", () => {
+ const resource = builders.evidenceReport("EvidenceReport", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/EvidenceVariable.test.js b/packages/fhir-4/test/EvidenceVariable.test.js
new file mode 100644
index 000000000..c5a737c21
--- /dev/null
+++ b/packages/fhir-4/test/EvidenceVariable.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("EvidenceVariable", () => {
+ it("should create a simple EvidenceVariable", () => {
+ const resource = builders.evidenceVariable("EvidenceVariable", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ExampleScenario.test.js b/packages/fhir-4/test/ExampleScenario.test.js
new file mode 100644
index 000000000..6d860dcf6
--- /dev/null
+++ b/packages/fhir-4/test/ExampleScenario.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ExampleScenario", () => {
+ it("should create a simple ExampleScenario", () => {
+ const resource = builders.exampleScenario("ExampleScenario", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ExplanationOfBenefit.test.js b/packages/fhir-4/test/ExplanationOfBenefit.test.js
new file mode 100644
index 000000000..7ae4d9d5b
--- /dev/null
+++ b/packages/fhir-4/test/ExplanationOfBenefit.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ExplanationOfBenefit", () => {
+ it("should create a simple ExplanationOfBenefit", () => {
+ const resource = builders.explanationOfBenefit("ExplanationOfBenefit", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/FamilyMemberHistory.test.js b/packages/fhir-4/test/FamilyMemberHistory.test.js
new file mode 100644
index 000000000..8cd74c38c
--- /dev/null
+++ b/packages/fhir-4/test/FamilyMemberHistory.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("FamilyMemberHistory", () => {
+ it("should create a simple FamilyMemberHistory", () => {
+ const resource = builders.familyMemberHistory("FamilyMemberHistory", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Flag.test.js b/packages/fhir-4/test/Flag.test.js
new file mode 100644
index 000000000..53cbf9cd6
--- /dev/null
+++ b/packages/fhir-4/test/Flag.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Flag", () => {
+ it("should create a simple Flag", () => {
+ const resource = builders.flag("Flag", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Goal.test.js b/packages/fhir-4/test/Goal.test.js
new file mode 100644
index 000000000..43e182ec0
--- /dev/null
+++ b/packages/fhir-4/test/Goal.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Goal", () => {
+ it("should create a simple Goal", () => {
+ const resource = builders.goal("Goal", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/GraphDefinition.test.js b/packages/fhir-4/test/GraphDefinition.test.js
new file mode 100644
index 000000000..e081fe7e7
--- /dev/null
+++ b/packages/fhir-4/test/GraphDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("GraphDefinition", () => {
+ it("should create a simple GraphDefinition", () => {
+ const resource = builders.graphDefinition("GraphDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Group.test.js b/packages/fhir-4/test/Group.test.js
new file mode 100644
index 000000000..4e86f3a11
--- /dev/null
+++ b/packages/fhir-4/test/Group.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Group", () => {
+ it("should create a simple Group", () => {
+ const resource = builders.group("Group", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/GuidanceResponse.test.js b/packages/fhir-4/test/GuidanceResponse.test.js
new file mode 100644
index 000000000..1e2d32371
--- /dev/null
+++ b/packages/fhir-4/test/GuidanceResponse.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("GuidanceResponse", () => {
+ it("should create a simple GuidanceResponse", () => {
+ const resource = builders.guidanceResponse("GuidanceResponse", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/HealthcareService.test.js b/packages/fhir-4/test/HealthcareService.test.js
new file mode 100644
index 000000000..bbaa293d7
--- /dev/null
+++ b/packages/fhir-4/test/HealthcareService.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("HealthcareService", () => {
+ it("should create a simple HealthcareService", () => {
+ const resource = builders.healthcareService("HealthcareService", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ImagingStudy.test.js b/packages/fhir-4/test/ImagingStudy.test.js
new file mode 100644
index 000000000..b9d35120a
--- /dev/null
+++ b/packages/fhir-4/test/ImagingStudy.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ImagingStudy", () => {
+ it("should create a simple ImagingStudy", () => {
+ const resource = builders.imagingStudy("ImagingStudy", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Immunization.test.js b/packages/fhir-4/test/Immunization.test.js
new file mode 100644
index 000000000..b087b6f39
--- /dev/null
+++ b/packages/fhir-4/test/Immunization.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Immunization", () => {
+ it("should create a simple Immunization", () => {
+ const resource = builders.immunization("Immunization", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ImmunizationEvaluation.test.js b/packages/fhir-4/test/ImmunizationEvaluation.test.js
new file mode 100644
index 000000000..8d0826b36
--- /dev/null
+++ b/packages/fhir-4/test/ImmunizationEvaluation.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ImmunizationEvaluation", () => {
+ it("should create a simple ImmunizationEvaluation", () => {
+ const resource = builders.immunizationEvaluation("ImmunizationEvaluation", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ImmunizationRecommendation.test.js b/packages/fhir-4/test/ImmunizationRecommendation.test.js
new file mode 100644
index 000000000..3b8152961
--- /dev/null
+++ b/packages/fhir-4/test/ImmunizationRecommendation.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ImmunizationRecommendation", () => {
+ it("should create a simple ImmunizationRecommendation", () => {
+ const resource = builders.immunizationRecommendation("ImmunizationRecommendation", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ImplementationGuide.test.js b/packages/fhir-4/test/ImplementationGuide.test.js
new file mode 100644
index 000000000..212e0cc98
--- /dev/null
+++ b/packages/fhir-4/test/ImplementationGuide.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ImplementationGuide", () => {
+ it("should create a simple ImplementationGuide", () => {
+ const resource = builders.implementationGuide("ImplementationGuide", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Ingredient.test.js b/packages/fhir-4/test/Ingredient.test.js
new file mode 100644
index 000000000..b4b35ab26
--- /dev/null
+++ b/packages/fhir-4/test/Ingredient.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Ingredient", () => {
+ it("should create a simple Ingredient", () => {
+ const resource = builders.ingredient("Ingredient", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/InsurancePlan.test.js b/packages/fhir-4/test/InsurancePlan.test.js
new file mode 100644
index 000000000..6f40b5a08
--- /dev/null
+++ b/packages/fhir-4/test/InsurancePlan.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("InsurancePlan", () => {
+ it("should create a simple InsurancePlan", () => {
+ const resource = builders.insurancePlan("InsurancePlan", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Invoice.test.js b/packages/fhir-4/test/Invoice.test.js
new file mode 100644
index 000000000..23107a70f
--- /dev/null
+++ b/packages/fhir-4/test/Invoice.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Invoice", () => {
+ it("should create a simple Invoice", () => {
+ const resource = builders.invoice("Invoice", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Library.test.js b/packages/fhir-4/test/Library.test.js
new file mode 100644
index 000000000..ba4f6258b
--- /dev/null
+++ b/packages/fhir-4/test/Library.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Library", () => {
+ it("should create a simple Library", () => {
+ const resource = builders.library("Library", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Linkage.test.js b/packages/fhir-4/test/Linkage.test.js
new file mode 100644
index 000000000..6ce752cfa
--- /dev/null
+++ b/packages/fhir-4/test/Linkage.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Linkage", () => {
+ it("should create a simple Linkage", () => {
+ const resource = builders.linkage("Linkage", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/List.test.js b/packages/fhir-4/test/List.test.js
new file mode 100644
index 000000000..649c5e0ac
--- /dev/null
+++ b/packages/fhir-4/test/List.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("List", () => {
+ it("should create a simple List", () => {
+ const resource = builders.list("List", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Location.test.js b/packages/fhir-4/test/Location.test.js
new file mode 100644
index 000000000..ee8f7e064
--- /dev/null
+++ b/packages/fhir-4/test/Location.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Location", () => {
+ it("should create a simple Location", () => {
+ const resource = builders.location("Location", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ManufacturedItemDefinition.test.js b/packages/fhir-4/test/ManufacturedItemDefinition.test.js
new file mode 100644
index 000000000..0f09cee43
--- /dev/null
+++ b/packages/fhir-4/test/ManufacturedItemDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ManufacturedItemDefinition", () => {
+ it("should create a simple ManufacturedItemDefinition", () => {
+ const resource = builders.manufacturedItemDefinition("ManufacturedItemDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Measure.test.js b/packages/fhir-4/test/Measure.test.js
new file mode 100644
index 000000000..fa935603d
--- /dev/null
+++ b/packages/fhir-4/test/Measure.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Measure", () => {
+ it("should create a simple Measure", () => {
+ const resource = builders.measure("Measure", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/MeasureReport.test.js b/packages/fhir-4/test/MeasureReport.test.js
new file mode 100644
index 000000000..8e0a506c0
--- /dev/null
+++ b/packages/fhir-4/test/MeasureReport.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("MeasureReport", () => {
+ it("should create a simple MeasureReport", () => {
+ const resource = builders.measureReport("MeasureReport", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Media.test.js b/packages/fhir-4/test/Media.test.js
new file mode 100644
index 000000000..be53771b9
--- /dev/null
+++ b/packages/fhir-4/test/Media.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Media", () => {
+ it("should create a simple Media", () => {
+ const resource = builders.media("Media", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Medication.test.js b/packages/fhir-4/test/Medication.test.js
new file mode 100644
index 000000000..28f945381
--- /dev/null
+++ b/packages/fhir-4/test/Medication.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Medication", () => {
+ it("should create a simple Medication", () => {
+ const resource = builders.medication("Medication", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/MedicationAdministration.test.js b/packages/fhir-4/test/MedicationAdministration.test.js
new file mode 100644
index 000000000..ff2a987e3
--- /dev/null
+++ b/packages/fhir-4/test/MedicationAdministration.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("MedicationAdministration", () => {
+ it("should create a simple MedicationAdministration", () => {
+ const resource = builders.medicationAdministration("MedicationAdministration", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/MedicationDispense.test.js b/packages/fhir-4/test/MedicationDispense.test.js
new file mode 100644
index 000000000..c0f6c8db9
--- /dev/null
+++ b/packages/fhir-4/test/MedicationDispense.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("MedicationDispense", () => {
+ it("should create a simple MedicationDispense", () => {
+ const resource = builders.medicationDispense("MedicationDispense", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/MedicationKnowledge.test.js b/packages/fhir-4/test/MedicationKnowledge.test.js
new file mode 100644
index 000000000..93d587068
--- /dev/null
+++ b/packages/fhir-4/test/MedicationKnowledge.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("MedicationKnowledge", () => {
+ it("should create a simple MedicationKnowledge", () => {
+ const resource = builders.medicationKnowledge("MedicationKnowledge", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/MedicationRequest.test.js b/packages/fhir-4/test/MedicationRequest.test.js
new file mode 100644
index 000000000..2030e7c2e
--- /dev/null
+++ b/packages/fhir-4/test/MedicationRequest.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("MedicationRequest", () => {
+ it("should create a simple MedicationRequest", () => {
+ const resource = builders.medicationRequest("MedicationRequest", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/MedicationStatement.test.js b/packages/fhir-4/test/MedicationStatement.test.js
new file mode 100644
index 000000000..ef078b81d
--- /dev/null
+++ b/packages/fhir-4/test/MedicationStatement.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("MedicationStatement", () => {
+ it("should create a simple MedicationStatement", () => {
+ const resource = builders.medicationStatement("MedicationStatement", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/MedicinalProductDefinition.test.js b/packages/fhir-4/test/MedicinalProductDefinition.test.js
new file mode 100644
index 000000000..d907b4d99
--- /dev/null
+++ b/packages/fhir-4/test/MedicinalProductDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("MedicinalProductDefinition", () => {
+ it("should create a simple MedicinalProductDefinition", () => {
+ const resource = builders.medicinalProductDefinition("MedicinalProductDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/MessageDefinition.test.js b/packages/fhir-4/test/MessageDefinition.test.js
new file mode 100644
index 000000000..51e7f5629
--- /dev/null
+++ b/packages/fhir-4/test/MessageDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("MessageDefinition", () => {
+ it("should create a simple MessageDefinition", () => {
+ const resource = builders.messageDefinition("MessageDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/MessageHeader.test.js b/packages/fhir-4/test/MessageHeader.test.js
new file mode 100644
index 000000000..831caedc6
--- /dev/null
+++ b/packages/fhir-4/test/MessageHeader.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("MessageHeader", () => {
+ it("should create a simple MessageHeader", () => {
+ const resource = builders.messageHeader("MessageHeader", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/MolecularSequence.test.js b/packages/fhir-4/test/MolecularSequence.test.js
new file mode 100644
index 000000000..46c7d6d25
--- /dev/null
+++ b/packages/fhir-4/test/MolecularSequence.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("MolecularSequence", () => {
+ it("should create a simple MolecularSequence", () => {
+ const resource = builders.molecularSequence("MolecularSequence", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/NamingSystem.test.js b/packages/fhir-4/test/NamingSystem.test.js
new file mode 100644
index 000000000..d81291197
--- /dev/null
+++ b/packages/fhir-4/test/NamingSystem.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("NamingSystem", () => {
+ it("should create a simple NamingSystem", () => {
+ const resource = builders.namingSystem("NamingSystem", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/NutritionOrder.test.js b/packages/fhir-4/test/NutritionOrder.test.js
new file mode 100644
index 000000000..6b149af06
--- /dev/null
+++ b/packages/fhir-4/test/NutritionOrder.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("NutritionOrder", () => {
+ it("should create a simple NutritionOrder", () => {
+ const resource = builders.nutritionOrder("NutritionOrder", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/NutritionProduct.test.js b/packages/fhir-4/test/NutritionProduct.test.js
new file mode 100644
index 000000000..5502487ac
--- /dev/null
+++ b/packages/fhir-4/test/NutritionProduct.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("NutritionProduct", () => {
+ it("should create a simple NutritionProduct", () => {
+ const resource = builders.nutritionProduct("NutritionProduct", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Observation.test.js b/packages/fhir-4/test/Observation.test.js
new file mode 100644
index 000000000..f8f740849
--- /dev/null
+++ b/packages/fhir-4/test/Observation.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Observation", () => {
+ it("should create a simple Observation", () => {
+ const resource = builders.observation("Observation", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ObservationDefinition.test.js b/packages/fhir-4/test/ObservationDefinition.test.js
new file mode 100644
index 000000000..986b17c34
--- /dev/null
+++ b/packages/fhir-4/test/ObservationDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ObservationDefinition", () => {
+ it("should create a simple ObservationDefinition", () => {
+ const resource = builders.observationDefinition("ObservationDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/OperationDefinition.test.js b/packages/fhir-4/test/OperationDefinition.test.js
new file mode 100644
index 000000000..ff0462eb8
--- /dev/null
+++ b/packages/fhir-4/test/OperationDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("OperationDefinition", () => {
+ it("should create a simple OperationDefinition", () => {
+ const resource = builders.operationDefinition("OperationDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/OperationOutcome.test.js b/packages/fhir-4/test/OperationOutcome.test.js
new file mode 100644
index 000000000..6d0d2bb73
--- /dev/null
+++ b/packages/fhir-4/test/OperationOutcome.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("OperationOutcome", () => {
+ it("should create a simple OperationOutcome", () => {
+ const resource = builders.operationOutcome("OperationOutcome", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Organization.test.js b/packages/fhir-4/test/Organization.test.js
new file mode 100644
index 000000000..822f5b970
--- /dev/null
+++ b/packages/fhir-4/test/Organization.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Organization", () => {
+ it("should create a simple Organization", () => {
+ const resource = builders.organization("Organization", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/OrganizationAffiliation.test.js b/packages/fhir-4/test/OrganizationAffiliation.test.js
new file mode 100644
index 000000000..dd4c6b226
--- /dev/null
+++ b/packages/fhir-4/test/OrganizationAffiliation.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("OrganizationAffiliation", () => {
+ it("should create a simple OrganizationAffiliation", () => {
+ const resource = builders.organizationAffiliation("OrganizationAffiliation", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/PackagedProductDefinition.test.js b/packages/fhir-4/test/PackagedProductDefinition.test.js
new file mode 100644
index 000000000..09f5928ee
--- /dev/null
+++ b/packages/fhir-4/test/PackagedProductDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("PackagedProductDefinition", () => {
+ it("should create a simple PackagedProductDefinition", () => {
+ const resource = builders.packagedProductDefinition("PackagedProductDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Parameters.test.js b/packages/fhir-4/test/Parameters.test.js
new file mode 100644
index 000000000..5c0cad219
--- /dev/null
+++ b/packages/fhir-4/test/Parameters.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Parameters", () => {
+ it("should create a simple Parameters", () => {
+ const resource = builders.parameters("Parameters", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Patient.test.js b/packages/fhir-4/test/Patient.test.js
new file mode 100644
index 000000000..fe023fe7d
--- /dev/null
+++ b/packages/fhir-4/test/Patient.test.js
@@ -0,0 +1,55 @@
+import { expect, assert } from 'chai';
+import * as builders from '../src/builders.js';
+import { identifier } from '../src/utils.js';
+
+describe('Patient', () => {
+ it('should create a simple Patient', () => {
+ const resource = builders.patient('Patient', {});
+ assert.isOk(resource);
+ });
+
+ it('should create a simple Patient with identifier', () => {
+ const resource = builders.patient('Patient', {
+ identifier: {
+ value: '738472983',
+ system: 'urn:oid:2.16.840.1.113883.2.4.6.3',
+ },
+ });
+ assert.isOk(resource);
+ });
+
+ /**
+ * Ways we might use the util
+ *
+ * signature: util.identifier(value, extras)
+ *
+ * // identifier without system (would use the adaptor default)
+ * util.identifer('abcd')
+ *
+ * // use util.value() to create system value pair, and add a usage
+ * util.identifer(util.value('abcd', 'urn:oid:1.2.36.146.595.217.0.1'), { use: 'usual' }) //
+ *
+ * // use value to create system value pair, and add a usage
+ * util.identifer('abcd', { system: 'urn:oid:1.2.36.146.595.217.0.1', use: 'usual' })
+ *
+ * // Pass value and system object, plus extras
+ * util.identifer({ value: 'abcd', system: 'urn:oid:1.2.36.146.595.217.0.1' }, { use: 'usual' })
+ *
+ * // everything in together
+ * util.identifer({ value: 'abcd', system: 'urn:oid:1.2.36.146.595.217.0.1', use: 'usual' })
+ */
+ it('should create a simple Patient with identifier and util', () => {
+ const resource = builders.patient('Patient', {
+ identifier: {
+ value: '738472983',
+ system: 'urn:oid:2.16.840.1.113883.2.4.6.3',
+ },
+ });
+ assert.isOk(resource);
+ });
+
+ it('should create an example patient', () => {
+ const resource = builders.patient('Patient', {});
+ assert.isOk(resource);
+ });
+});
diff --git a/packages/fhir-4/test/PaymentNotice.test.js b/packages/fhir-4/test/PaymentNotice.test.js
new file mode 100644
index 000000000..93e1ede52
--- /dev/null
+++ b/packages/fhir-4/test/PaymentNotice.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("PaymentNotice", () => {
+ it("should create a simple PaymentNotice", () => {
+ const resource = builders.paymentNotice("PaymentNotice", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/PaymentReconciliation.test.js b/packages/fhir-4/test/PaymentReconciliation.test.js
new file mode 100644
index 000000000..8c9828369
--- /dev/null
+++ b/packages/fhir-4/test/PaymentReconciliation.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("PaymentReconciliation", () => {
+ it("should create a simple PaymentReconciliation", () => {
+ const resource = builders.paymentReconciliation("PaymentReconciliation", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Person.test.js b/packages/fhir-4/test/Person.test.js
new file mode 100644
index 000000000..db83a8ee1
--- /dev/null
+++ b/packages/fhir-4/test/Person.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Person", () => {
+ it("should create a simple Person", () => {
+ const resource = builders.person("Person", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/PlanDefinition.test.js b/packages/fhir-4/test/PlanDefinition.test.js
new file mode 100644
index 000000000..9d91dbd31
--- /dev/null
+++ b/packages/fhir-4/test/PlanDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("PlanDefinition", () => {
+ it("should create a simple PlanDefinition", () => {
+ const resource = builders.planDefinition("PlanDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Practitioner.test.js b/packages/fhir-4/test/Practitioner.test.js
new file mode 100644
index 000000000..7105ff853
--- /dev/null
+++ b/packages/fhir-4/test/Practitioner.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Practitioner", () => {
+ it("should create a simple Practitioner", () => {
+ const resource = builders.practitioner("Practitioner", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/PractitionerRole.test.js b/packages/fhir-4/test/PractitionerRole.test.js
new file mode 100644
index 000000000..5073224ae
--- /dev/null
+++ b/packages/fhir-4/test/PractitionerRole.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("PractitionerRole", () => {
+ it("should create a simple PractitionerRole", () => {
+ const resource = builders.practitionerRole("PractitionerRole", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Procedure.test.js b/packages/fhir-4/test/Procedure.test.js
new file mode 100644
index 000000000..1c918adc6
--- /dev/null
+++ b/packages/fhir-4/test/Procedure.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Procedure", () => {
+ it("should create a simple Procedure", () => {
+ const resource = builders.procedure("Procedure", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Provenance.test.js b/packages/fhir-4/test/Provenance.test.js
new file mode 100644
index 000000000..527906bec
--- /dev/null
+++ b/packages/fhir-4/test/Provenance.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Provenance", () => {
+ it("should create a simple Provenance", () => {
+ const resource = builders.provenance("Provenance", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Questionnaire.test.js b/packages/fhir-4/test/Questionnaire.test.js
new file mode 100644
index 000000000..afadf912f
--- /dev/null
+++ b/packages/fhir-4/test/Questionnaire.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Questionnaire", () => {
+ it("should create a simple Questionnaire", () => {
+ const resource = builders.questionnaire("Questionnaire", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/QuestionnaireResponse.test.js b/packages/fhir-4/test/QuestionnaireResponse.test.js
new file mode 100644
index 000000000..487a0b3ce
--- /dev/null
+++ b/packages/fhir-4/test/QuestionnaireResponse.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("QuestionnaireResponse", () => {
+ it("should create a simple QuestionnaireResponse", () => {
+ const resource = builders.questionnaireResponse("QuestionnaireResponse", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/RegulatedAuthorization.test.js b/packages/fhir-4/test/RegulatedAuthorization.test.js
new file mode 100644
index 000000000..3d38812cc
--- /dev/null
+++ b/packages/fhir-4/test/RegulatedAuthorization.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("RegulatedAuthorization", () => {
+ it("should create a simple RegulatedAuthorization", () => {
+ const resource = builders.regulatedAuthorization("RegulatedAuthorization", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/RelatedPerson.test.js b/packages/fhir-4/test/RelatedPerson.test.js
new file mode 100644
index 000000000..99ce7dc0c
--- /dev/null
+++ b/packages/fhir-4/test/RelatedPerson.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("RelatedPerson", () => {
+ it("should create a simple RelatedPerson", () => {
+ const resource = builders.relatedPerson("RelatedPerson", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/RequestGroup.test.js b/packages/fhir-4/test/RequestGroup.test.js
new file mode 100644
index 000000000..9fdc9d444
--- /dev/null
+++ b/packages/fhir-4/test/RequestGroup.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("RequestGroup", () => {
+ it("should create a simple RequestGroup", () => {
+ const resource = builders.requestGroup("RequestGroup", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ResearchDefinition.test.js b/packages/fhir-4/test/ResearchDefinition.test.js
new file mode 100644
index 000000000..a92051fd1
--- /dev/null
+++ b/packages/fhir-4/test/ResearchDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ResearchDefinition", () => {
+ it("should create a simple ResearchDefinition", () => {
+ const resource = builders.researchDefinition("ResearchDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ResearchElementDefinition.test.js b/packages/fhir-4/test/ResearchElementDefinition.test.js
new file mode 100644
index 000000000..f8023cfbc
--- /dev/null
+++ b/packages/fhir-4/test/ResearchElementDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ResearchElementDefinition", () => {
+ it("should create a simple ResearchElementDefinition", () => {
+ const resource = builders.researchElementDefinition("ResearchElementDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ResearchStudy.test.js b/packages/fhir-4/test/ResearchStudy.test.js
new file mode 100644
index 000000000..f6406e69c
--- /dev/null
+++ b/packages/fhir-4/test/ResearchStudy.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ResearchStudy", () => {
+ it("should create a simple ResearchStudy", () => {
+ const resource = builders.researchStudy("ResearchStudy", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ResearchSubject.test.js b/packages/fhir-4/test/ResearchSubject.test.js
new file mode 100644
index 000000000..ff48b52e7
--- /dev/null
+++ b/packages/fhir-4/test/ResearchSubject.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ResearchSubject", () => {
+ it("should create a simple ResearchSubject", () => {
+ const resource = builders.researchSubject("ResearchSubject", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Resource.test.js b/packages/fhir-4/test/Resource.test.js
new file mode 100644
index 000000000..7ca529d3c
--- /dev/null
+++ b/packages/fhir-4/test/Resource.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Resource", () => {
+ it("should create a simple Resource", () => {
+ const resource = builders.resource("Resource", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/RiskAssessment.test.js b/packages/fhir-4/test/RiskAssessment.test.js
new file mode 100644
index 000000000..6e70d46fe
--- /dev/null
+++ b/packages/fhir-4/test/RiskAssessment.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("RiskAssessment", () => {
+ it("should create a simple RiskAssessment", () => {
+ const resource = builders.riskAssessment("RiskAssessment", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Schedule.test.js b/packages/fhir-4/test/Schedule.test.js
new file mode 100644
index 000000000..2f32d4538
--- /dev/null
+++ b/packages/fhir-4/test/Schedule.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Schedule", () => {
+ it("should create a simple Schedule", () => {
+ const resource = builders.schedule("Schedule", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/SearchParameter.test.js b/packages/fhir-4/test/SearchParameter.test.js
new file mode 100644
index 000000000..0ed6087f4
--- /dev/null
+++ b/packages/fhir-4/test/SearchParameter.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("SearchParameter", () => {
+ it("should create a simple SearchParameter", () => {
+ const resource = builders.searchParameter("SearchParameter", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ServiceRequest.test.js b/packages/fhir-4/test/ServiceRequest.test.js
new file mode 100644
index 000000000..db8ea7175
--- /dev/null
+++ b/packages/fhir-4/test/ServiceRequest.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ServiceRequest", () => {
+ it("should create a simple ServiceRequest", () => {
+ const resource = builders.serviceRequest("ServiceRequest", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Slot.test.js b/packages/fhir-4/test/Slot.test.js
new file mode 100644
index 000000000..4e67a9048
--- /dev/null
+++ b/packages/fhir-4/test/Slot.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Slot", () => {
+ it("should create a simple Slot", () => {
+ const resource = builders.slot("Slot", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Specimen.test.js b/packages/fhir-4/test/Specimen.test.js
new file mode 100644
index 000000000..f1557a278
--- /dev/null
+++ b/packages/fhir-4/test/Specimen.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Specimen", () => {
+ it("should create a simple Specimen", () => {
+ const resource = builders.specimen("Specimen", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/SpecimenDefinition.test.js b/packages/fhir-4/test/SpecimenDefinition.test.js
new file mode 100644
index 000000000..ca356fb83
--- /dev/null
+++ b/packages/fhir-4/test/SpecimenDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("SpecimenDefinition", () => {
+ it("should create a simple SpecimenDefinition", () => {
+ const resource = builders.specimenDefinition("SpecimenDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/StructureDefinition.test.js b/packages/fhir-4/test/StructureDefinition.test.js
new file mode 100644
index 000000000..72726119b
--- /dev/null
+++ b/packages/fhir-4/test/StructureDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("StructureDefinition", () => {
+ it("should create a simple StructureDefinition", () => {
+ const resource = builders.structureDefinition("StructureDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/StructureMap.test.js b/packages/fhir-4/test/StructureMap.test.js
new file mode 100644
index 000000000..d2e7a6009
--- /dev/null
+++ b/packages/fhir-4/test/StructureMap.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("StructureMap", () => {
+ it("should create a simple StructureMap", () => {
+ const resource = builders.structureMap("StructureMap", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Subscription.test.js b/packages/fhir-4/test/Subscription.test.js
new file mode 100644
index 000000000..982c6cae8
--- /dev/null
+++ b/packages/fhir-4/test/Subscription.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Subscription", () => {
+ it("should create a simple Subscription", () => {
+ const resource = builders.subscription("Subscription", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/SubscriptionStatus.test.js b/packages/fhir-4/test/SubscriptionStatus.test.js
new file mode 100644
index 000000000..1de9b4e03
--- /dev/null
+++ b/packages/fhir-4/test/SubscriptionStatus.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("SubscriptionStatus", () => {
+ it("should create a simple SubscriptionStatus", () => {
+ const resource = builders.subscriptionStatus("SubscriptionStatus", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/SubscriptionTopic.test.js b/packages/fhir-4/test/SubscriptionTopic.test.js
new file mode 100644
index 000000000..4ce63e65a
--- /dev/null
+++ b/packages/fhir-4/test/SubscriptionTopic.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("SubscriptionTopic", () => {
+ it("should create a simple SubscriptionTopic", () => {
+ const resource = builders.subscriptionTopic("SubscriptionTopic", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Substance.test.js b/packages/fhir-4/test/Substance.test.js
new file mode 100644
index 000000000..dc2c5f37f
--- /dev/null
+++ b/packages/fhir-4/test/Substance.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Substance", () => {
+ it("should create a simple Substance", () => {
+ const resource = builders.substance("Substance", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/SubstanceDefinition.test.js b/packages/fhir-4/test/SubstanceDefinition.test.js
new file mode 100644
index 000000000..b00f8eb36
--- /dev/null
+++ b/packages/fhir-4/test/SubstanceDefinition.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("SubstanceDefinition", () => {
+ it("should create a simple SubstanceDefinition", () => {
+ const resource = builders.substanceDefinition("SubstanceDefinition", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/SupplyDelivery.test.js b/packages/fhir-4/test/SupplyDelivery.test.js
new file mode 100644
index 000000000..baca46ac2
--- /dev/null
+++ b/packages/fhir-4/test/SupplyDelivery.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("SupplyDelivery", () => {
+ it("should create a simple SupplyDelivery", () => {
+ const resource = builders.supplyDelivery("SupplyDelivery", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/SupplyRequest.test.js b/packages/fhir-4/test/SupplyRequest.test.js
new file mode 100644
index 000000000..ddbf715ec
--- /dev/null
+++ b/packages/fhir-4/test/SupplyRequest.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("SupplyRequest", () => {
+ it("should create a simple SupplyRequest", () => {
+ const resource = builders.supplyRequest("SupplyRequest", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/Task.test.js b/packages/fhir-4/test/Task.test.js
new file mode 100644
index 000000000..692a09b2b
--- /dev/null
+++ b/packages/fhir-4/test/Task.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("Task", () => {
+ it("should create a simple Task", () => {
+ const resource = builders.task("Task", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/TerminologyCapabilities.test.js b/packages/fhir-4/test/TerminologyCapabilities.test.js
new file mode 100644
index 000000000..9579f5542
--- /dev/null
+++ b/packages/fhir-4/test/TerminologyCapabilities.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("TerminologyCapabilities", () => {
+ it("should create a simple TerminologyCapabilities", () => {
+ const resource = builders.terminologyCapabilities("TerminologyCapabilities", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/TestReport.test.js b/packages/fhir-4/test/TestReport.test.js
new file mode 100644
index 000000000..a553456cf
--- /dev/null
+++ b/packages/fhir-4/test/TestReport.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("TestReport", () => {
+ it("should create a simple TestReport", () => {
+ const resource = builders.testReport("TestReport", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/TestScript.test.js b/packages/fhir-4/test/TestScript.test.js
new file mode 100644
index 000000000..3f79e2855
--- /dev/null
+++ b/packages/fhir-4/test/TestScript.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("TestScript", () => {
+ it("should create a simple TestScript", () => {
+ const resource = builders.testScript("TestScript", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/ValueSet.test.js b/packages/fhir-4/test/ValueSet.test.js
new file mode 100644
index 000000000..57988429a
--- /dev/null
+++ b/packages/fhir-4/test/ValueSet.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("ValueSet", () => {
+ it("should create a simple ValueSet", () => {
+ const resource = builders.valueSet("ValueSet", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/VerificationResult.test.js b/packages/fhir-4/test/VerificationResult.test.js
new file mode 100644
index 000000000..8bb3119c4
--- /dev/null
+++ b/packages/fhir-4/test/VerificationResult.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("VerificationResult", () => {
+ it("should create a simple VerificationResult", () => {
+ const resource = builders.verificationResult("VerificationResult", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/VisionPrescription.test.js b/packages/fhir-4/test/VisionPrescription.test.js
new file mode 100644
index 000000000..42e26b1ff
--- /dev/null
+++ b/packages/fhir-4/test/VisionPrescription.test.js
@@ -0,0 +1,9 @@
+import { expect, assert } from "chai";
+import * as builders from "../src/builders.js";
+
+describe("VisionPrescription", () => {
+ it("should create a simple VisionPrescription", () => {
+ const resource = builders.visionPrescription("VisionPrescription", {});
+ assert.isOk(resource);
+ });
+});
\ No newline at end of file
diff --git a/packages/fhir-4/test/utils.test.js b/packages/fhir-4/test/utils.test.js
new file mode 100644
index 000000000..ae7d4b28f
--- /dev/null
+++ b/packages/fhir-4/test/utils.test.js
@@ -0,0 +1,68 @@
+import { expect, assert } from 'chai';
+import * as util from '../src/utils.js';
+
+describe('identifier', () => {
+ afterEach(() => {
+ util.setSystemMap({});
+ });
+
+ it('should map an identifier from a string', () => {
+ const result = util.identifier('abc');
+
+ expect(result).to.eql({ value: 'abc' });
+ });
+
+ it('should map an identifier with a value key', () => {
+ const result = util.identifier({ value: 'abc' });
+
+ expect(result).to.eql({ value: 'abc' });
+ });
+
+ it('should map an identifier with a value/system pair', () => {
+ const result = util.identifier({ value: 'abc', system: 'xyz' });
+ expect(result).to.eql({ value: 'abc', system: 'xyz' });
+ });
+
+ it('should map an identifier with a mapped system', () => {
+ util.setSystemMap({
+ default: 'xyz',
+ });
+ const result = util.identifier({ value: 'abc', system: 'default' });
+ expect(result).to.eql({ value: 'abc', system: 'xyz' });
+ });
+
+ it('should be compatible with util.value', () => {
+ const result = util.identifier(util.value('abc', 'xyz'));
+
+ expect(result).to.eql({ value: 'abc', system: 'xyz' });
+ });
+
+ it('should apply extra args to a string', () => {
+ const result = util.identifier('abc', { use: 'usual' });
+
+ expect(result).to.eql({ value: 'abc', use: 'usual' });
+ });
+
+ it('should apply extra args to an object', () => {
+ const result = util.identifier({ value: 'abc' }, { use: 'usual' });
+
+ expect(result).to.eql({ value: 'abc', use: 'usual' });
+ });
+
+ it('should prefer extra keys to value keys', () => {
+ const result = util.identifier(
+ { value: 'abc' },
+ { value: 'def', use: 'usual' }
+ );
+
+ expect(result).to.eql({ value: 'def', use: 'usual' });
+ });
+
+ it('should allow arbitrary keys on a value object', () => {
+ const result = util.identifier({ value: 'abc', use: 'usual' });
+
+ expect(result).to.eql({ value: 'abc', use: 'usual' });
+ });
+
+ //it('should map an identifier from a string with a default system', () => {});
+});
diff --git a/packages/fhir-4/types/builders.d.ts b/packages/fhir-4/types/builders.d.ts
new file mode 100644
index 000000000..833f5ead2
--- /dev/null
+++ b/packages/fhir-4/types/builders.d.ts
@@ -0,0 +1,23575 @@
+
+// THIS FILE WAS AUTO-GENERATED
+// DO NOT MAKE CHANGES MANUALLY OR THEY WILL BE LOST
+// SEE THE README FILE FOR DETAILS
+
+import "./globals";
+
+type Account_Account_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Account number
+ * */
+ identifier: Identifier;
+ /**
+ * active | inactive | entered-in-error | on-hold | unknown
+ * */
+ status: string;
+ /**
+ * E.g. patient, expense, depreciation
+ * */
+ type: CodeableConcept;
+ /**
+ * Human-readable label
+ * */
+ name: string;
+ /**
+ * The entity that caused the expenses
+ * */
+ subject: Reference;
+ /**
+ * Transaction window
+ * */
+ servicePeriod: Period;
+ /**
+ * The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account
+ * */
+ coverage: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The party(s), such as insurances, that may contribute to the payment of this account
+ * */
+ coverage: Reference;
+ /**
+ * The priority of the coverage in the context of this account
+ * */
+ priority: number;
+ };
+ /**
+ * Entity managing the Account
+ * */
+ owner: Reference;
+ /**
+ * Explanation of purpose/use
+ * */
+ description: string;
+ /**
+ * The parties ultimately responsible for balancing the Account
+ * */
+ guarantor: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Responsible entity
+ * */
+ party: Reference;
+ /**
+ * Credit or other hold applied
+ * */
+ onHold: boolean;
+ /**
+ * Guarantee account during
+ * */
+ period: Period;
+ };
+ /**
+ * Reference to a parent Account
+ * */
+ partOf: Reference;
+};
+
+type Account__lookups = {
+ "Account": Account_Account_Props;
+};
+
+export declare function account(type: T, props: Account__lookups[T]);;
+
+type ActivityDefinition_ActivityDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this activity definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the activity definition
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the activity definition
+ * */
+ version: string;
+ /**
+ * Name for this activity definition (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this activity definition (human friendly)
+ * */
+ title: string;
+ /**
+ * Subordinate title of the activity definition
+ * */
+ subtitle: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Type of individual the activity definition is intended for
+ * */
+ subject: CodeableConcept;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the activity definition
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for activity definition (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this activity definition is defined
+ * */
+ purpose: markdown;
+ /**
+ * Describes the clinical usage of the activity definition
+ * */
+ usage: string;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * When the activity definition was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the activity definition was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * When the activity definition is expected to be used
+ * */
+ effectivePeriod: Period;
+ /**
+ * E.g. Education, Treatment, Assessment, etc.
+ * */
+ topic: CodeableConcept;
+ /**
+ * Who authored the content
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the content
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the content
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the content
+ * */
+ endorser: ContactDetail;
+ /**
+ * Additional documentation, citations, etc.
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * Logic used by the activity definition
+ * */
+ library: any;
+ /**
+ * Kind of resource
+ * */
+ kind: string;
+ /**
+ * What profile the resource needs to conform to
+ * */
+ profile: any;
+ /**
+ * Detail type of activity
+ * */
+ code: CodeableConcept;
+ /**
+ * proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
+ * */
+ intent: string;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * True if the activity should not be performed
+ * */
+ doNotPerform: boolean;
+ /**
+ * When activity is to occur
+ * */
+ timing: Timing;
+ /**
+ * Where it should happen
+ * */
+ location: Reference;
+ /**
+ * Who should participate in the action
+ * */
+ participant: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * patient | practitioner | related-person | device
+ * */
+ type: string;
+ /**
+ * E.g. Nurse, Surgeon, Parent, etc.
+ * */
+ role: CodeableConcept;
+ };
+ /**
+ * What's administered/supplied
+ * */
+ product: Reference;
+ /**
+ * How much is administered/consumed/supplied
+ * */
+ quantity: Quantity;
+ /**
+ * Detailed dosage instructions
+ * */
+ dosage: Dosage;
+ /**
+ * What part of body to perform on
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * What specimens are required to perform this action
+ * */
+ specimenRequirement: Reference;
+ /**
+ * What observations are required to perform this action
+ * */
+ observationRequirement: Reference;
+ /**
+ * What observations must be produced by this action
+ * */
+ observationResultRequirement: Reference;
+ /**
+ * Transform to apply the template
+ * */
+ transform: any;
+ /**
+ * Dynamic aspects of the definition
+ * */
+ dynamicValue: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The path to the element to be set dynamically
+ * */
+ path: string;
+ /**
+ * An expression that provides the dynamic value for the customization
+ * */
+ expression: Expression;
+ };
+};
+
+type ActivityDefinition__lookups = {
+ "ActivityDefinition": ActivityDefinition_ActivityDefinition_Props;
+};
+
+export declare function activityDefinition(type: T, props: ActivityDefinition__lookups[T]);;
+
+type AdministrableProductDefinition_AdministrableProductDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * An identifier for the administrable product
+ * */
+ identifier: Identifier;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * References a product from which one or more of the constituent parts of that product can be prepared and used as described by this administrable product
+ * */
+ formOf: Reference;
+ /**
+ * The dose form of the final product after necessary reconstitution or processing
+ * */
+ administrableDoseForm: CodeableConcept;
+ /**
+ * The presentation type in which this item is given to a patient. e.g. for a spray - 'puff'
+ * */
+ unitOfPresentation: CodeableConcept;
+ /**
+ * Indicates the specific manufactured items that are part of the 'formOf' product that are used in the preparation of this specific administrable form
+ * */
+ producedFrom: Reference;
+ /**
+ * The ingredients of this administrable medicinal product. This is only needed if the ingredients are not specified either using ManufacturedItemDefiniton, or using by incoming references from the Ingredient resource
+ * */
+ ingredient: CodeableConcept;
+ /**
+ * A device that is integral to the medicinal product, in effect being considered as an "ingredient" of the medicinal product
+ * */
+ device: Reference;
+ /**
+ * Characteristics e.g. a product's onset of action
+ * */
+ property: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A code expressing the type of characteristic
+ * */
+ type: CodeableConcept;
+ /**
+ * A value for the characteristic
+ * */
+ value: CodeableConcept;
+ /**
+ * The status of characteristic e.g. assigned or pending
+ * */
+ status: CodeableConcept;
+ };
+ /**
+ * The path by which the product is taken into or makes contact with the body
+ * */
+ routeOfAdministration: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Coded expression for the route
+ * */
+ code: CodeableConcept;
+ /**
+ * The first dose (dose quantity) administered can be specified for the product
+ * */
+ firstDose: Quantity;
+ /**
+ * The maximum single dose that can be administered
+ * */
+ maxSingleDose: Quantity;
+ /**
+ * The maximum dose quantity to be administered in any one 24-h period
+ * */
+ maxDosePerDay: Quantity;
+ /**
+ * The maximum dose per treatment period that can be administered
+ * */
+ maxDosePerTreatmentPeriod: Ratio;
+ /**
+ * The maximum treatment period during which the product can be administered
+ * */
+ maxTreatmentPeriod: Duration;
+ /**
+ * Extra information about the withdrawal period
+ * */
+ targetSpecies: string;
+ };
+};
+
+type AdministrableProductDefinition__lookups = {
+ "AdministrableProductDefinition": AdministrableProductDefinition_AdministrableProductDefinition_Props;
+};
+
+export declare function administrableProductDefinition(type: T, props: AdministrableProductDefinition__lookups[T]);;
+
+type AdverseEvent_AdverseEvent_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier for the event
+ * */
+ identifier: Identifier;
+ /**
+ * actual | potential
+ * */
+ actuality: string;
+ /**
+ * product-problem | product-quality | product-use-error | wrong-dose | incorrect-prescribing-information | wrong-technique | wrong-route-of-administration | wrong-rate | wrong-duration | wrong-time | expired-drug | medical-device-use-error | problem-different-manufacturer | unsafe-physical-environment
+ * */
+ category: CodeableConcept;
+ /**
+ * Type of the event itself in relation to the subject
+ * */
+ event: CodeableConcept;
+ /**
+ * Subject impacted by event
+ * */
+ subject: Reference;
+ /**
+ * Encounter created as part of
+ * */
+ encounter: Reference;
+ /**
+ * When the event occurred
+ * */
+ date: string;
+ /**
+ * When the event was detected
+ * */
+ detected: string;
+ /**
+ * When the event was recorded
+ * */
+ recordedDate: string;
+ /**
+ * Effect on the subject due to this event
+ * */
+ resultingCondition: Reference;
+ /**
+ * Location where adverse event occurred
+ * */
+ location: Reference;
+ /**
+ * Seriousness of the event
+ * */
+ seriousness: CodeableConcept;
+ /**
+ * mild | moderate | severe
+ * */
+ severity: CodeableConcept;
+ /**
+ * resolved | recovering | ongoing | resolvedWithSequelae | fatal | unknown
+ * */
+ outcome: CodeableConcept;
+ /**
+ * Who recorded the adverse event
+ * */
+ recorder: Reference;
+ /**
+ * Who was involved in the adverse event or the potential adverse event
+ * */
+ contributor: Reference;
+ /**
+ * The suspected agent causing the adverse event
+ * */
+ suspectEntity: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Refers to the specific entity that caused the adverse event
+ * */
+ instance: Reference;
+ /**
+ * ProbabilityScale | Bayesian | Checklist
+ * */
+ causality: CodeableConcept;
+ };
+ /**
+ * AdverseEvent.subjectMedicalHistory
+ * */
+ subjectMedicalHistory: Reference;
+ /**
+ * AdverseEvent.referenceDocument
+ * */
+ referenceDocument: Reference;
+ /**
+ * AdverseEvent.study
+ * */
+ study: Reference;
+};
+
+type AdverseEvent__lookups = {
+ "AdverseEvent": AdverseEvent_AdverseEvent_Props;
+};
+
+export declare function adverseEvent(type: T, props: AdverseEvent__lookups[T]);;
+
+type AllergyIntolerance_AllergyIntolerance_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External ids for this item
+ * */
+ identifier: Identifier;
+ /**
+ * active | inactive | resolved
+ * */
+ clinicalStatus: CodeableConcept;
+ /**
+ * unconfirmed | confirmed | refuted | entered-in-error
+ * */
+ verificationStatus: CodeableConcept;
+ /**
+ * allergy | intolerance - Underlying mechanism (if known)
+ * */
+ type: string;
+ /**
+ * food | medication | environment | biologic
+ * */
+ category: string;
+ /**
+ * low | high | unable-to-assess
+ * */
+ criticality: string;
+ /**
+ * Code that identifies the allergy or intolerance
+ * */
+ code: CodeableConcept;
+ /**
+ * Who the sensitivity is for
+ * */
+ patient: Reference;
+ /**
+ * Encounter when the allergy or intolerance was asserted
+ * */
+ encounter: Reference;
+ /**
+ * When allergy or intolerance was identified
+ * */
+ onset: string;
+ /**
+ * Date first version of the resource instance was recorded
+ * */
+ recordedDate: string;
+ /**
+ * Who recorded the sensitivity
+ * */
+ recorder: Reference;
+ /**
+ * Source of the information about the allergy
+ * */
+ asserter: Reference;
+ /**
+ * Date(/time) of last known occurrence of a reaction
+ * */
+ lastOccurrence: string;
+ /**
+ * Additional text not captured in other fields
+ * */
+ note: Annotation;
+ /**
+ * Adverse Reaction Events linked to exposure to substance
+ * */
+ reaction: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Specific substance or pharmaceutical product considered to be responsible for event
+ * */
+ substance: CodeableConcept;
+ /**
+ * Clinical symptoms/signs associated with the Event
+ * */
+ manifestation: CodeableConcept;
+ /**
+ * Description of the event as a whole
+ * */
+ description: string;
+ /**
+ * Date(/time) when manifestations showed
+ * */
+ onset: string;
+ /**
+ * mild | moderate | severe (of event as a whole)
+ * */
+ severity: string;
+ /**
+ * How the subject was exposed to the substance
+ * */
+ exposureRoute: CodeableConcept;
+ /**
+ * Text about event not captured in other fields
+ * */
+ note: Annotation;
+ };
+};
+
+type AllergyIntolerance__lookups = {
+ "AllergyIntolerance": AllergyIntolerance_AllergyIntolerance_Props;
+};
+
+export declare function allergyIntolerance(type: T, props: AllergyIntolerance__lookups[T]);;
+
+type Appointment_Appointment_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Ids for this item
+ * */
+ identifier: Identifier;
+ /**
+ * proposed | pending | booked | arrived | fulfilled | cancelled | noshow | entered-in-error | checked-in | waitlist
+ * */
+ status: string;
+ /**
+ * The coded reason for the appointment being cancelled
+ * */
+ cancelationReason: CodeableConcept;
+ /**
+ * A broad categorization of the service that is to be performed during this appointment
+ * */
+ serviceCategory: CodeableConcept;
+ /**
+ * The specific service that is to be performed during this appointment
+ * */
+ serviceType: CodeableConcept;
+ /**
+ * The specialty of a practitioner that would be required to perform the service requested in this appointment
+ * */
+ specialty: CodeableConcept;
+ /**
+ * The style of appointment or patient that has been booked in the slot (not service type)
+ * */
+ appointmentType: CodeableConcept;
+ /**
+ * Coded reason this appointment is scheduled
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Reason the appointment is to take place (resource)
+ * */
+ reasonReference: Reference;
+ /**
+ * Used to make informed decisions if needing to re-prioritize
+ * */
+ priority: number;
+ /**
+ * Shown on a subject line in a meeting request, or appointment list
+ * */
+ description: string;
+ /**
+ * Additional information to support the appointment
+ * */
+ supportingInformation: Reference;
+ /**
+ * When appointment is to take place
+ * */
+ start: string;
+ /**
+ * When appointment is to conclude
+ * */
+ end: string;
+ /**
+ * Can be less than start/end (e.g. estimate)
+ * */
+ minutesDuration: number;
+ /**
+ * The slots that this appointment is filling
+ * */
+ slot: Reference;
+ /**
+ * The date that this appointment was initially created
+ * */
+ created: string;
+ /**
+ * Additional comments
+ * */
+ comment: string;
+ /**
+ * Detailed information and instructions for the patient
+ * */
+ patientInstruction: string;
+ /**
+ * The service request this appointment is allocated to assess
+ * */
+ basedOn: Reference;
+ /**
+ * Participants involved in appointment
+ * */
+ participant: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Role of participant in the appointment
+ * */
+ type: CodeableConcept;
+ /**
+ * Person, Location/HealthcareService or Device
+ * */
+ actor: Reference;
+ /**
+ * required | optional | information-only
+ * */
+ required: string;
+ /**
+ * accepted | declined | tentative | needs-action
+ * */
+ status: string;
+ /**
+ * Participation period of the actor
+ * */
+ period: Period;
+ };
+ /**
+ * Potential date/time interval(s) requested to allocate the appointment within
+ * */
+ requestedPeriod: Period;
+};
+
+type Appointment__lookups = {
+ "Appointment": Appointment_Appointment_Props;
+};
+
+export declare function appointment(type: T, props: Appointment__lookups[T]);;
+
+type AppointmentResponse_AppointmentResponse_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Ids for this item
+ * */
+ identifier: Identifier;
+ /**
+ * Appointment this response relates to
+ * */
+ appointment: Reference;
+ /**
+ * Time from appointment, or requested new start time
+ * */
+ start: string;
+ /**
+ * Time from appointment, or requested new end time
+ * */
+ end: string;
+ /**
+ * Role of participant in the appointment
+ * */
+ participantType: CodeableConcept;
+ /**
+ * Person, Location, HealthcareService, or Device
+ * */
+ actor: Reference;
+ /**
+ * accepted | declined | tentative | needs-action
+ * */
+ participantStatus: string;
+ /**
+ * Additional comments
+ * */
+ comment: string;
+};
+
+type AppointmentResponse__lookups = {
+ "AppointmentResponse": AppointmentResponse_AppointmentResponse_Props;
+};
+
+export declare function appointmentResponse(type: T, props: AppointmentResponse__lookups[T]);;
+
+type AuditEvent_AuditEvent_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type/identifier of event
+ * */
+ type: Coding;
+ /**
+ * More specific type/id for the event
+ * */
+ subtype: Coding;
+ /**
+ * Type of action performed during the event
+ * */
+ action: string;
+ /**
+ * When the activity occurred
+ * */
+ period: Period;
+ /**
+ * Time when the event was recorded
+ * */
+ recorded: string;
+ /**
+ * Whether the event succeeded or failed
+ * */
+ outcome: string;
+ /**
+ * Description of the event outcome
+ * */
+ outcomeDesc: string;
+ /**
+ * The purposeOfUse of the event
+ * */
+ purposeOfEvent: CodeableConcept;
+ /**
+ * Actor involved in the event
+ * */
+ agent: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * How agent participated
+ * */
+ type: CodeableConcept;
+ /**
+ * Agent role in the event
+ * */
+ role: CodeableConcept;
+ /**
+ * Identifier of who
+ * */
+ who: Reference;
+ /**
+ * Alternative User identity
+ * */
+ altId: string;
+ /**
+ * Human friendly name for the agent
+ * */
+ name: string;
+ /**
+ * Whether user is initiator
+ * */
+ requestor: boolean;
+ /**
+ * Where
+ * */
+ location: Reference;
+ /**
+ * Policy that authorized event
+ * */
+ policy: string;
+ /**
+ * Type of media
+ * */
+ media: Coding;
+ /**
+ * The type of network access point
+ * */
+ network: string;
+ /**
+ * Reason given for this user
+ * */
+ purposeOfUse: CodeableConcept;
+ };
+ /**
+ * Audit Event Reporter
+ * */
+ source: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Logical source location within the enterprise
+ * */
+ site: string;
+ /**
+ * The identity of source detecting the event
+ * */
+ observer: Reference;
+ /**
+ * The type of source where event originated
+ * */
+ type: Coding;
+ };
+ /**
+ * Data or objects used
+ * */
+ entity: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Specific instance of resource
+ * */
+ what: Reference;
+ /**
+ * Type of entity involved
+ * */
+ type: Coding;
+ /**
+ * What role the entity played
+ * */
+ role: Coding;
+ /**
+ * Life-cycle stage for the entity
+ * */
+ lifecycle: Coding;
+ /**
+ * Security labels on the entity
+ * */
+ securityLabel: Coding;
+ /**
+ * Descriptor for entity
+ * */
+ name: string;
+ /**
+ * Descriptive text
+ * */
+ description: string;
+ /**
+ * Query parameters
+ * */
+ query: base64Binary;
+ /**
+ * Property value
+ * */
+ detail: string;
+ };
+};
+
+type AuditEvent__lookups = {
+ "AuditEvent": AuditEvent_AuditEvent_Props;
+};
+
+export declare function auditEvent(type: T, props: AuditEvent__lookups[T]);;
+
+type Basic_Basic_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Kind of Resource
+ * */
+ code: CodeableConcept;
+ /**
+ * Identifies the focus of this resource
+ * */
+ subject: Reference;
+ /**
+ * When created
+ * */
+ created: string;
+ /**
+ * Who created
+ * */
+ author: Reference;
+};
+
+type Basic__lookups = {
+ "Basic": Basic_Basic_Props;
+};
+
+export declare function basic(type: T, props: Basic__lookups[T]);;
+
+type Binary_Binary_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * MimeType of the binary content
+ * */
+ contentType: string;
+ /**
+ * Identifies another resource to use as proxy when enforcing access control
+ * */
+ securityContext: Reference;
+ /**
+ * The actual content
+ * */
+ data: base64Binary;
+};
+
+type Binary__lookups = {
+ "Binary": Binary_Binary_Props;
+};
+
+export declare function binary(type: T, props: Binary__lookups[T]);;
+
+type BiologicallyDerivedProduct_BiologicallyDerivedProduct_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External ids for this item
+ * */
+ identifier: Identifier;
+ /**
+ * organ | tissue | fluid | cells | biologicalAgent
+ * */
+ productCategory: string;
+ /**
+ * What this biologically derived product is
+ * */
+ productCode: CodeableConcept;
+ /**
+ * available | unavailable
+ * */
+ status: string;
+ /**
+ * Procedure request
+ * */
+ request: Reference;
+ /**
+ * The amount of this biologically derived product
+ * */
+ quantity: number;
+ /**
+ * BiologicallyDerivedProduct parent
+ * */
+ parent: Reference;
+ /**
+ * How this product was collected
+ * */
+ collection: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Individual performing collection
+ * */
+ collector: Reference;
+ /**
+ * Who is product from
+ * */
+ source: Reference;
+ /**
+ * Time of product collection
+ * */
+ collected: string;
+ };
+ /**
+ * Any processing of the product during collection
+ * */
+ processing: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Description of of processing
+ * */
+ description: string;
+ /**
+ * Procesing code
+ * */
+ procedure: CodeableConcept;
+ /**
+ * Substance added during processing
+ * */
+ additive: Reference;
+ /**
+ * Time of processing
+ * */
+ time: string;
+ };
+ /**
+ * Any manipulation of product post-collection
+ * */
+ manipulation: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Description of manipulation
+ * */
+ description: string;
+ /**
+ * Time of manipulation
+ * */
+ time: string;
+ };
+ /**
+ * Product storage
+ * */
+ storage: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Description of storage
+ * */
+ description: string;
+ /**
+ * Storage temperature
+ * */
+ temperature: number;
+ /**
+ * farenheit | celsius | kelvin
+ * */
+ scale: string;
+ /**
+ * Storage timeperiod
+ * */
+ duration: Period;
+ };
+};
+
+type BiologicallyDerivedProduct__lookups = {
+ "BiologicallyDerivedProduct": BiologicallyDerivedProduct_BiologicallyDerivedProduct_Props;
+};
+
+export declare function biologicallyDerivedProduct(type: T, props: BiologicallyDerivedProduct__lookups[T]);;
+
+type BodyStructure_BodyStructure_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Bodystructure identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Whether this record is in active use
+ * */
+ active: boolean;
+ /**
+ * Kind of Structure
+ * */
+ morphology: CodeableConcept;
+ /**
+ * Body site
+ * */
+ location: CodeableConcept;
+ /**
+ * Body site modifier
+ * */
+ locationQualifier: CodeableConcept;
+ /**
+ * Text description
+ * */
+ description: string;
+ /**
+ * Attached images
+ * */
+ image: Attachment;
+ /**
+ * Who this is about
+ * */
+ patient: Reference;
+};
+
+type BodyStructure__lookups = {
+ "BodyStructure": BodyStructure_BodyStructure_Props;
+};
+
+export declare function bodyStructure(type: T, props: BodyStructure__lookups[T]);;
+
+type Bundle_Bundle_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Persistent identifier for the bundle
+ * */
+ identifier: Identifier;
+ /**
+ * document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
+ * */
+ type: string;
+ /**
+ * When the bundle was assembled
+ * */
+ timestamp: string;
+ /**
+ * If search, the total number of matches
+ * */
+ total: number;
+ /**
+ * Links related to this Bundle
+ * */
+ link: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * See http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1
+ * */
+ relation: string;
+ /**
+ * Reference details for the link
+ * */
+ url: string;
+ };
+ /**
+ * Entry in the bundle - will have a resource or information
+ * */
+ entry: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * URI for resource (Absolute URL server address or URI for UUID/OID)
+ * */
+ fullUrl: string;
+ /**
+ * A resource in the bundle
+ * */
+ resource: Resource;
+ /**
+ * Search ranking (between 0 and 1)
+ * */
+ search: number;
+ /**
+ * For conditional creates
+ * */
+ request: string;
+ /**
+ * OperationOutcome with hints and warnings (for batch/transaction)
+ * */
+ response: Resource;
+ };
+ /**
+ * Digital Signature
+ * */
+ signature: Signature;
+};
+
+type Bundle__lookups = {
+ "Bundle": Bundle_Bundle_Props;
+};
+
+export declare function bundle(type: T, props: Bundle__lookups[T]);;
+
+type CapabilityStatement_CapabilityStatement_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this capability statement, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Business version of the capability statement
+ * */
+ version: string;
+ /**
+ * Name for this capability statement (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this capability statement (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the capability statement
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for capability statement (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this capability statement is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * instance | capability | requirements
+ * */
+ kind: string;
+ /**
+ * Canonical URL of another capability statement this implements
+ * */
+ instantiates: any;
+ /**
+ * Canonical URL of another capability statement this adds to
+ * */
+ imports: any;
+ /**
+ * Software that is covered by this capability statement
+ * */
+ software: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A name the software is known by
+ * */
+ name: string;
+ /**
+ * Version covered by this statement
+ * */
+ version: string;
+ /**
+ * Date this version was released
+ * */
+ releaseDate: string;
+ };
+ /**
+ * If this describes a specific instance
+ * */
+ implementation: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Describes this specific instance
+ * */
+ description: string;
+ /**
+ * Base URL for the installation
+ * */
+ url: url;
+ /**
+ * Organization that manages the data
+ * */
+ custodian: Reference;
+ };
+ /**
+ * FHIR Version the system supports
+ * */
+ fhirVersion: string;
+ /**
+ * formats supported (xml | json | ttl | mime type)
+ * */
+ format: string;
+ /**
+ * Patch formats supported
+ * */
+ patchFormat: string;
+ /**
+ * Implementation guides supported
+ * */
+ implementationGuide: any;
+ /**
+ * If the endpoint is a RESTful one
+ * */
+ rest: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * client | server
+ * */
+ mode: string;
+ /**
+ * General description of implementation
+ * */
+ documentation: markdown;
+ /**
+ * General description of how security works
+ * */
+ security: markdown;
+ /**
+ * Specific details about operation behavior
+ * */
+ resource: markdown;
+ /**
+ * Anything special about operation behavior
+ * */
+ interaction: markdown;
+ /**
+ * Compartments served/used by system
+ * */
+ compartment: any;
+ };
+ /**
+ * If messaging is supported
+ * */
+ messaging: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Network address or identifier of the end-point
+ * */
+ endpoint: url;
+ /**
+ * Reliable Message Cache Length (min)
+ * */
+ reliableCache: number;
+ /**
+ * Messaging interface behavior details
+ * */
+ documentation: markdown;
+ /**
+ * Message supported by this system
+ * */
+ supportedMessage: any;
+ };
+ /**
+ * Document definition
+ * */
+ document: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * producer | consumer
+ * */
+ mode: string;
+ /**
+ * Description of document support
+ * */
+ documentation: markdown;
+ /**
+ * Constraint on the resources used in the document
+ * */
+ profile: any;
+ };
+};
+
+type CapabilityStatement__lookups = {
+ "CapabilityStatement": CapabilityStatement_CapabilityStatement_Props;
+};
+
+export declare function capabilityStatement(type: T, props: CapabilityStatement__lookups[T]);;
+
+type CarePlan_CarePlan_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Ids for this plan
+ * */
+ identifier: Identifier;
+ /**
+ * Instantiates FHIR protocol or definition
+ * */
+ instantiatesCanonical: any;
+ /**
+ * Instantiates external protocol or definition
+ * */
+ instantiatesUri: string;
+ /**
+ * Fulfills CarePlan
+ * */
+ basedOn: Reference;
+ /**
+ * CarePlan replaced by this CarePlan
+ * */
+ replaces: Reference;
+ /**
+ * Part of referenced CarePlan
+ * */
+ partOf: Reference;
+ /**
+ * draft | active | on-hold | revoked | completed | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * proposal | plan | order | option
+ * */
+ intent: string;
+ /**
+ * Type of plan
+ * */
+ category: CodeableConcept;
+ /**
+ * Human-friendly name for the care plan
+ * */
+ title: string;
+ /**
+ * Summary of nature of plan
+ * */
+ description: string;
+ /**
+ * Who the care plan is for
+ * */
+ subject: Reference;
+ /**
+ * Encounter created as part of
+ * */
+ encounter: Reference;
+ /**
+ * Time period plan covers
+ * */
+ period: Period;
+ /**
+ * Date record was first recorded
+ * */
+ created: string;
+ /**
+ * Who is the designated responsible party
+ * */
+ author: Reference;
+ /**
+ * Who provided the content of the care plan
+ * */
+ contributor: Reference;
+ /**
+ * Who's involved in plan?
+ * */
+ careTeam: Reference;
+ /**
+ * Health issues this plan addresses
+ * */
+ addresses: Reference;
+ /**
+ * Information considered as part of plan
+ * */
+ supportingInfo: Reference;
+ /**
+ * Desired outcome of plan
+ * */
+ goal: Reference;
+ /**
+ * Action to occur as part of plan
+ * */
+ activity: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Results of the activity
+ * */
+ outcomeCodeableConcept: CodeableConcept;
+ /**
+ * Appointment, Encounter, Procedure, etc.
+ * */
+ outcomeReference: Reference;
+ /**
+ * Comments about the activity status/progress
+ * */
+ progress: Annotation;
+ /**
+ * Activity details defined in specific resource
+ * */
+ reference: Reference;
+ /**
+ * Extra info describing activity to perform
+ * */
+ detail: string;
+ };
+ /**
+ * Comments about the plan
+ * */
+ note: Annotation;
+};
+
+type CarePlan__lookups = {
+ "CarePlan": CarePlan_CarePlan_Props;
+};
+
+export declare function carePlan(type: T, props: CarePlan__lookups[T]);;
+
+type CareTeam_CareTeam_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Ids for this team
+ * */
+ identifier: Identifier;
+ /**
+ * proposed | active | suspended | inactive | entered-in-error
+ * */
+ status: string;
+ /**
+ * Type of team
+ * */
+ category: CodeableConcept;
+ /**
+ * Name of the team, such as crisis assessment team
+ * */
+ name: string;
+ /**
+ * Who care team is for
+ * */
+ subject: Reference;
+ /**
+ * Encounter created as part of
+ * */
+ encounter: Reference;
+ /**
+ * Time period team covers
+ * */
+ period: Period;
+ /**
+ * Members of the team
+ * */
+ participant: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of involvement
+ * */
+ role: CodeableConcept;
+ /**
+ * Who is involved
+ * */
+ member: Reference;
+ /**
+ * Organization of the practitioner
+ * */
+ onBehalfOf: Reference;
+ /**
+ * Time period of participant
+ * */
+ period: Period;
+ };
+ /**
+ * Why the care team exists
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why the care team exists
+ * */
+ reasonReference: Reference;
+ /**
+ * Organization responsible for the care team
+ * */
+ managingOrganization: Reference;
+ /**
+ * A contact detail for the care team (that applies to all members)
+ * */
+ telecom: ContactPoint;
+ /**
+ * Comments made about the CareTeam
+ * */
+ note: Annotation;
+};
+
+type CareTeam__lookups = {
+ "CareTeam": CareTeam_CareTeam_Props;
+};
+
+export declare function careTeam(type: T, props: CareTeam__lookups[T]);;
+
+type CatalogEntry_CatalogEntry_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique identifier of the catalog item
+ * */
+ identifier: Identifier;
+ /**
+ * The type of item - medication, device, service, protocol or other
+ * */
+ type: CodeableConcept;
+ /**
+ * Whether the entry represents an orderable item
+ * */
+ orderable: boolean;
+ /**
+ * The item that is being defined
+ * */
+ referencedItem: Reference;
+ /**
+ * Any additional identifier(s) for the catalog item, in the same granularity or concept
+ * */
+ additionalIdentifier: Identifier;
+ /**
+ * Classification (category or class) of the item entry
+ * */
+ classification: CodeableConcept;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * The time period in which this catalog entry is expected to be active
+ * */
+ validityPeriod: Period;
+ /**
+ * The date until which this catalog entry is expected to be active
+ * */
+ validTo: string;
+ /**
+ * When was this catalog last updated
+ * */
+ lastUpdated: string;
+ /**
+ * Additional characteristics of the catalog entry
+ * */
+ additionalCharacteristic: CodeableConcept;
+ /**
+ * Additional classification of the catalog entry
+ * */
+ additionalClassification: CodeableConcept;
+ /**
+ * An item that this catalog entry is related to
+ * */
+ relatedEntry: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * triggers | is-replaced-by
+ * */
+ relationtype: string;
+ /**
+ * The reference to the related item
+ * */
+ item: Reference;
+ };
+};
+
+type CatalogEntry__lookups = {
+ "CatalogEntry": CatalogEntry_CatalogEntry_Props;
+};
+
+export declare function catalogEntry(type: T, props: CatalogEntry__lookups[T]);;
+
+type ChargeItem_ChargeItem_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for item
+ * */
+ identifier: Identifier;
+ /**
+ * Defining information about the code of this charge item
+ * */
+ definitionUri: string;
+ /**
+ * Resource defining the code of this ChargeItem
+ * */
+ definitionCanonical: any;
+ /**
+ * planned | billable | not-billable | aborted | billed | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * Part of referenced ChargeItem
+ * */
+ partOf: Reference;
+ /**
+ * A code that identifies the charge, like a billing code
+ * */
+ code: CodeableConcept;
+ /**
+ * Individual service was done for/to
+ * */
+ subject: Reference;
+ /**
+ * Encounter / Episode associated with event
+ * */
+ context: Reference;
+ /**
+ * When the charged service was applied
+ * */
+ occurrence: string;
+ /**
+ * Who performed charged service
+ * */
+ performer: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * What type of performance was done
+ * */
+ function: CodeableConcept;
+ /**
+ * Individual who was performing
+ * */
+ actor: Reference;
+ };
+ /**
+ * Organization providing the charged service
+ * */
+ performingOrganization: Reference;
+ /**
+ * Organization requesting the charged service
+ * */
+ requestingOrganization: Reference;
+ /**
+ * Organization that has ownership of the (potential, future) revenue
+ * */
+ costCenter: Reference;
+ /**
+ * Quantity of which the charge item has been serviced
+ * */
+ quantity: Quantity;
+ /**
+ * Anatomical location, if relevant
+ * */
+ bodysite: CodeableConcept;
+ /**
+ * Factor overriding the associated rules
+ * */
+ factorOverride: number;
+ /**
+ * Price overriding the associated rules
+ * */
+ priceOverride: Money;
+ /**
+ * Reason for overriding the list price/factor
+ * */
+ overrideReason: string;
+ /**
+ * Individual who was entering
+ * */
+ enterer: Reference;
+ /**
+ * Date the charge item was entered
+ * */
+ enteredDate: string;
+ /**
+ * Why was the charged service rendered?
+ * */
+ reason: CodeableConcept;
+ /**
+ * Which rendered service is being charged?
+ * */
+ service: Reference;
+ /**
+ * Product charged
+ * */
+ product: Reference;
+ /**
+ * Account to place this charge
+ * */
+ account: Reference;
+ /**
+ * Comments made about the ChargeItem
+ * */
+ note: Annotation;
+ /**
+ * Further information supporting this charge
+ * */
+ supportingInformation: Reference;
+};
+
+type ChargeItem__lookups = {
+ "ChargeItem": ChargeItem_ChargeItem_Props;
+};
+
+export declare function chargeItem(type: T, props: ChargeItem__lookups[T]);;
+
+type ChargeItemDefinition_ChargeItemDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this charge item definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the charge item definition
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the charge item definition
+ * */
+ version: string;
+ /**
+ * Name for this charge item definition (human friendly)
+ * */
+ title: string;
+ /**
+ * Underlying externally-defined charge item definition
+ * */
+ derivedFromUri: string;
+ /**
+ * A larger definition of which this particular definition is a component or step
+ * */
+ partOf: any;
+ /**
+ * Completed or terminated request(s) whose function is taken by this new request
+ * */
+ replaces: any;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the charge item definition
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for charge item definition (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * When the charge item definition was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the charge item definition was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * When the charge item definition is expected to be used
+ * */
+ effectivePeriod: Period;
+ /**
+ * Billing codes or product types this definition applies to
+ * */
+ code: CodeableConcept;
+ /**
+ * Instances this definition applies to
+ * */
+ instance: Reference;
+ /**
+ * Whether or not the billing code is applicable
+ * */
+ applicability: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Natural language description of the condition
+ * */
+ description: string;
+ /**
+ * Language of the expression
+ * */
+ language: string;
+ /**
+ * Boolean-valued expression
+ * */
+ expression: string;
+ };
+ /**
+ * Group of properties which are applicable under the same conditions
+ * */
+ propertyGroup: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Monetary amount associated with this component
+ * */
+ priceComponent: Money;
+ };
+};
+
+type ChargeItemDefinition__lookups = {
+ "ChargeItemDefinition": ChargeItemDefinition_ChargeItemDefinition_Props;
+};
+
+export declare function chargeItemDefinition(type: T, props: ChargeItemDefinition__lookups[T]);;
+
+type Citation_Citation_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this citation, represented as a globally unique URI
+ * */
+ url: string;
+ /**
+ * Identifier for the Citation resource itself
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the citation
+ * */
+ version: string;
+ /**
+ * Name for this citation (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this citation (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * The publisher of the Citation, not the publisher of the article or artifact being cited
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher of the Citation Resource
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the citation
+ * */
+ description: markdown;
+ /**
+ * The context that the Citation Resource content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for citation (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this citation is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions for the Citation, not for the cited artifact
+ * */
+ copyright: markdown;
+ /**
+ * When the citation was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the citation was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * When the citation is expected to be used
+ * */
+ effectivePeriod: Period;
+ /**
+ * Who authored the Citation
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the Citation
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the Citation
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the Citation
+ * */
+ endorser: ContactDetail;
+ /**
+ * A human-readable display of the citation
+ * */
+ summary: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Format for display of the citation
+ * */
+ style: CodeableConcept;
+ /**
+ * The human-readable display of the citation
+ * */
+ text: markdown;
+ };
+ /**
+ * The assignment to an organizing scheme
+ * */
+ classification: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The kind of classifier (e.g. publication type, keyword)
+ * */
+ type: CodeableConcept;
+ /**
+ * The specific classification value
+ * */
+ classifier: CodeableConcept;
+ };
+ /**
+ * Used for general notes and annotations not coded elsewhere
+ * */
+ note: Annotation;
+ /**
+ * The status of the citation
+ * */
+ currentState: CodeableConcept;
+ /**
+ * An effective date or period for a status of the citation
+ * */
+ statusDate: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Classification of the status
+ * */
+ activity: CodeableConcept;
+ /**
+ * Either occurred or expected
+ * */
+ actual: boolean;
+ /**
+ * When the status started and/or ended
+ * */
+ period: Period;
+ };
+ /**
+ * Artifact related to the Citation Resource
+ * */
+ relatesTo: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * How the Citation resource relates to the target artifact
+ * */
+ relationshipType: CodeableConcept;
+ /**
+ * The clasification of the related artifact
+ * */
+ targetClassifier: CodeableConcept;
+ /**
+ * The article or artifact that the Citation Resource is related to
+ * */
+ target: string;
+ };
+ /**
+ * The article or artifact being described
+ * */
+ citedArtifact: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * May include DOI, PMID, PMCID, etc.
+ * */
+ identifier: Identifier;
+ /**
+ * May include trial registry identifiers
+ * */
+ relatedIdentifier: Identifier;
+ /**
+ * When the cited artifact was accessed
+ * */
+ dateAccessed: string;
+ /**
+ * Citation for the main version of the cited artifact
+ * */
+ version: Reference;
+ /**
+ * The status of the cited artifact
+ * */
+ currentState: CodeableConcept;
+ /**
+ * When the status started and/or ended
+ * */
+ statusDate: Period;
+ /**
+ * The title of the article or artifact
+ * */
+ title: markdown;
+ /**
+ * Copyright notice for the abstract
+ * */
+ abstract: markdown;
+ /**
+ * The citation for the full article or artifact
+ * */
+ part: Reference;
+ /**
+ * The article or artifact that the cited artifact is related to
+ * */
+ relatesTo: string;
+ /**
+ * Copyright notice for the full article or artifact
+ * */
+ publicationForm: markdown;
+ /**
+ * The specific URL
+ * */
+ webLocation: string;
+ /**
+ * Acceptable to re-use the classification
+ * */
+ classification: boolean;
+ /**
+ * The display string for the author list, contributor list, or contributorship statement
+ * */
+ contributorship: markdown;
+ /**
+ * Any additional information or content for the article or artifact
+ * */
+ note: Annotation;
+ };
+};
+
+type Citation__lookups = {
+ "Citation": Citation_Citation_Props;
+};
+
+export declare function citation(type: T, props: Citation__lookups[T]);;
+
+type Claim_Claim_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for claim
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * Category or discipline
+ * */
+ type: CodeableConcept;
+ /**
+ * More granular claim type
+ * */
+ subType: CodeableConcept;
+ /**
+ * claim | preauthorization | predetermination
+ * */
+ use: string;
+ /**
+ * The recipient of the products and services
+ * */
+ patient: Reference;
+ /**
+ * Relevant time frame for the claim
+ * */
+ billablePeriod: Period;
+ /**
+ * Resource creation date
+ * */
+ created: string;
+ /**
+ * Author of the claim
+ * */
+ enterer: Reference;
+ /**
+ * Target
+ * */
+ insurer: Reference;
+ /**
+ * Party responsible for the claim
+ * */
+ provider: Reference;
+ /**
+ * Desired processing ugency
+ * */
+ priority: CodeableConcept;
+ /**
+ * For whom to reserve funds
+ * */
+ fundsReserve: CodeableConcept;
+ /**
+ * Prior or corollary claims
+ * */
+ related: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Reference to the related claim
+ * */
+ claim: Reference;
+ /**
+ * How the reference claim is related
+ * */
+ relationship: CodeableConcept;
+ /**
+ * File or case reference
+ * */
+ reference: Identifier;
+ };
+ /**
+ * Prescription authorizing services and products
+ * */
+ prescription: Reference;
+ /**
+ * Original prescription if superseded by fulfiller
+ * */
+ originalPrescription: Reference;
+ /**
+ * Recipient of benefits payable
+ * */
+ payee: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Category of recipient
+ * */
+ type: CodeableConcept;
+ /**
+ * Recipient reference
+ * */
+ party: Reference;
+ };
+ /**
+ * Treatment referral
+ * */
+ referral: Reference;
+ /**
+ * Servicing facility
+ * */
+ facility: Reference;
+ /**
+ * Members of the care team
+ * */
+ careTeam: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Order of care team
+ * */
+ sequence: number;
+ /**
+ * Practitioner or organization
+ * */
+ provider: Reference;
+ /**
+ * Indicator of the lead practitioner
+ * */
+ responsible: boolean;
+ /**
+ * Function within the team
+ * */
+ role: CodeableConcept;
+ /**
+ * Practitioner credential or specialization
+ * */
+ qualification: CodeableConcept;
+ };
+ /**
+ * Supporting information
+ * */
+ supportingInfo: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Information instance identifier
+ * */
+ sequence: number;
+ /**
+ * Classification of the supplied information
+ * */
+ category: CodeableConcept;
+ /**
+ * Type of information
+ * */
+ code: CodeableConcept;
+ /**
+ * When it occurred
+ * */
+ timing: string;
+ /**
+ * Data to be provided
+ * */
+ value: boolean;
+ /**
+ * Explanation for the information
+ * */
+ reason: CodeableConcept;
+ };
+ /**
+ * Pertinent diagnosis information
+ * */
+ diagnosis: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Diagnosis instance identifier
+ * */
+ sequence: number;
+ /**
+ * Nature of illness or problem
+ * */
+ diagnosis: CodeableConcept;
+ /**
+ * Timing or nature of the diagnosis
+ * */
+ type: CodeableConcept;
+ /**
+ * Present on admission
+ * */
+ onAdmission: CodeableConcept;
+ /**
+ * Package billing code
+ * */
+ packageCode: CodeableConcept;
+ };
+ /**
+ * Clinical procedures performed
+ * */
+ procedure: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Procedure instance identifier
+ * */
+ sequence: number;
+ /**
+ * Category of Procedure
+ * */
+ type: CodeableConcept;
+ /**
+ * When the procedure was performed
+ * */
+ date: string;
+ /**
+ * Specific clinical procedure
+ * */
+ procedure: CodeableConcept;
+ /**
+ * Unique device identifier
+ * */
+ udi: Reference;
+ };
+ /**
+ * Patient insurance information
+ * */
+ insurance: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Insurance instance identifier
+ * */
+ sequence: number;
+ /**
+ * Coverage to be used for adjudication
+ * */
+ focal: boolean;
+ /**
+ * Pre-assigned Claim number
+ * */
+ identifier: Identifier;
+ /**
+ * Insurance information
+ * */
+ coverage: Reference;
+ /**
+ * Additional provider contract number
+ * */
+ businessArrangement: string;
+ /**
+ * Prior authorization reference number
+ * */
+ preAuthRef: string;
+ /**
+ * Adjudication results
+ * */
+ claimResponse: Reference;
+ };
+ /**
+ * Details of the event
+ * */
+ accident: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * When the incident occurred
+ * */
+ date: string;
+ /**
+ * The nature of the accident
+ * */
+ type: CodeableConcept;
+ /**
+ * Where the event occurred
+ * */
+ location: Address;
+ };
+ /**
+ * Product or service provided
+ * */
+ item: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Item instance identifier
+ * */
+ sequence: number;
+ /**
+ * Applicable careTeam members
+ * */
+ careTeamSequence: number;
+ /**
+ * Applicable diagnoses
+ * */
+ diagnosisSequence: number;
+ /**
+ * Applicable procedures
+ * */
+ procedureSequence: number;
+ /**
+ * Applicable exception and supporting information
+ * */
+ informationSequence: number;
+ /**
+ * Revenue or cost center code
+ * */
+ revenue: CodeableConcept;
+ /**
+ * Benefit classification
+ * */
+ category: CodeableConcept;
+ /**
+ * Billing, service, product, or drug code
+ * */
+ productOrService: CodeableConcept;
+ /**
+ * Product or service billing modifiers
+ * */
+ modifier: CodeableConcept;
+ /**
+ * Program the product or service is provided under
+ * */
+ programCode: CodeableConcept;
+ /**
+ * Date or dates of service or product delivery
+ * */
+ serviced: string;
+ /**
+ * Place of service or where product was supplied
+ * */
+ location: CodeableConcept;
+ /**
+ * Count of products or services
+ * */
+ quantity: Quantity;
+ /**
+ * Fee, charge or cost per item
+ * */
+ unitPrice: Money;
+ /**
+ * Price scaling factor
+ * */
+ factor: number;
+ /**
+ * Total item cost
+ * */
+ net: Money;
+ /**
+ * Unique device identifier
+ * */
+ udi: Reference;
+ /**
+ * Anatomical location
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * Anatomical sub-location
+ * */
+ subSite: CodeableConcept;
+ /**
+ * Encounters related to this billed item
+ * */
+ encounter: Reference;
+ /**
+ * Unique device identifier
+ * */
+ detail: Reference;
+ };
+ /**
+ * Total claim cost
+ * */
+ total: Money;
+};
+
+type Claim__lookups = {
+ "Claim": Claim_Claim_Props;
+};
+
+export declare function claim(type: T, props: Claim__lookups[T]);;
+
+type ClaimResponse_ClaimResponse_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for a claim response
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * More granular claim type
+ * */
+ type: CodeableConcept;
+ /**
+ * More granular claim type
+ * */
+ subType: CodeableConcept;
+ /**
+ * claim | preauthorization | predetermination
+ * */
+ use: string;
+ /**
+ * The recipient of the products and services
+ * */
+ patient: Reference;
+ /**
+ * Response creation date
+ * */
+ created: string;
+ /**
+ * Party responsible for reimbursement
+ * */
+ insurer: Reference;
+ /**
+ * Party responsible for the claim
+ * */
+ requestor: Reference;
+ /**
+ * Id of resource triggering adjudication
+ * */
+ request: Reference;
+ /**
+ * queued | complete | error | partial
+ * */
+ outcome: string;
+ /**
+ * Disposition Message
+ * */
+ disposition: string;
+ /**
+ * Preauthorization reference
+ * */
+ preAuthRef: string;
+ /**
+ * Preauthorization reference effective period
+ * */
+ preAuthPeriod: Period;
+ /**
+ * Party to be paid any benefits payable
+ * */
+ payeeType: CodeableConcept;
+ /**
+ * Adjudication for claim line items
+ * */
+ item: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Claim item instance identifier
+ * */
+ itemSequence: number;
+ /**
+ * Applicable note numbers
+ * */
+ noteNumber: number;
+ /**
+ * Non-monetary value
+ * */
+ adjudication: number;
+ /**
+ * Applicable note numbers
+ * */
+ detail: number;
+ };
+ /**
+ * Insurer added line items
+ * */
+ addItem: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Item sequence number
+ * */
+ itemSequence: number;
+ /**
+ * Detail sequence number
+ * */
+ detailSequence: number;
+ /**
+ * Subdetail sequence number
+ * */
+ subdetailSequence: number;
+ /**
+ * Authorized providers
+ * */
+ provider: Reference;
+ /**
+ * Billing, service, product, or drug code
+ * */
+ productOrService: CodeableConcept;
+ /**
+ * Service/Product billing modifiers
+ * */
+ modifier: CodeableConcept;
+ /**
+ * Program the product or service is provided under
+ * */
+ programCode: CodeableConcept;
+ /**
+ * Date or dates of service or product delivery
+ * */
+ serviced: string;
+ /**
+ * Place of service or where product was supplied
+ * */
+ location: CodeableConcept;
+ /**
+ * Count of products or services
+ * */
+ quantity: Quantity;
+ /**
+ * Fee, charge or cost per item
+ * */
+ unitPrice: Money;
+ /**
+ * Price scaling factor
+ * */
+ factor: number;
+ /**
+ * Total item cost
+ * */
+ net: Money;
+ /**
+ * Anatomical location
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * Anatomical sub-location
+ * */
+ subSite: CodeableConcept;
+ /**
+ * Applicable note numbers
+ * */
+ noteNumber: number;
+ /**
+ * Applicable note numbers
+ * */
+ detail: number;
+ };
+ /**
+ * Header-level adjudication
+ * */
+ adjudication: any;
+ /**
+ * Adjudication totals
+ * */
+ total: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of adjudication information
+ * */
+ category: CodeableConcept;
+ /**
+ * Financial total for the category
+ * */
+ amount: Money;
+ };
+ /**
+ * Payment Details
+ * */
+ payment: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Partial or complete payment
+ * */
+ type: CodeableConcept;
+ /**
+ * Payment adjustment for non-claim issues
+ * */
+ adjustment: Money;
+ /**
+ * Explanation for the adjustment
+ * */
+ adjustmentReason: CodeableConcept;
+ /**
+ * Expected date of payment
+ * */
+ date: string;
+ /**
+ * Payable amount after adjustment
+ * */
+ amount: Money;
+ /**
+ * Business identifier for the payment
+ * */
+ identifier: Identifier;
+ };
+ /**
+ * Funds reserved status
+ * */
+ fundsReserve: CodeableConcept;
+ /**
+ * Printed form identifier
+ * */
+ formCode: CodeableConcept;
+ /**
+ * Printed reference or actual form
+ * */
+ form: Attachment;
+ /**
+ * Note concerning adjudication
+ * */
+ processNote: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Note instance identifier
+ * */
+ number: number;
+ /**
+ * display | print | printoper
+ * */
+ type: string;
+ /**
+ * Note explanatory text
+ * */
+ text: string;
+ /**
+ * Language of the text
+ * */
+ language: CodeableConcept;
+ };
+ /**
+ * Request for additional information
+ * */
+ communicationRequest: Reference;
+ /**
+ * Patient insurance information
+ * */
+ insurance: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Insurance instance identifier
+ * */
+ sequence: number;
+ /**
+ * Coverage to be used for adjudication
+ * */
+ focal: boolean;
+ /**
+ * Insurance information
+ * */
+ coverage: Reference;
+ /**
+ * Additional provider contract number
+ * */
+ businessArrangement: string;
+ /**
+ * Adjudication results
+ * */
+ claimResponse: Reference;
+ };
+ /**
+ * Processing errors
+ * */
+ error: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Item sequence number
+ * */
+ itemSequence: number;
+ /**
+ * Detail sequence number
+ * */
+ detailSequence: number;
+ /**
+ * Subdetail sequence number
+ * */
+ subDetailSequence: number;
+ /**
+ * Error code detailing processing issues
+ * */
+ code: CodeableConcept;
+ };
+};
+
+type ClaimResponse__lookups = {
+ "ClaimResponse": ClaimResponse_ClaimResponse_Props;
+};
+
+export declare function claimResponse(type: T, props: ClaimResponse__lookups[T]);;
+
+type ClinicalImpression_ClinicalImpression_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier
+ * */
+ identifier: Identifier;
+ /**
+ * in-progress | completed | entered-in-error
+ * */
+ status: string;
+ /**
+ * Reason for current status
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * Kind of assessment performed
+ * */
+ code: CodeableConcept;
+ /**
+ * Why/how the assessment was performed
+ * */
+ description: string;
+ /**
+ * Patient or group assessed
+ * */
+ subject: Reference;
+ /**
+ * Encounter created as part of
+ * */
+ encounter: Reference;
+ /**
+ * Time of assessment
+ * */
+ effective: string;
+ /**
+ * When the assessment was documented
+ * */
+ date: string;
+ /**
+ * The clinician performing the assessment
+ * */
+ assessor: Reference;
+ /**
+ * Reference to last assessment
+ * */
+ previous: Reference;
+ /**
+ * Relevant impressions of patient state
+ * */
+ problem: Reference;
+ /**
+ * One or more sets of investigations (signs, symptoms, etc.)
+ * */
+ investigation: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A name/code for the set
+ * */
+ code: CodeableConcept;
+ /**
+ * Record of a specific investigation
+ * */
+ item: Reference;
+ };
+ /**
+ * Clinical Protocol followed
+ * */
+ protocol: string;
+ /**
+ * Summary of the assessment
+ * */
+ summary: string;
+ /**
+ * Possible or likely findings and diagnoses
+ * */
+ finding: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * What was found
+ * */
+ itemCodeableConcept: CodeableConcept;
+ /**
+ * What was found
+ * */
+ itemReference: Reference;
+ /**
+ * Which investigations support finding
+ * */
+ basis: string;
+ };
+ /**
+ * Estimate of likely outcome
+ * */
+ prognosisCodeableConcept: CodeableConcept;
+ /**
+ * RiskAssessment expressing likely outcome
+ * */
+ prognosisReference: Reference;
+ /**
+ * Information supporting the clinical impression
+ * */
+ supportingInfo: Reference;
+ /**
+ * Comments made about the ClinicalImpression
+ * */
+ note: Annotation;
+};
+
+type ClinicalImpression__lookups = {
+ "ClinicalImpression": ClinicalImpression_ClinicalImpression_Props;
+};
+
+export declare function clinicalImpression(type: T, props: ClinicalImpression__lookups[T]);;
+
+type ClinicalUseDefinition_ClinicalUseDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier for this issue
+ * */
+ identifier: Identifier;
+ /**
+ * indication | contraindication | interaction | undesirable-effect | warning
+ * */
+ type: string;
+ /**
+ * A categorisation of the issue, primarily for dividing warnings into subject heading areas such as "Pregnancy", "Overdose"
+ * */
+ category: CodeableConcept;
+ /**
+ * The medication or procedure for which this is an indication
+ * */
+ subject: Reference;
+ /**
+ * Whether this is a current issue or one that has been retired etc
+ * */
+ status: CodeableConcept;
+ /**
+ * Specifics for when this is a contraindication
+ * */
+ contraindication: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The situation that is being documented as contraindicating against this item
+ * */
+ diseaseSymptomProcedure: CodeableReference;
+ /**
+ * The status of the disease or symptom for the contraindication
+ * */
+ diseaseStatus: CodeableReference;
+ /**
+ * A comorbidity (concurrent condition) or coinfection
+ * */
+ comorbidity: CodeableReference;
+ /**
+ * The indication which this is a contraidication for
+ * */
+ indication: Reference;
+ /**
+ * Reference to a specific medication as part of an indication or contraindication
+ * */
+ otherTherapy: CodeableReference;
+ };
+ /**
+ * Specifics for when this is an indication
+ * */
+ indication: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The situation that is being documented as an indicaton for this item
+ * */
+ diseaseSymptomProcedure: CodeableReference;
+ /**
+ * The status of the disease or symptom for the indication
+ * */
+ diseaseStatus: CodeableReference;
+ /**
+ * A comorbidity or coinfection as part of the indication
+ * */
+ comorbidity: CodeableReference;
+ /**
+ * The intended effect, aim or strategy to be achieved
+ * */
+ intendedEffect: CodeableReference;
+ /**
+ * Timing or duration information
+ * */
+ duration: Range;
+ /**
+ * An unwanted side effect or negative outcome of the subject of this resource when being used for this indication
+ * */
+ undesirableEffect: Reference;
+ };
+ /**
+ * Specifics for when this is an interaction
+ * */
+ interaction: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The specific medication, food or laboratory test that interacts
+ * */
+ interactant: Reference;
+ /**
+ * The type of the interaction e.g. drug-drug interaction, drug-lab test interaction
+ * */
+ type: CodeableConcept;
+ /**
+ * The effect of the interaction, for example "reduced gastric absorption of primary medication"
+ * */
+ effect: CodeableReference;
+ /**
+ * The incidence of the interaction, e.g. theoretical, observed
+ * */
+ incidence: CodeableConcept;
+ /**
+ * Actions for managing the interaction
+ * */
+ management: CodeableConcept;
+ };
+ /**
+ * The population group to which this applies
+ * */
+ population: Reference;
+ /**
+ * A possible negative outcome from the use of this treatment
+ * */
+ undesirableEffect: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The situation in which the undesirable effect may manifest
+ * */
+ symptomConditionEffect: CodeableReference;
+ /**
+ * High level classification of the effect
+ * */
+ classification: CodeableConcept;
+ /**
+ * How often the effect is seen
+ * */
+ frequencyOfOccurrence: CodeableConcept;
+ };
+ /**
+ * Critical environmental, health or physical risks or hazards. For example 'Do not operate heavy machinery', 'May cause drowsiness'
+ * */
+ warning: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A textual definition of this warning, with formatting
+ * */
+ description: markdown;
+ /**
+ * A coded or unformatted textual definition of this warning
+ * */
+ code: CodeableConcept;
+ };
+};
+
+type ClinicalUseDefinition__lookups = {
+ "ClinicalUseDefinition": ClinicalUseDefinition_ClinicalUseDefinition_Props;
+};
+
+export declare function clinicalUseDefinition(type: T, props: ClinicalUseDefinition__lookups[T]);;
+
+type CodeSystem_CodeSystem_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this code system, represented as a URI (globally unique) (Coding.system)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the code system (business identifier)
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the code system (Coding.version)
+ * */
+ version: string;
+ /**
+ * Name for this code system (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this code system (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the code system
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for code system (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this code system is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * If code comparison is case sensitive
+ * */
+ caseSensitive: boolean;
+ /**
+ * Canonical reference to the value set with entire code system
+ * */
+ valueSet: any;
+ /**
+ * grouped-by | is-a | part-of | classified-with
+ * */
+ hierarchyMeaning: string;
+ /**
+ * If code system defines a compositional grammar
+ * */
+ compositional: boolean;
+ /**
+ * If definitions are not stable
+ * */
+ versionNeeded: boolean;
+ /**
+ * not-present | example | fragment | complete | supplement
+ * */
+ content: string;
+ /**
+ * Canonical URL of Code System this adds designations and properties to
+ * */
+ supplements: any;
+ /**
+ * Total concepts in the code system
+ * */
+ count: number;
+ /**
+ * Filter that can be used in a value set
+ * */
+ filter: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Code that identifies the filter
+ * */
+ code: string;
+ /**
+ * How or why the filter is used
+ * */
+ description: string;
+ /**
+ * = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists
+ * */
+ operator: string;
+ /**
+ * What to use for the value
+ * */
+ value: string;
+ };
+ /**
+ * Additional information supplied about each concept
+ * */
+ property: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifies the property on the concepts, and when referred to in operations
+ * */
+ code: string;
+ /**
+ * Formal identifier for the property
+ * */
+ uri: string;
+ /**
+ * Why the property is defined, and/or what it conveys
+ * */
+ description: string;
+ /**
+ * code | Coding | string | integer | boolean | dateTime | decimal
+ * */
+ type: string;
+ };
+ /**
+ * Concepts in the code system
+ * */
+ concept: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Code that identifies concept
+ * */
+ code: string;
+ /**
+ * Text to display to the user
+ * */
+ display: string;
+ /**
+ * Formal definition
+ * */
+ definition: string;
+ /**
+ * The text value for this designation
+ * */
+ designation: string;
+ /**
+ * Value of the property for this concept
+ * */
+ property: string;
+ };
+};
+
+type CodeSystem__lookups = {
+ "CodeSystem": CodeSystem_CodeSystem_Props;
+};
+
+export declare function codeSystem(type: T, props: CodeSystem__lookups[T]);;
+
+type Communication_Communication_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Instantiates FHIR protocol or definition
+ * */
+ instantiatesCanonical: any;
+ /**
+ * Instantiates external protocol or definition
+ * */
+ instantiatesUri: string;
+ /**
+ * Request fulfilled by this communication
+ * */
+ basedOn: Reference;
+ /**
+ * Part of this action
+ * */
+ partOf: Reference;
+ /**
+ * Reply to
+ * */
+ inResponseTo: Reference;
+ /**
+ * preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * Reason for current status
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * Message category
+ * */
+ category: CodeableConcept;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * A channel of communication
+ * */
+ medium: CodeableConcept;
+ /**
+ * Focus of message
+ * */
+ subject: Reference;
+ /**
+ * Description of the purpose/content
+ * */
+ topic: CodeableConcept;
+ /**
+ * Resources that pertain to this communication
+ * */
+ about: Reference;
+ /**
+ * Encounter created as part of
+ * */
+ encounter: Reference;
+ /**
+ * When sent
+ * */
+ sent: string;
+ /**
+ * When received
+ * */
+ received: string;
+ /**
+ * Message recipient
+ * */
+ recipient: Reference;
+ /**
+ * Message sender
+ * */
+ sender: Reference;
+ /**
+ * Indication for message
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why was communication done?
+ * */
+ reasonReference: Reference;
+ /**
+ * Message payload
+ * */
+ payload: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Message part content
+ * */
+ content: string;
+ };
+ /**
+ * Comments made about the communication
+ * */
+ note: Annotation;
+};
+
+type Communication__lookups = {
+ "Communication": Communication_Communication_Props;
+};
+
+export declare function communication(type: T, props: Communication__lookups[T]);;
+
+type CommunicationRequest_CommunicationRequest_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Fulfills plan or proposal
+ * */
+ basedOn: Reference;
+ /**
+ * Request(s) replaced by this request
+ * */
+ replaces: Reference;
+ /**
+ * Composite request this is part of
+ * */
+ groupIdentifier: Identifier;
+ /**
+ * draft | active | on-hold | revoked | completed | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * Reason for current status
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * Message category
+ * */
+ category: CodeableConcept;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * True if request is prohibiting action
+ * */
+ doNotPerform: boolean;
+ /**
+ * A channel of communication
+ * */
+ medium: CodeableConcept;
+ /**
+ * Focus of message
+ * */
+ subject: Reference;
+ /**
+ * Resources that pertain to this communication request
+ * */
+ about: Reference;
+ /**
+ * Encounter created as part of
+ * */
+ encounter: Reference;
+ /**
+ * Message payload
+ * */
+ payload: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Message part content
+ * */
+ content: string;
+ };
+ /**
+ * When scheduled
+ * */
+ occurrence: string;
+ /**
+ * When request transitioned to being actionable
+ * */
+ authoredOn: string;
+ /**
+ * Who/what is requesting service
+ * */
+ requester: Reference;
+ /**
+ * Message recipient
+ * */
+ recipient: Reference;
+ /**
+ * Message sender
+ * */
+ sender: Reference;
+ /**
+ * Why is communication needed?
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why is communication needed?
+ * */
+ reasonReference: Reference;
+ /**
+ * Comments made about communication request
+ * */
+ note: Annotation;
+};
+
+type CommunicationRequest__lookups = {
+ "CommunicationRequest": CommunicationRequest_CommunicationRequest_Props;
+};
+
+export declare function communicationRequest(type: T, props: CommunicationRequest__lookups[T]);;
+
+type CompartmentDefinition_CompartmentDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this compartment definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Business version of the compartment definition
+ * */
+ version: string;
+ /**
+ * Name for this compartment definition (computer friendly)
+ * */
+ name: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the compartment definition
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Why this compartment definition is defined
+ * */
+ purpose: markdown;
+ /**
+ * Patient | Encounter | RelatedPerson | Practitioner | Device
+ * */
+ code: string;
+ /**
+ * Whether the search syntax is supported
+ * */
+ search: boolean;
+ /**
+ * How a resource is related to the compartment
+ * */
+ resource: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Name of resource type
+ * */
+ code: string;
+ /**
+ * Search Parameter Name, or chained parameters
+ * */
+ param: string;
+ /**
+ * Additional documentation about the resource and compartment
+ * */
+ documentation: string;
+ };
+};
+
+type CompartmentDefinition__lookups = {
+ "CompartmentDefinition": CompartmentDefinition_CompartmentDefinition_Props;
+};
+
+export declare function compartmentDefinition(type: T, props: CompartmentDefinition__lookups[T]);;
+
+type Composition_Composition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Version-independent identifier for the Composition
+ * */
+ identifier: Identifier;
+ /**
+ * preliminary | final | amended | entered-in-error
+ * */
+ status: string;
+ /**
+ * Kind of composition (LOINC if possible)
+ * */
+ type: CodeableConcept;
+ /**
+ * Categorization of Composition
+ * */
+ category: CodeableConcept;
+ /**
+ * Who and/or what the composition is about
+ * */
+ subject: Reference;
+ /**
+ * Context of the Composition
+ * */
+ encounter: Reference;
+ /**
+ * Composition editing time
+ * */
+ date: string;
+ /**
+ * Who and/or what authored the composition
+ * */
+ author: Reference;
+ /**
+ * Human Readable name/title
+ * */
+ title: string;
+ /**
+ * As defined by affinity domain
+ * */
+ confidentiality: string;
+ /**
+ * Attests to accuracy of composition
+ * */
+ attester: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * personal | professional | legal | official
+ * */
+ mode: string;
+ /**
+ * When the composition was attested
+ * */
+ time: string;
+ /**
+ * Who attested the composition
+ * */
+ party: Reference;
+ };
+ /**
+ * Organization which maintains the composition
+ * */
+ custodian: Reference;
+ /**
+ * Relationships to other compositions/documents
+ * */
+ relatesTo: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * replaces | transforms | signs | appends
+ * */
+ code: string;
+ /**
+ * Target of the relationship
+ * */
+ target: Identifier;
+ };
+ /**
+ * The clinical service(s) being documented
+ * */
+ event: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Code(s) that apply to the event being documented
+ * */
+ code: CodeableConcept;
+ /**
+ * The period covered by the documentation
+ * */
+ period: Period;
+ /**
+ * The event(s) being documented
+ * */
+ detail: Reference;
+ };
+ /**
+ * Composition is broken into sections
+ * */
+ section: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Label for section (e.g. for ToC)
+ * */
+ title: string;
+ /**
+ * Classification of section (recommended)
+ * */
+ code: CodeableConcept;
+ /**
+ * Who and/or what authored the section
+ * */
+ author: Reference;
+ /**
+ * Who/what the section is about, when it is not about the subject of composition
+ * */
+ focus: Reference;
+ /**
+ * Text summary of the section, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * working | snapshot | changes
+ * */
+ mode: string;
+ /**
+ * Order of section entries
+ * */
+ orderedBy: CodeableConcept;
+ /**
+ * A reference to data that supports this section
+ * */
+ entry: Reference;
+ /**
+ * Why the section is empty
+ * */
+ emptyReason: CodeableConcept;
+ };
+};
+
+type Composition__lookups = {
+ "Composition": Composition_Composition_Props;
+};
+
+export declare function composition(type: T, props: Composition__lookups[T]);;
+
+type ConceptMap_ConceptMap_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this concept map, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the concept map
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the concept map
+ * */
+ version: string;
+ /**
+ * Name for this concept map (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this concept map (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the concept map
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for concept map (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this concept map is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * The source value set that contains the concepts that are being mapped
+ * */
+ source: string;
+ /**
+ * The target value set which provides context for the mappings
+ * */
+ target: string;
+ /**
+ * Same source and target systems
+ * */
+ group: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Source system where concepts to be mapped are defined
+ * */
+ source: string;
+ /**
+ * Specific version of the code system
+ * */
+ sourceVersion: string;
+ /**
+ * Target system that the concepts are to be mapped to
+ * */
+ target: string;
+ /**
+ * Specific version of the code system
+ * */
+ targetVersion: string;
+ /**
+ * Display for the code (if value is a code)
+ * */
+ element: string;
+ /**
+ * canonical reference to an additional ConceptMap to use for mapping if the source concept is unmapped
+ * */
+ unmapped: any;
+ };
+};
+
+type ConceptMap__lookups = {
+ "ConceptMap": ConceptMap_ConceptMap_Props;
+};
+
+export declare function conceptMap(type: T, props: ConceptMap__lookups[T]);;
+
+type Condition_Condition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Ids for this condition
+ * */
+ identifier: Identifier;
+ /**
+ * active | recurrence | relapse | inactive | remission | resolved
+ * */
+ clinicalStatus: CodeableConcept;
+ /**
+ * unconfirmed | provisional | differential | confirmed | refuted | entered-in-error
+ * */
+ verificationStatus: CodeableConcept;
+ /**
+ * problem-list-item | encounter-diagnosis
+ * */
+ category: CodeableConcept;
+ /**
+ * Subjective severity of condition
+ * */
+ severity: CodeableConcept;
+ /**
+ * Identification of the condition, problem or diagnosis
+ * */
+ code: CodeableConcept;
+ /**
+ * Anatomical location, if relevant
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * Who has the condition?
+ * */
+ subject: Reference;
+ /**
+ * Encounter created as part of
+ * */
+ encounter: Reference;
+ /**
+ * Estimated or actual date, date-time, or age
+ * */
+ onset: string;
+ /**
+ * When in resolution/remission
+ * */
+ abatement: string;
+ /**
+ * Date record was first recorded
+ * */
+ recordedDate: string;
+ /**
+ * Who recorded the condition
+ * */
+ recorder: Reference;
+ /**
+ * Person who asserts this condition
+ * */
+ asserter: Reference;
+ /**
+ * Stage/grade, usually assessed formally
+ * */
+ stage: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Simple summary (disease specific)
+ * */
+ summary: CodeableConcept;
+ /**
+ * Formal record of assessment
+ * */
+ assessment: Reference;
+ /**
+ * Kind of staging
+ * */
+ type: CodeableConcept;
+ };
+ /**
+ * Supporting evidence
+ * */
+ evidence: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Manifestation/symptom
+ * */
+ code: CodeableConcept;
+ /**
+ * Supporting information found elsewhere
+ * */
+ detail: Reference;
+ };
+ /**
+ * Additional information about the Condition
+ * */
+ note: Annotation;
+};
+
+type Condition__lookups = {
+ "Condition": Condition_Condition_Props;
+};
+
+export declare function condition(type: T, props: Condition__lookups[T]);;
+
+type Consent_Consent_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifier for this record (external references)
+ * */
+ identifier: Identifier;
+ /**
+ * draft | proposed | active | rejected | inactive | entered-in-error
+ * */
+ status: string;
+ /**
+ * Which of the four areas this resource covers (extensible)
+ * */
+ scope: CodeableConcept;
+ /**
+ * Classification of the consent statement - for indexing/retrieval
+ * */
+ category: CodeableConcept;
+ /**
+ * Who the consent applies to
+ * */
+ patient: Reference;
+ /**
+ * When this Consent was created or indexed
+ * */
+ dateTime: string;
+ /**
+ * Who is agreeing to the policy and rules
+ * */
+ performer: Reference;
+ /**
+ * Custodian of the consent
+ * */
+ organization: Reference;
+ /**
+ * Source from which this consent is taken
+ * */
+ source: Attachment;
+ /**
+ * Policies covered by this consent
+ * */
+ policy: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Enforcement source for policy
+ * */
+ authority: string;
+ /**
+ * Specific policy covered by this consent
+ * */
+ uri: string;
+ };
+ /**
+ * Regulation that this consents to
+ * */
+ policyRule: CodeableConcept;
+ /**
+ * Consent Verified by patient or family
+ * */
+ verification: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Has been verified
+ * */
+ verified: boolean;
+ /**
+ * Person who verified
+ * */
+ verifiedWith: Reference;
+ /**
+ * When consent verified
+ * */
+ verificationDate: string;
+ };
+ /**
+ * Constraints to the base Consent.policyRule
+ * */
+ provision: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * deny | permit
+ * */
+ type: string;
+ /**
+ * Timeframe for this rule
+ * */
+ period: Period;
+ /**
+ * Resource for the actor (or group, by role)
+ * */
+ actor: Reference;
+ /**
+ * Actions controlled by this rule
+ * */
+ action: CodeableConcept;
+ /**
+ * Security Labels that define affected resources
+ * */
+ securityLabel: Coding;
+ /**
+ * Context of activities covered by this rule
+ * */
+ purpose: Coding;
+ /**
+ * e.g. Resource Type, Profile, CDA, etc.
+ * */
+ class: Coding;
+ /**
+ * e.g. LOINC or SNOMED CT code, etc. in the content
+ * */
+ code: CodeableConcept;
+ /**
+ * Timeframe for data controlled by this rule
+ * */
+ dataPeriod: Period;
+ /**
+ * The actual data reference
+ * */
+ data: Reference;
+ };
+};
+
+type Consent__lookups = {
+ "Consent": Consent_Consent_Props;
+};
+
+export declare function consent(type: T, props: Consent__lookups[T]);;
+
+type Contract_Contract_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Contract number
+ * */
+ identifier: Identifier;
+ /**
+ * Basal definition
+ * */
+ url: string;
+ /**
+ * Business edition
+ * */
+ version: string;
+ /**
+ * amended | appended | cancelled | disputed | entered-in-error | executable | executed | negotiable | offered | policy | rejected | renewed | revoked | resolved | terminated
+ * */
+ status: string;
+ /**
+ * Negotiation status
+ * */
+ legalState: CodeableConcept;
+ /**
+ * Source Contract Definition
+ * */
+ instantiatesCanonical: Reference;
+ /**
+ * External Contract Definition
+ * */
+ instantiatesUri: string;
+ /**
+ * Content derived from the basal information
+ * */
+ contentDerivative: CodeableConcept;
+ /**
+ * When this Contract was issued
+ * */
+ issued: string;
+ /**
+ * Effective time
+ * */
+ applies: Period;
+ /**
+ * Contract cessation cause
+ * */
+ expirationType: CodeableConcept;
+ /**
+ * Contract Target Entity
+ * */
+ subject: Reference;
+ /**
+ * Authority under which this Contract has standing
+ * */
+ authority: Reference;
+ /**
+ * A sphere of control governed by an authoritative jurisdiction, organization, or person
+ * */
+ domain: Reference;
+ /**
+ * Specific Location
+ * */
+ site: Reference;
+ /**
+ * Computer friendly designation
+ * */
+ name: string;
+ /**
+ * Human Friendly name
+ * */
+ title: string;
+ /**
+ * Subordinate Friendly name
+ * */
+ subtitle: string;
+ /**
+ * Acronym or short name
+ * */
+ alias: string;
+ /**
+ * Source of Contract
+ * */
+ author: Reference;
+ /**
+ * Range of Legal Concerns
+ * */
+ scope: CodeableConcept;
+ /**
+ * Focus of contract interest
+ * */
+ topic: CodeableConcept;
+ /**
+ * Legal instrument category
+ * */
+ type: CodeableConcept;
+ /**
+ * Subtype within the context of type
+ * */
+ subType: CodeableConcept;
+ /**
+ * Contract precursor content
+ * */
+ contentDefinition: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Content structure and use
+ * */
+ type: CodeableConcept;
+ /**
+ * Detailed Content Type Definition
+ * */
+ subType: CodeableConcept;
+ /**
+ * Publisher Entity
+ * */
+ publisher: Reference;
+ /**
+ * When published
+ * */
+ publicationDate: string;
+ /**
+ * amended | appended | cancelled | disputed | entered-in-error | executable | executed | negotiable | offered | policy | rejected | renewed | revoked | resolved | terminated
+ * */
+ publicationStatus: string;
+ /**
+ * Publication Ownership
+ * */
+ copyright: markdown;
+ };
+ /**
+ * Contract Term List
+ * */
+ term: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Contract Term Number
+ * */
+ identifier: Identifier;
+ /**
+ * Contract Term Issue Date Time
+ * */
+ issued: string;
+ /**
+ * Contract Term Effective Time
+ * */
+ applies: Period;
+ /**
+ * Term Concern
+ * */
+ topic: CodeableConcept;
+ /**
+ * Contract Term Type or Form
+ * */
+ type: CodeableConcept;
+ /**
+ * Contract Term Type specific classification
+ * */
+ subType: CodeableConcept;
+ /**
+ * Term Statement
+ * */
+ text: string;
+ /**
+ * Handling Instructions
+ * */
+ securityLabel: Coding;
+ /**
+ * Offer restriction numbers
+ * */
+ offer: number;
+ /**
+ * Security Labels that define affected terms
+ * */
+ asset: number;
+ /**
+ * Action restriction numbers
+ * */
+ action: number;
+ };
+ /**
+ * Extra Information
+ * */
+ supportingInfo: Reference;
+ /**
+ * Key event in Contract History
+ * */
+ relevantHistory: Reference;
+ /**
+ * Contract Signatory
+ * */
+ signer: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Contract Signatory Role
+ * */
+ type: Coding;
+ /**
+ * Contract Signatory Party
+ * */
+ party: Reference;
+ /**
+ * Contract Documentation Signature
+ * */
+ signature: Signature;
+ };
+ /**
+ * Contract Friendly Language
+ * */
+ friendly: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Easily comprehended representation of this Contract
+ * */
+ content: Attachment;
+ };
+ /**
+ * Contract Legal Language
+ * */
+ legal: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Contract Legal Text
+ * */
+ content: Attachment;
+ };
+ /**
+ * Computable Contract Language
+ * */
+ rule: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Computable Contract Rules
+ * */
+ content: Attachment;
+ };
+ /**
+ * Binding Contract
+ * */
+ legallyBinding: Attachment;
+};
+
+type Contract__lookups = {
+ "Contract": Contract_Contract_Props;
+};
+
+export declare function contract(type: T, props: Contract__lookups[T]);;
+
+type Coverage_Coverage_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for the coverage
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * Coverage category such as medical or accident
+ * */
+ type: CodeableConcept;
+ /**
+ * Owner of the policy
+ * */
+ policyHolder: Reference;
+ /**
+ * Subscriber to the policy
+ * */
+ subscriber: Reference;
+ /**
+ * ID assigned to the subscriber
+ * */
+ subscriberId: string;
+ /**
+ * Plan beneficiary
+ * */
+ beneficiary: Reference;
+ /**
+ * Dependent number
+ * */
+ dependent: string;
+ /**
+ * Beneficiary relationship to the subscriber
+ * */
+ relationship: CodeableConcept;
+ /**
+ * Coverage start and end dates
+ * */
+ period: Period;
+ /**
+ * Issuer of the policy
+ * */
+ payor: Reference;
+ /**
+ * Additional coverage classifications
+ * */
+ class: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of class such as 'group' or 'plan'
+ * */
+ type: CodeableConcept;
+ /**
+ * Value associated with the type
+ * */
+ value: string;
+ /**
+ * Human readable description of the type and value
+ * */
+ name: string;
+ };
+ /**
+ * Relative order of the coverage
+ * */
+ order: number;
+ /**
+ * Insurer network
+ * */
+ network: string;
+ /**
+ * Patient payments for services/products
+ * */
+ costToBeneficiary: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Cost category
+ * */
+ type: CodeableConcept;
+ /**
+ * The amount or percentage due from the beneficiary
+ * */
+ value: Quantity;
+ /**
+ * The effective period of the exception
+ * */
+ exception: Period;
+ };
+ /**
+ * Reimbursement to insurer
+ * */
+ subrogation: boolean;
+ /**
+ * Contract details
+ * */
+ contract: Reference;
+};
+
+type Coverage__lookups = {
+ "Coverage": Coverage_Coverage_Props;
+};
+
+export declare function coverage(type: T, props: Coverage__lookups[T]);;
+
+type CoverageEligibilityRequest_CoverageEligibilityRequest_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for coverage eligiblity request
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * Desired processing priority
+ * */
+ priority: CodeableConcept;
+ /**
+ * auth-requirements | benefits | discovery | validation
+ * */
+ purpose: string;
+ /**
+ * Intended recipient of products and services
+ * */
+ patient: Reference;
+ /**
+ * Estimated date or dates of service
+ * */
+ serviced: string;
+ /**
+ * Creation date
+ * */
+ created: string;
+ /**
+ * Author
+ * */
+ enterer: Reference;
+ /**
+ * Party responsible for the request
+ * */
+ provider: Reference;
+ /**
+ * Coverage issuer
+ * */
+ insurer: Reference;
+ /**
+ * Servicing facility
+ * */
+ facility: Reference;
+ /**
+ * Supporting information
+ * */
+ supportingInfo: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Information instance identifier
+ * */
+ sequence: number;
+ /**
+ * Data to be provided
+ * */
+ information: Reference;
+ /**
+ * Applies to all items
+ * */
+ appliesToAll: boolean;
+ };
+ /**
+ * Patient insurance information
+ * */
+ insurance: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Applicable coverage
+ * */
+ focal: boolean;
+ /**
+ * Insurance information
+ * */
+ coverage: Reference;
+ /**
+ * Additional provider contract number
+ * */
+ businessArrangement: string;
+ };
+ /**
+ * Item to be evaluated for eligibiity
+ * */
+ item: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Applicable exception or supporting information
+ * */
+ supportingInfoSequence: number;
+ /**
+ * Benefit classification
+ * */
+ category: CodeableConcept;
+ /**
+ * Billing, service, product, or drug code
+ * */
+ productOrService: CodeableConcept;
+ /**
+ * Product or service billing modifiers
+ * */
+ modifier: CodeableConcept;
+ /**
+ * Perfoming practitioner
+ * */
+ provider: Reference;
+ /**
+ * Count of products or services
+ * */
+ quantity: Quantity;
+ /**
+ * Fee, charge or cost per item
+ * */
+ unitPrice: Money;
+ /**
+ * Servicing facility
+ * */
+ facility: Reference;
+ /**
+ * Nature of illness or problem
+ * */
+ diagnosis: CodeableConcept;
+ /**
+ * Product or service details
+ * */
+ detail: Reference;
+ };
+};
+
+type CoverageEligibilityRequest__lookups = {
+ "CoverageEligibilityRequest": CoverageEligibilityRequest_CoverageEligibilityRequest_Props;
+};
+
+export declare function coverageEligibilityRequest(type: T, props: CoverageEligibilityRequest__lookups[T]);;
+
+type CoverageEligibilityResponse_CoverageEligibilityResponse_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for coverage eligiblity request
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * auth-requirements | benefits | discovery | validation
+ * */
+ purpose: string;
+ /**
+ * Intended recipient of products and services
+ * */
+ patient: Reference;
+ /**
+ * Estimated date or dates of service
+ * */
+ serviced: string;
+ /**
+ * Response creation date
+ * */
+ created: string;
+ /**
+ * Party responsible for the request
+ * */
+ requestor: Reference;
+ /**
+ * Eligibility request reference
+ * */
+ request: Reference;
+ /**
+ * queued | complete | error | partial
+ * */
+ outcome: string;
+ /**
+ * Disposition Message
+ * */
+ disposition: string;
+ /**
+ * Coverage issuer
+ * */
+ insurer: Reference;
+ /**
+ * Patient insurance information
+ * */
+ insurance: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Insurance information
+ * */
+ coverage: Reference;
+ /**
+ * Coverage inforce indicator
+ * */
+ inforce: boolean;
+ /**
+ * When the benefits are applicable
+ * */
+ benefitPeriod: Period;
+ /**
+ * Preauthorization requirements endpoint
+ * */
+ item: string;
+ };
+ /**
+ * Preauthorization reference
+ * */
+ preAuthRef: string;
+ /**
+ * Printed form identifier
+ * */
+ form: CodeableConcept;
+ /**
+ * Processing errors
+ * */
+ error: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Error code detailing processing issues
+ * */
+ code: CodeableConcept;
+ };
+};
+
+type CoverageEligibilityResponse__lookups = {
+ "CoverageEligibilityResponse": CoverageEligibilityResponse_CoverageEligibilityResponse_Props;
+};
+
+export declare function coverageEligibilityResponse(type: T, props: CoverageEligibilityResponse__lookups[T]);;
+
+type DetectedIssue_DetectedIssue_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique id for the detected issue
+ * */
+ identifier: Identifier;
+ /**
+ * registered | preliminary | final | amended +
+ * */
+ status: string;
+ /**
+ * Issue Category, e.g. drug-drug, duplicate therapy, etc.
+ * */
+ code: CodeableConcept;
+ /**
+ * high | moderate | low
+ * */
+ severity: string;
+ /**
+ * Associated patient
+ * */
+ patient: Reference;
+ /**
+ * When identified
+ * */
+ identified: string;
+ /**
+ * The provider or device that identified the issue
+ * */
+ author: Reference;
+ /**
+ * Problem resource
+ * */
+ implicated: Reference;
+ /**
+ * Supporting evidence
+ * */
+ evidence: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Manifestation
+ * */
+ code: CodeableConcept;
+ /**
+ * Supporting information
+ * */
+ detail: Reference;
+ };
+ /**
+ * Description and context
+ * */
+ detail: string;
+ /**
+ * Authority for issue
+ * */
+ reference: string;
+ /**
+ * Step taken to address
+ * */
+ mitigation: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * What mitigation?
+ * */
+ action: CodeableConcept;
+ /**
+ * Date committed
+ * */
+ date: string;
+ /**
+ * Who is committing?
+ * */
+ author: Reference;
+ };
+};
+
+type DetectedIssue__lookups = {
+ "DetectedIssue": DetectedIssue_DetectedIssue_Props;
+};
+
+export declare function detectedIssue(type: T, props: DetectedIssue__lookups[T]);;
+
+type Device_Device_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Instance identifier
+ * */
+ identifier: Identifier;
+ /**
+ * The reference to the definition for the device
+ * */
+ definition: Reference;
+ /**
+ * Unique Device Identifier (UDI) Barcode string
+ * */
+ udiCarrier: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Mandatory fixed portion of UDI
+ * */
+ deviceIdentifier: string;
+ /**
+ * UDI Issuing Organization
+ * */
+ issuer: string;
+ /**
+ * Regional UDI authority
+ * */
+ jurisdiction: string;
+ /**
+ * UDI Machine Readable Barcode String
+ * */
+ carrierAIDC: base64Binary;
+ /**
+ * UDI Human Readable Barcode String
+ * */
+ carrierHRF: string;
+ /**
+ * barcode | rfid | manual +
+ * */
+ entryType: string;
+ };
+ /**
+ * active | inactive | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * online | paused | standby | offline | not-ready | transduc-discon | hw-discon | off
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * The distinct identification string
+ * */
+ distinctIdentifier: string;
+ /**
+ * Name of device manufacturer
+ * */
+ manufacturer: string;
+ /**
+ * Date when the device was made
+ * */
+ manufactureDate: string;
+ /**
+ * Date and time of expiry of this device (if applicable)
+ * */
+ expirationDate: string;
+ /**
+ * Lot number of manufacture
+ * */
+ lotNumber: string;
+ /**
+ * Serial number assigned by the manufacturer
+ * */
+ serialNumber: string;
+ /**
+ * The name of the device as given by the manufacturer
+ * */
+ deviceName: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The name that identifies the device
+ * */
+ name: string;
+ /**
+ * udi-label-name | user-friendly-name | patient-reported-name | manufacturer-name | model-name | other
+ * */
+ type: string;
+ };
+ /**
+ * The manufacturer's model number for the device
+ * */
+ modelNumber: string;
+ /**
+ * The part number or catalog number of the device
+ * */
+ partNumber: string;
+ /**
+ * The kind or type of device
+ * */
+ type: CodeableConcept;
+ /**
+ * The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication
+ * */
+ specialization: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The standard that is used to operate and communicate
+ * */
+ systemType: CodeableConcept;
+ /**
+ * The version of the standard that is used to operate and communicate
+ * */
+ version: string;
+ };
+ /**
+ * The actual design of the device or software version running on the device
+ * */
+ version: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The type of the device version, e.g. manufacturer, approved, internal
+ * */
+ type: CodeableConcept;
+ /**
+ * A single component of the device version
+ * */
+ component: Identifier;
+ /**
+ * The version text
+ * */
+ value: string;
+ };
+ /**
+ * The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties
+ * */
+ property: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Code that specifies the property DeviceDefinitionPropetyCode (Extensible)
+ * */
+ type: CodeableConcept;
+ /**
+ * Property value as a quantity
+ * */
+ valueQuantity: Quantity;
+ /**
+ * Property value as a code, e.g., NTP4 (synced to NTP)
+ * */
+ valueCode: CodeableConcept;
+ };
+ /**
+ * Patient to whom Device is affixed
+ * */
+ patient: Reference;
+ /**
+ * Organization responsible for device
+ * */
+ owner: Reference;
+ /**
+ * Details for human/organization for support
+ * */
+ contact: ContactPoint;
+ /**
+ * Where the device is found
+ * */
+ location: Reference;
+ /**
+ * Network address to contact device
+ * */
+ url: string;
+ /**
+ * Device notes and comments
+ * */
+ note: Annotation;
+ /**
+ * Safety Characteristics of Device
+ * */
+ safety: CodeableConcept;
+ /**
+ * The device that this device is attached to or is part of
+ * */
+ parent: Reference;
+};
+
+type Device__lookups = {
+ "Device": Device_Device_Props;
+};
+
+export declare function device(type: T, props: Device__lookups[T]);;
+
+type DeviceDefinition_DeviceDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Instance identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Unique Device Identifier (UDI) Barcode string
+ * */
+ udiDeviceIdentifier: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The identifier that is to be associated with every Device that references this DeviceDefintiion for the issuer and jurisdication porvided in the DeviceDefinition.udiDeviceIdentifier
+ * */
+ deviceIdentifier: string;
+ /**
+ * The organization that assigns the identifier algorithm
+ * */
+ issuer: string;
+ /**
+ * The jurisdiction to which the deviceIdentifier applies
+ * */
+ jurisdiction: string;
+ };
+ /**
+ * Name of device manufacturer
+ * */
+ manufacturer: string;
+ /**
+ * A name given to the device to identify it
+ * */
+ deviceName: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The name of the device
+ * */
+ name: string;
+ /**
+ * udi-label-name | user-friendly-name | patient-reported-name | manufacturer-name | model-name | other
+ * */
+ type: string;
+ };
+ /**
+ * The model number for the device
+ * */
+ modelNumber: string;
+ /**
+ * What kind of device or device system this is
+ * */
+ type: CodeableConcept;
+ /**
+ * The capabilities supported on a device, the standards to which the device conforms for a particular purpose, and used for the communication
+ * */
+ specialization: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The standard that is used to operate and communicate
+ * */
+ systemType: string;
+ /**
+ * The version of the standard that is used to operate and communicate
+ * */
+ version: string;
+ };
+ /**
+ * Available versions
+ * */
+ version: string;
+ /**
+ * Safety characteristics of the device
+ * */
+ safety: CodeableConcept;
+ /**
+ * Shelf Life and storage information
+ * */
+ shelfLifeStorage: ProductShelfLife;
+ /**
+ * Dimensions, color etc.
+ * */
+ physicalCharacteristics: ProdCharacteristic;
+ /**
+ * Language code for the human-readable text strings produced by the device (all supported)
+ * */
+ languageCode: CodeableConcept;
+ /**
+ * Device capabilities
+ * */
+ capability: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of capability
+ * */
+ type: CodeableConcept;
+ /**
+ * Description of capability
+ * */
+ description: CodeableConcept;
+ };
+ /**
+ * The actual configuration settings of a device as it actually operates, e.g., regulation status, time properties
+ * */
+ property: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Code that specifies the property DeviceDefinitionPropetyCode (Extensible)
+ * */
+ type: CodeableConcept;
+ /**
+ * Property value as a quantity
+ * */
+ valueQuantity: Quantity;
+ /**
+ * Property value as a code, e.g., NTP4 (synced to NTP)
+ * */
+ valueCode: CodeableConcept;
+ };
+ /**
+ * Organization responsible for device
+ * */
+ owner: Reference;
+ /**
+ * Details for human/organization for support
+ * */
+ contact: ContactPoint;
+ /**
+ * Network address to contact device
+ * */
+ url: string;
+ /**
+ * Access to on-line information
+ * */
+ onlineInformation: string;
+ /**
+ * Device notes and comments
+ * */
+ note: Annotation;
+ /**
+ * The quantity of the device present in the packaging (e.g. the number of devices present in a pack, or the number of devices in the same package of the medicinal product)
+ * */
+ quantity: Quantity;
+ /**
+ * The parent device it can be part of
+ * */
+ parentDevice: Reference;
+ /**
+ * A substance used to create the material(s) of which the device is made
+ * */
+ material: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The substance
+ * */
+ substance: CodeableConcept;
+ /**
+ * Indicates an alternative material of the device
+ * */
+ alternate: boolean;
+ /**
+ * Whether the substance is a known or suspected allergen
+ * */
+ allergenicIndicator: boolean;
+ };
+};
+
+type DeviceDefinition__lookups = {
+ "DeviceDefinition": DeviceDefinition_DeviceDefinition_Props;
+};
+
+export declare function deviceDefinition(type: T, props: DeviceDefinition__lookups[T]);;
+
+type DeviceMetric_DeviceMetric_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Instance identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Identity of metric, for example Heart Rate or PEEP Setting
+ * */
+ type: CodeableConcept;
+ /**
+ * Unit of Measure for the Metric
+ * */
+ unit: CodeableConcept;
+ /**
+ * Describes the link to the source Device
+ * */
+ source: Reference;
+ /**
+ * Describes the link to the parent Device
+ * */
+ parent: Reference;
+ /**
+ * on | off | standby | entered-in-error
+ * */
+ operationalStatus: string;
+ /**
+ * black | red | green | yellow | blue | magenta | cyan | white
+ * */
+ color: string;
+ /**
+ * measurement | setting | calculation | unspecified
+ * */
+ category: string;
+ /**
+ * Describes the measurement repetition time
+ * */
+ measurementPeriod: Timing;
+ /**
+ * Describes the calibrations that have been performed or that are required to be performed
+ * */
+ calibration: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * unspecified | offset | gain | two-point
+ * */
+ type: string;
+ /**
+ * not-calibrated | calibration-required | calibrated | unspecified
+ * */
+ state: string;
+ /**
+ * Describes the time last calibration has been performed
+ * */
+ time: string;
+ };
+};
+
+type DeviceMetric__lookups = {
+ "DeviceMetric": DeviceMetric_DeviceMetric_Props;
+};
+
+export declare function deviceMetric(type: T, props: DeviceMetric__lookups[T]);;
+
+type DeviceRequest_DeviceRequest_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Request identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Instantiates FHIR protocol or definition
+ * */
+ instantiatesCanonical: any;
+ /**
+ * Instantiates external protocol or definition
+ * */
+ instantiatesUri: string;
+ /**
+ * What request fulfills
+ * */
+ basedOn: Reference;
+ /**
+ * What request replaces
+ * */
+ priorRequest: Reference;
+ /**
+ * Identifier of composite request
+ * */
+ groupIdentifier: Identifier;
+ /**
+ * draft | active | on-hold | revoked | completed | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
+ * */
+ intent: string;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * Device requested
+ * */
+ code: Reference;
+ /**
+ * Device details
+ * */
+ parameter: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Device detail
+ * */
+ code: CodeableConcept;
+ /**
+ * Value of detail
+ * */
+ value: CodeableConcept;
+ };
+ /**
+ * Focus of request
+ * */
+ subject: Reference;
+ /**
+ * Encounter motivating request
+ * */
+ encounter: Reference;
+ /**
+ * Desired time or schedule for use
+ * */
+ occurrence: string;
+ /**
+ * When recorded
+ * */
+ authoredOn: string;
+ /**
+ * Who/what is requesting diagnostics
+ * */
+ requester: Reference;
+ /**
+ * Filler role
+ * */
+ performerType: CodeableConcept;
+ /**
+ * Requested Filler
+ * */
+ performer: Reference;
+ /**
+ * Coded Reason for request
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Linked Reason for request
+ * */
+ reasonReference: Reference;
+ /**
+ * Associated insurance coverage
+ * */
+ insurance: Reference;
+ /**
+ * Additional clinical information
+ * */
+ supportingInfo: Reference;
+ /**
+ * Notes or comments
+ * */
+ note: Annotation;
+ /**
+ * Request provenance
+ * */
+ relevantHistory: Reference;
+};
+
+type DeviceRequest__lookups = {
+ "DeviceRequest": DeviceRequest_DeviceRequest_Props;
+};
+
+export declare function deviceRequest(type: T, props: DeviceRequest__lookups[T]);;
+
+type DeviceUseStatement_DeviceUseStatement_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External identifier for this record
+ * */
+ identifier: Identifier;
+ /**
+ * Fulfills plan, proposal or order
+ * */
+ basedOn: Reference;
+ /**
+ * active | completed | entered-in-error +
+ * */
+ status: string;
+ /**
+ * Patient using device
+ * */
+ subject: Reference;
+ /**
+ * Supporting information
+ * */
+ derivedFrom: Reference;
+ /**
+ * How often the device was used
+ * */
+ timing: Timing;
+ /**
+ * When statement was recorded
+ * */
+ recordedOn: string;
+ /**
+ * Who made the statement
+ * */
+ source: Reference;
+ /**
+ * Reference to device used
+ * */
+ device: Reference;
+ /**
+ * Why device was used
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why was DeviceUseStatement performed?
+ * */
+ reasonReference: Reference;
+ /**
+ * Target body site
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * Addition details (comments, instructions)
+ * */
+ note: Annotation;
+};
+
+type DeviceUseStatement__lookups = {
+ "DeviceUseStatement": DeviceUseStatement_DeviceUseStatement_Props;
+};
+
+export declare function deviceUseStatement(type: T, props: DeviceUseStatement__lookups[T]);;
+
+type DiagnosticReport_DiagnosticReport_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier for report
+ * */
+ identifier: Identifier;
+ /**
+ * What was requested
+ * */
+ basedOn: Reference;
+ /**
+ * registered | partial | preliminary | final +
+ * */
+ status: string;
+ /**
+ * Service category
+ * */
+ category: CodeableConcept;
+ /**
+ * Name/Code for this diagnostic report
+ * */
+ code: CodeableConcept;
+ /**
+ * The subject of the report - usually, but not always, the patient
+ * */
+ subject: Reference;
+ /**
+ * Health care event when test ordered
+ * */
+ encounter: Reference;
+ /**
+ * Clinically relevant time/time-period for report
+ * */
+ effective: string;
+ /**
+ * DateTime this version was made
+ * */
+ issued: string;
+ /**
+ * Responsible Diagnostic Service
+ * */
+ performer: Reference;
+ /**
+ * Primary result interpreter
+ * */
+ resultsInterpreter: Reference;
+ /**
+ * Specimens this report is based on
+ * */
+ specimen: Reference;
+ /**
+ * Observations
+ * */
+ result: Reference;
+ /**
+ * Reference to full details of imaging associated with the diagnostic report
+ * */
+ imagingStudy: Reference;
+ /**
+ * Key images associated with this report
+ * */
+ media: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Comment about the image (e.g. explanation)
+ * */
+ comment: string;
+ /**
+ * Reference to the image source
+ * */
+ link: Reference;
+ };
+ /**
+ * Clinical conclusion (interpretation) of test results
+ * */
+ conclusion: string;
+ /**
+ * Codes for the clinical conclusion of test results
+ * */
+ conclusionCode: CodeableConcept;
+ /**
+ * Entire report as issued
+ * */
+ presentedForm: Attachment;
+};
+
+type DiagnosticReport__lookups = {
+ "DiagnosticReport": DiagnosticReport_DiagnosticReport_Props;
+};
+
+export declare function diagnosticReport(type: T, props: DiagnosticReport__lookups[T]);;
+
+type DocumentManifest_DocumentManifest_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique Identifier for the set of documents
+ * */
+ masterIdentifier: Identifier;
+ /**
+ * Other identifiers for the manifest
+ * */
+ identifier: Identifier;
+ /**
+ * current | superseded | entered-in-error
+ * */
+ status: string;
+ /**
+ * Kind of document set
+ * */
+ type: CodeableConcept;
+ /**
+ * The subject of the set of documents
+ * */
+ subject: Reference;
+ /**
+ * When this document manifest created
+ * */
+ created: string;
+ /**
+ * Who and/or what authored the DocumentManifest
+ * */
+ author: Reference;
+ /**
+ * Intended to get notified about this set of documents
+ * */
+ recipient: Reference;
+ /**
+ * The source system/application/software
+ * */
+ source: string;
+ /**
+ * Human-readable description (title)
+ * */
+ description: string;
+ /**
+ * Items in manifest
+ * */
+ content: Reference;
+ /**
+ * Related things
+ * */
+ related: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifiers of things that are related
+ * */
+ identifier: Identifier;
+ /**
+ * Related Resource
+ * */
+ ref: Reference;
+ };
+};
+
+type DocumentManifest__lookups = {
+ "DocumentManifest": DocumentManifest_DocumentManifest_Props;
+};
+
+export declare function documentManifest(type: T, props: DocumentManifest__lookups[T]);;
+
+type DocumentReference_DocumentReference_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Master Version Specific Identifier
+ * */
+ masterIdentifier: Identifier;
+ /**
+ * Other identifiers for the document
+ * */
+ identifier: Identifier;
+ /**
+ * current | superseded | entered-in-error
+ * */
+ status: string;
+ /**
+ * preliminary | final | amended | entered-in-error
+ * */
+ docStatus: string;
+ /**
+ * Kind of document (LOINC if possible)
+ * */
+ type: CodeableConcept;
+ /**
+ * Categorization of document
+ * */
+ category: CodeableConcept;
+ /**
+ * Who/what is the subject of the document
+ * */
+ subject: Reference;
+ /**
+ * When this document reference was created
+ * */
+ date: string;
+ /**
+ * Who and/or what authored the document
+ * */
+ author: Reference;
+ /**
+ * Who/what authenticated the document
+ * */
+ authenticator: Reference;
+ /**
+ * Organization which maintains the document
+ * */
+ custodian: Reference;
+ /**
+ * Relationships to other documents
+ * */
+ relatesTo: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * replaces | transforms | signs | appends
+ * */
+ code: string;
+ /**
+ * Target of the relationship
+ * */
+ target: Reference;
+ };
+ /**
+ * Human-readable description
+ * */
+ description: string;
+ /**
+ * Document security-tags
+ * */
+ securityLabel: CodeableConcept;
+ /**
+ * Document referenced
+ * */
+ content: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Where to access the document
+ * */
+ attachment: Attachment;
+ /**
+ * Format/content rules for the document
+ * */
+ format: Coding;
+ };
+ /**
+ * Clinical context of document
+ * */
+ context: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Context of the document content
+ * */
+ encounter: Reference;
+ /**
+ * Main clinical acts documented
+ * */
+ event: CodeableConcept;
+ /**
+ * Time of service that is being documented
+ * */
+ period: Period;
+ /**
+ * Kind of facility where patient was seen
+ * */
+ facilityType: CodeableConcept;
+ /**
+ * Additional details about where the content was created (e.g. clinical specialty)
+ * */
+ practiceSetting: CodeableConcept;
+ /**
+ * Patient demographics from source
+ * */
+ sourcePatientInfo: Reference;
+ /**
+ * Related identifiers or resources
+ * */
+ related: Reference;
+ };
+};
+
+type DocumentReference__lookups = {
+ "DocumentReference": DocumentReference_DocumentReference_Props;
+};
+
+export declare function documentReference(type: T, props: DocumentReference__lookups[T]);;
+
+type DomainResource_DomainResource_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+};
+
+type DomainResource__lookups = {
+ "DomainResource": DomainResource_DomainResource_Props;
+};
+
+export declare function domainResource(type: T, props: DomainResource__lookups[T]);;
+
+type Encounter_Encounter_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifier(s) by which this encounter is known
+ * */
+ identifier: Identifier;
+ /**
+ * planned | arrived | triaged | in-progress | onleave | finished | cancelled +
+ * */
+ status: string;
+ /**
+ * List of past encounter statuses
+ * */
+ statusHistory: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * planned | arrived | triaged | in-progress | onleave | finished | cancelled +
+ * */
+ status: string;
+ /**
+ * The time that the episode was in the specified status
+ * */
+ period: Period;
+ };
+ /**
+ * Classification of patient encounter
+ * */
+ class: Coding;
+ /**
+ * List of past encounter classes
+ * */
+ classHistory: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * inpatient | outpatient | ambulatory | emergency +
+ * */
+ class: Coding;
+ /**
+ * The time that the episode was in the specified class
+ * */
+ period: Period;
+ };
+ /**
+ * Specific type of encounter
+ * */
+ type: CodeableConcept;
+ /**
+ * Specific type of service
+ * */
+ serviceType: CodeableConcept;
+ /**
+ * Indicates the urgency of the encounter
+ * */
+ priority: CodeableConcept;
+ /**
+ * The patient or group present at the encounter
+ * */
+ subject: Reference;
+ /**
+ * Episode(s) of care that this encounter should be recorded against
+ * */
+ episodeOfCare: Reference;
+ /**
+ * The ServiceRequest that initiated this encounter
+ * */
+ basedOn: Reference;
+ /**
+ * List of participants involved in the encounter
+ * */
+ participant: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Role of participant in encounter
+ * */
+ type: CodeableConcept;
+ /**
+ * Period of time during the encounter that the participant participated
+ * */
+ period: Period;
+ /**
+ * Persons involved in the encounter other than the patient
+ * */
+ individual: Reference;
+ };
+ /**
+ * The appointment that scheduled this encounter
+ * */
+ appointment: Reference;
+ /**
+ * The start and end time of the encounter
+ * */
+ period: Period;
+ /**
+ * Quantity of time the encounter lasted (less time absent)
+ * */
+ length: Duration;
+ /**
+ * Coded reason the encounter takes place
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Reason the encounter takes place (reference)
+ * */
+ reasonReference: Reference;
+ /**
+ * The list of diagnosis relevant to this encounter
+ * */
+ diagnosis: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The diagnosis or procedure relevant to the encounter
+ * */
+ condition: Reference;
+ /**
+ * Role that this diagnosis has within the encounter (e.g. admission, billing, discharge …)
+ * */
+ use: CodeableConcept;
+ /**
+ * Ranking of the diagnosis (for each role type)
+ * */
+ rank: number;
+ };
+ /**
+ * The set of accounts that may be used for billing for this Encounter
+ * */
+ account: Reference;
+ /**
+ * Details about the admission to a healthcare service
+ * */
+ hospitalization: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Pre-admission identifier
+ * */
+ preAdmissionIdentifier: Identifier;
+ /**
+ * The location/organization from which the patient came before admission
+ * */
+ origin: Reference;
+ /**
+ * From where patient was admitted (physician referral, transfer)
+ * */
+ admitSource: CodeableConcept;
+ /**
+ * The type of hospital re-admission that has occurred (if any). If the value is absent, then this is not identified as a readmission
+ * */
+ reAdmission: CodeableConcept;
+ /**
+ * Diet preferences reported by the patient
+ * */
+ dietPreference: CodeableConcept;
+ /**
+ * Special courtesies (VIP, board member)
+ * */
+ specialCourtesy: CodeableConcept;
+ /**
+ * Wheelchair, translator, stretcher, etc.
+ * */
+ specialArrangement: CodeableConcept;
+ /**
+ * Location/organization to which the patient is discharged
+ * */
+ destination: Reference;
+ /**
+ * Category or kind of location after discharge
+ * */
+ dischargeDisposition: CodeableConcept;
+ };
+ /**
+ * List of locations where the patient has been
+ * */
+ location: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Location the encounter takes place
+ * */
+ location: Reference;
+ /**
+ * planned | active | reserved | completed
+ * */
+ status: string;
+ /**
+ * The physical type of the location (usually the level in the location hierachy - bed room ward etc.)
+ * */
+ physicalType: CodeableConcept;
+ /**
+ * Time period during which the patient was present at the location
+ * */
+ period: Period;
+ };
+ /**
+ * The organization (facility) responsible for this encounter
+ * */
+ serviceProvider: Reference;
+ /**
+ * Another Encounter this encounter is part of
+ * */
+ partOf: Reference;
+};
+
+type Encounter__lookups = {
+ "Encounter": Encounter_Encounter_Props;
+};
+
+export declare function encounter(type: T, props: Encounter__lookups[T]);;
+
+type Endpoint_Endpoint_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifies this endpoint across multiple systems
+ * */
+ identifier: Identifier;
+ /**
+ * active | suspended | error | off | entered-in-error | test
+ * */
+ status: string;
+ /**
+ * Protocol/Profile/Standard to be used with this endpoint connection
+ * */
+ connectionType: Coding;
+ /**
+ * A name that this endpoint can be identified by
+ * */
+ name: string;
+ /**
+ * Organization that manages this endpoint (might not be the organization that exposes the endpoint)
+ * */
+ managingOrganization: Reference;
+ /**
+ * Contact details for source (e.g. troubleshooting)
+ * */
+ contact: ContactPoint;
+ /**
+ * Interval the endpoint is expected to be operational
+ * */
+ period: Period;
+ /**
+ * The type of content that may be used at this endpoint (e.g. XDS Discharge summaries)
+ * */
+ payloadType: CodeableConcept;
+ /**
+ * Mimetype to send. If not specified, the content could be anything (including no payload, if the connectionType defined this)
+ * */
+ payloadMimeType: string;
+ /**
+ * The technical base address for connecting to this endpoint
+ * */
+ address: url;
+ /**
+ * Usage depends on the channel type
+ * */
+ header: string;
+};
+
+type Endpoint__lookups = {
+ "Endpoint": Endpoint_Endpoint_Props;
+};
+
+export declare function endpoint(type: T, props: Endpoint__lookups[T]);;
+
+type EnrollmentRequest_EnrollmentRequest_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * Creation date
+ * */
+ created: string;
+ /**
+ * Target
+ * */
+ insurer: Reference;
+ /**
+ * Responsible practitioner
+ * */
+ provider: Reference;
+ /**
+ * The subject to be enrolled
+ * */
+ candidate: Reference;
+ /**
+ * Insurance information
+ * */
+ coverage: Reference;
+};
+
+type EnrollmentRequest__lookups = {
+ "EnrollmentRequest": EnrollmentRequest_EnrollmentRequest_Props;
+};
+
+export declare function enrollmentRequest(type: T, props: EnrollmentRequest__lookups[T]);;
+
+type EnrollmentResponse_EnrollmentResponse_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * Claim reference
+ * */
+ request: Reference;
+ /**
+ * queued | complete | error | partial
+ * */
+ outcome: string;
+ /**
+ * Disposition Message
+ * */
+ disposition: string;
+ /**
+ * Creation date
+ * */
+ created: string;
+ /**
+ * Insurer
+ * */
+ organization: Reference;
+ /**
+ * Responsible practitioner
+ * */
+ requestProvider: Reference;
+};
+
+type EnrollmentResponse__lookups = {
+ "EnrollmentResponse": EnrollmentResponse_EnrollmentResponse_Props;
+};
+
+export declare function enrollmentResponse(type: T, props: EnrollmentResponse__lookups[T]);;
+
+type EpisodeOfCare_EpisodeOfCare_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier(s) relevant for this EpisodeOfCare
+ * */
+ identifier: Identifier;
+ /**
+ * planned | waitlist | active | onhold | finished | cancelled | entered-in-error
+ * */
+ status: string;
+ /**
+ * Past list of status codes (the current status may be included to cover the start date of the status)
+ * */
+ statusHistory: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * planned | waitlist | active | onhold | finished | cancelled | entered-in-error
+ * */
+ status: string;
+ /**
+ * Duration the EpisodeOfCare was in the specified status
+ * */
+ period: Period;
+ };
+ /**
+ * Type/class - e.g. specialist referral, disease management
+ * */
+ type: CodeableConcept;
+ /**
+ * The list of diagnosis relevant to this episode of care
+ * */
+ diagnosis: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Conditions/problems/diagnoses this episode of care is for
+ * */
+ condition: Reference;
+ /**
+ * Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge …)
+ * */
+ role: CodeableConcept;
+ /**
+ * Ranking of the diagnosis (for each role type)
+ * */
+ rank: number;
+ };
+ /**
+ * The patient who is the focus of this episode of care
+ * */
+ patient: Reference;
+ /**
+ * Organization that assumes care
+ * */
+ managingOrganization: Reference;
+ /**
+ * Interval during responsibility is assumed
+ * */
+ period: Period;
+ /**
+ * Originating Referral Request(s)
+ * */
+ referralRequest: Reference;
+ /**
+ * Care manager/care coordinator for the patient
+ * */
+ careManager: Reference;
+ /**
+ * Other practitioners facilitating this episode of care
+ * */
+ team: Reference;
+ /**
+ * The set of accounts that may be used for billing for this EpisodeOfCare
+ * */
+ account: Reference;
+};
+
+type EpisodeOfCare__lookups = {
+ "EpisodeOfCare": EpisodeOfCare_EpisodeOfCare_Props;
+};
+
+export declare function episodeOfCare(type: T, props: EpisodeOfCare__lookups[T]);;
+
+type EventDefinition_EventDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this event definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the event definition
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the event definition
+ * */
+ version: string;
+ /**
+ * Name for this event definition (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this event definition (human friendly)
+ * */
+ title: string;
+ /**
+ * Subordinate title of the event definition
+ * */
+ subtitle: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Type of individual the event definition is focused on
+ * */
+ subject: CodeableConcept;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the event definition
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for event definition (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this event definition is defined
+ * */
+ purpose: markdown;
+ /**
+ * Describes the clinical usage of the event definition
+ * */
+ usage: string;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * When the event definition was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the event definition was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * When the event definition is expected to be used
+ * */
+ effectivePeriod: Period;
+ /**
+ * E.g. Education, Treatment, Assessment, etc.
+ * */
+ topic: CodeableConcept;
+ /**
+ * Who authored the content
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the content
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the content
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the content
+ * */
+ endorser: ContactDetail;
+ /**
+ * Additional documentation, citations, etc.
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * "when" the event occurs (multiple = 'or')
+ * */
+ trigger: TriggerDefinition;
+};
+
+type EventDefinition__lookups = {
+ "EventDefinition": EventDefinition_EventDefinition_Props;
+};
+
+export declare function eventDefinition(type: T, props: EventDefinition__lookups[T]);;
+
+type Evidence_Evidence_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this evidence, represented as a globally unique URI
+ * */
+ url: string;
+ /**
+ * Additional identifier for the summary
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of this summary
+ * */
+ version: string;
+ /**
+ * Name for this summary (human friendly)
+ * */
+ title: string;
+ /**
+ * Citation for this evidence
+ * */
+ citeAs: Reference;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * When the summary was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the summary was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Who authored the content
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the content
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the content
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the content
+ * */
+ endorser: ContactDetail;
+ /**
+ * Link or citation to artifact associated with the summary
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * Description of the particular summary
+ * */
+ description: markdown;
+ /**
+ * Declarative description of the Evidence
+ * */
+ assertion: markdown;
+ /**
+ * Footnotes and/or explanatory notes
+ * */
+ note: Annotation;
+ /**
+ * Evidence variable such as population, exposure, or outcome
+ * */
+ variableDefinition: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A text description or summary of the variable
+ * */
+ description: markdown;
+ /**
+ * Footnotes and/or explanatory notes
+ * */
+ note: Annotation;
+ /**
+ * population | subpopulation | exposure | referenceExposure | measuredVariable | confounder
+ * */
+ variableRole: CodeableConcept;
+ /**
+ * Definition of the actual variable related to the statistic(s)
+ * */
+ observed: Reference;
+ /**
+ * Definition of the intended variable related to the Evidence
+ * */
+ intended: Reference;
+ /**
+ * low | moderate | high | exact
+ * */
+ directnessMatch: CodeableConcept;
+ };
+ /**
+ * The method to combine studies
+ * */
+ synthesisType: CodeableConcept;
+ /**
+ * The type of study that produced this evidence
+ * */
+ studyType: CodeableConcept;
+ /**
+ * Values and parameters for a single statistic
+ * */
+ statistic: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Description of content
+ * */
+ description: string;
+ /**
+ * Footnotes and/or explanatory notes
+ * */
+ note: Annotation;
+ /**
+ * Type of statistic, eg relative risk
+ * */
+ statisticType: CodeableConcept;
+ /**
+ * Associated category for categorical variable
+ * */
+ category: CodeableConcept;
+ /**
+ * Statistic value
+ * */
+ quantity: Quantity;
+ /**
+ * The number of events associated with the statistic
+ * */
+ numberOfEvents: number;
+ /**
+ * The number of participants affected
+ * */
+ numberAffected: number;
+ /**
+ * Number of participants with known results for measured variables
+ * */
+ sampleSize: number;
+ /**
+ * Lower and upper bound values of the attribute estimate
+ * */
+ attributeEstimate: Range;
+ /**
+ * Range of values for grouping of ordinal or polychotomous variables
+ * */
+ modelCharacteristic: Range;
+ };
+ /**
+ * Certainty or quality of the evidence
+ * */
+ certainty: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Textual description of certainty
+ * */
+ description: string;
+ /**
+ * Footnotes and/or explanatory notes
+ * */
+ note: Annotation;
+ /**
+ * Aspect of certainty being rated
+ * */
+ type: CodeableConcept;
+ /**
+ * Assessment or judgement of the aspect
+ * */
+ rating: CodeableConcept;
+ /**
+ * Individual or group who did the rating
+ * */
+ rater: string;
+ };
+};
+
+type Evidence__lookups = {
+ "Evidence": Evidence_Evidence_Props;
+};
+
+export declare function evidence(type: T, props: Evidence__lookups[T]);;
+
+type EvidenceReport_EvidenceReport_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this EvidenceReport, represented as a globally unique URI
+ * */
+ url: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Unique identifier for the evidence report
+ * */
+ identifier: Identifier;
+ /**
+ * Identifiers for articles that may relate to more than one evidence report
+ * */
+ relatedIdentifier: Identifier;
+ /**
+ * Citation for this report
+ * */
+ citeAs: Reference;
+ /**
+ * Kind of report
+ * */
+ type: CodeableConcept;
+ /**
+ * Used for footnotes and annotations
+ * */
+ note: Annotation;
+ /**
+ * Link, description or reference to artifact associated with the report
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * Focus of the report
+ * */
+ subject: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Timeframe for the characteristic
+ * */
+ characteristic: Period;
+ /**
+ * Footnotes and/or explanatory notes
+ * */
+ note: Annotation;
+ };
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Who authored the content
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the content
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the content
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the content
+ * */
+ endorser: ContactDetail;
+ /**
+ * Relationships to other compositions/documents
+ * */
+ relatesTo: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * replaces | amends | appends | transforms | replacedWith | amendedWith | appendedWith | transformedWith
+ * */
+ code: string;
+ /**
+ * Target of the relationship
+ * */
+ target: Identifier;
+ };
+ /**
+ * Composition is broken into sections
+ * */
+ section: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Label for section (e.g. for ToC)
+ * */
+ title: string;
+ /**
+ * Classification of section (recommended)
+ * */
+ focus: CodeableConcept;
+ /**
+ * Classification of section by Resource
+ * */
+ focusReference: Reference;
+ /**
+ * Who and/or what authored the section
+ * */
+ author: Reference;
+ /**
+ * Text summary of the section, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * working | snapshot | changes
+ * */
+ mode: string;
+ /**
+ * Order of section entries
+ * */
+ orderedBy: CodeableConcept;
+ /**
+ * Extensible classifiers as content
+ * */
+ entryClassifier: CodeableConcept;
+ /**
+ * Reference to resources as content
+ * */
+ entryReference: Reference;
+ /**
+ * Quantity as content
+ * */
+ entryQuantity: Quantity;
+ /**
+ * Why the section is empty
+ * */
+ emptyReason: CodeableConcept;
+ };
+};
+
+type EvidenceReport__lookups = {
+ "EvidenceReport": EvidenceReport_EvidenceReport_Props;
+};
+
+export declare function evidenceReport(type: T, props: EvidenceReport__lookups[T]);;
+
+type EvidenceVariable_EvidenceVariable_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this evidence variable, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the evidence variable
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the evidence variable
+ * */
+ version: string;
+ /**
+ * Name for this evidence variable (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this evidence variable (human friendly)
+ * */
+ title: string;
+ /**
+ * Title for use in informal contexts
+ * */
+ shortTitle: string;
+ /**
+ * Subordinate title of the EvidenceVariable
+ * */
+ subtitle: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Natural language description of the evidence variable
+ * */
+ description: markdown;
+ /**
+ * Used for footnotes or explanatory notes
+ * */
+ note: Annotation;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Who authored the content
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the content
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the content
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the content
+ * */
+ endorser: ContactDetail;
+ /**
+ * Additional documentation, citations, etc.
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * Actual or conceptual
+ * */
+ actual: boolean;
+ /**
+ * intersection | union
+ * */
+ characteristicCombination: string;
+ /**
+ * What defines the members of the evidence element
+ * */
+ characteristic: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Natural language description of the characteristic
+ * */
+ description: string;
+ /**
+ * What code or expression defines members?
+ * */
+ definition: Reference;
+ /**
+ * Method used for describing characteristic
+ * */
+ method: CodeableConcept;
+ /**
+ * Device used for determining characteristic
+ * */
+ device: Reference;
+ /**
+ * Whether the characteristic includes or excludes members
+ * */
+ exclude: boolean;
+ /**
+ * Used for footnotes or explanatory notes
+ * */
+ timeFromStart: Annotation;
+ /**
+ * mean | median | mean-of-mean | mean-of-median | median-of-mean | median-of-median
+ * */
+ groupMeasure: string;
+ };
+ /**
+ * continuous | dichotomous | ordinal | polychotomous
+ * */
+ handling: string;
+ /**
+ * A grouping for ordinal or polychotomous variables
+ * */
+ category: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Description of the grouping
+ * */
+ name: string;
+ /**
+ * Definition of the grouping
+ * */
+ value: CodeableConcept;
+ };
+};
+
+type EvidenceVariable__lookups = {
+ "EvidenceVariable": EvidenceVariable_EvidenceVariable_Props;
+};
+
+export declare function evidenceVariable(type: T, props: EvidenceVariable__lookups[T]);;
+
+type ExampleScenario_ExampleScenario_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this example scenario, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the example scenario
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the example scenario
+ * */
+ version: string;
+ /**
+ * Name for this example scenario (computer friendly)
+ * */
+ name: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for example scenario (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * The purpose of the example, e.g. to illustrate a scenario
+ * */
+ purpose: markdown;
+ /**
+ * Actor participating in the resource
+ * */
+ actor: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * ID or acronym of the actor
+ * */
+ actorId: string;
+ /**
+ * person | entity
+ * */
+ type: string;
+ /**
+ * The name of the actor as shown in the page
+ * */
+ name: string;
+ /**
+ * The description of the actor
+ * */
+ description: markdown;
+ };
+ /**
+ * Each resource and each version that is present in the workflow
+ * */
+ instance: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The id of the resource for referencing
+ * */
+ resourceId: string;
+ /**
+ * The type of the resource
+ * */
+ resourceType: string;
+ /**
+ * A short name for the resource instance
+ * */
+ name: string;
+ /**
+ * Human-friendly description of the resource instance
+ * */
+ description: markdown;
+ /**
+ * The description of the resource version
+ * */
+ version: markdown;
+ /**
+ * A specific version of a resource contained in the instance
+ * */
+ containedInstance: string;
+ };
+ /**
+ * Each major process - a group of operations
+ * */
+ process: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The diagram title of the group of operations
+ * */
+ title: string;
+ /**
+ * A longer description of the group of operations
+ * */
+ description: markdown;
+ /**
+ * Description of initial status before the process starts
+ * */
+ preConditions: markdown;
+ /**
+ * Description of final status after the process ends
+ * */
+ postConditions: markdown;
+ /**
+ * A human-readable description of each option
+ * */
+ step: markdown;
+ };
+ /**
+ * Another nested workflow
+ * */
+ workflow: any;
+};
+
+type ExampleScenario__lookups = {
+ "ExampleScenario": ExampleScenario_ExampleScenario_Props;
+};
+
+export declare function exampleScenario(type: T, props: ExampleScenario__lookups[T]);;
+
+type ExplanationOfBenefit_ExplanationOfBenefit_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for the resource
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * Category or discipline
+ * */
+ type: CodeableConcept;
+ /**
+ * More granular claim type
+ * */
+ subType: CodeableConcept;
+ /**
+ * claim | preauthorization | predetermination
+ * */
+ use: string;
+ /**
+ * The recipient of the products and services
+ * */
+ patient: Reference;
+ /**
+ * Relevant time frame for the claim
+ * */
+ billablePeriod: Period;
+ /**
+ * Response creation date
+ * */
+ created: string;
+ /**
+ * Author of the claim
+ * */
+ enterer: Reference;
+ /**
+ * Party responsible for reimbursement
+ * */
+ insurer: Reference;
+ /**
+ * Party responsible for the claim
+ * */
+ provider: Reference;
+ /**
+ * Desired processing urgency
+ * */
+ priority: CodeableConcept;
+ /**
+ * For whom to reserve funds
+ * */
+ fundsReserveRequested: CodeableConcept;
+ /**
+ * Funds reserved status
+ * */
+ fundsReserve: CodeableConcept;
+ /**
+ * Prior or corollary claims
+ * */
+ related: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Reference to the related claim
+ * */
+ claim: Reference;
+ /**
+ * How the reference claim is related
+ * */
+ relationship: CodeableConcept;
+ /**
+ * File or case reference
+ * */
+ reference: Identifier;
+ };
+ /**
+ * Prescription authorizing services or products
+ * */
+ prescription: Reference;
+ /**
+ * Original prescription if superceded by fulfiller
+ * */
+ originalPrescription: Reference;
+ /**
+ * Recipient of benefits payable
+ * */
+ payee: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Category of recipient
+ * */
+ type: CodeableConcept;
+ /**
+ * Recipient reference
+ * */
+ party: Reference;
+ };
+ /**
+ * Treatment Referral
+ * */
+ referral: Reference;
+ /**
+ * Servicing Facility
+ * */
+ facility: Reference;
+ /**
+ * Claim reference
+ * */
+ claim: Reference;
+ /**
+ * Claim response reference
+ * */
+ claimResponse: Reference;
+ /**
+ * queued | complete | error | partial
+ * */
+ outcome: string;
+ /**
+ * Disposition Message
+ * */
+ disposition: string;
+ /**
+ * Preauthorization reference
+ * */
+ preAuthRef: string;
+ /**
+ * Preauthorization in-effect period
+ * */
+ preAuthRefPeriod: Period;
+ /**
+ * Care Team members
+ * */
+ careTeam: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Order of care team
+ * */
+ sequence: number;
+ /**
+ * Practitioner or organization
+ * */
+ provider: Reference;
+ /**
+ * Indicator of the lead practitioner
+ * */
+ responsible: boolean;
+ /**
+ * Function within the team
+ * */
+ role: CodeableConcept;
+ /**
+ * Practitioner credential or specialization
+ * */
+ qualification: CodeableConcept;
+ };
+ /**
+ * Supporting information
+ * */
+ supportingInfo: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Information instance identifier
+ * */
+ sequence: number;
+ /**
+ * Classification of the supplied information
+ * */
+ category: CodeableConcept;
+ /**
+ * Type of information
+ * */
+ code: CodeableConcept;
+ /**
+ * When it occurred
+ * */
+ timing: string;
+ /**
+ * Data to be provided
+ * */
+ value: boolean;
+ /**
+ * Explanation for the information
+ * */
+ reason: Coding;
+ };
+ /**
+ * Pertinent diagnosis information
+ * */
+ diagnosis: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Diagnosis instance identifier
+ * */
+ sequence: number;
+ /**
+ * Nature of illness or problem
+ * */
+ diagnosis: CodeableConcept;
+ /**
+ * Timing or nature of the diagnosis
+ * */
+ type: CodeableConcept;
+ /**
+ * Present on admission
+ * */
+ onAdmission: CodeableConcept;
+ /**
+ * Package billing code
+ * */
+ packageCode: CodeableConcept;
+ };
+ /**
+ * Clinical procedures performed
+ * */
+ procedure: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Procedure instance identifier
+ * */
+ sequence: number;
+ /**
+ * Category of Procedure
+ * */
+ type: CodeableConcept;
+ /**
+ * When the procedure was performed
+ * */
+ date: string;
+ /**
+ * Specific clinical procedure
+ * */
+ procedure: CodeableConcept;
+ /**
+ * Unique device identifier
+ * */
+ udi: Reference;
+ };
+ /**
+ * Precedence (primary, secondary, etc.)
+ * */
+ precedence: number;
+ /**
+ * Patient insurance information
+ * */
+ insurance: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Coverage to be used for adjudication
+ * */
+ focal: boolean;
+ /**
+ * Insurance information
+ * */
+ coverage: Reference;
+ /**
+ * Prior authorization reference number
+ * */
+ preAuthRef: string;
+ };
+ /**
+ * Details of the event
+ * */
+ accident: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * When the incident occurred
+ * */
+ date: string;
+ /**
+ * The nature of the accident
+ * */
+ type: CodeableConcept;
+ /**
+ * Where the event occurred
+ * */
+ location: Address;
+ };
+ /**
+ * Product or service provided
+ * */
+ item: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Item instance identifier
+ * */
+ sequence: number;
+ /**
+ * Applicable care team members
+ * */
+ careTeamSequence: number;
+ /**
+ * Applicable diagnoses
+ * */
+ diagnosisSequence: number;
+ /**
+ * Applicable procedures
+ * */
+ procedureSequence: number;
+ /**
+ * Applicable exception and supporting information
+ * */
+ informationSequence: number;
+ /**
+ * Revenue or cost center code
+ * */
+ revenue: CodeableConcept;
+ /**
+ * Benefit classification
+ * */
+ category: CodeableConcept;
+ /**
+ * Billing, service, product, or drug code
+ * */
+ productOrService: CodeableConcept;
+ /**
+ * Product or service billing modifiers
+ * */
+ modifier: CodeableConcept;
+ /**
+ * Program the product or service is provided under
+ * */
+ programCode: CodeableConcept;
+ /**
+ * Date or dates of service or product delivery
+ * */
+ serviced: string;
+ /**
+ * Place of service or where product was supplied
+ * */
+ location: CodeableConcept;
+ /**
+ * Count of products or services
+ * */
+ quantity: Quantity;
+ /**
+ * Fee, charge or cost per item
+ * */
+ unitPrice: Money;
+ /**
+ * Price scaling factor
+ * */
+ factor: number;
+ /**
+ * Total item cost
+ * */
+ net: Money;
+ /**
+ * Unique device identifier
+ * */
+ udi: Reference;
+ /**
+ * Anatomical location
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * Anatomical sub-location
+ * */
+ subSite: CodeableConcept;
+ /**
+ * Encounters related to this billed item
+ * */
+ encounter: Reference;
+ /**
+ * Applicable note numbers
+ * */
+ noteNumber: number;
+ /**
+ * Non-monitary value
+ * */
+ adjudication: number;
+ /**
+ * Applicable note numbers
+ * */
+ detail: number;
+ };
+ /**
+ * Insurer added line items
+ * */
+ addItem: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Item sequence number
+ * */
+ itemSequence: number;
+ /**
+ * Detail sequence number
+ * */
+ detailSequence: number;
+ /**
+ * Subdetail sequence number
+ * */
+ subDetailSequence: number;
+ /**
+ * Authorized providers
+ * */
+ provider: Reference;
+ /**
+ * Billing, service, product, or drug code
+ * */
+ productOrService: CodeableConcept;
+ /**
+ * Service/Product billing modifiers
+ * */
+ modifier: CodeableConcept;
+ /**
+ * Program the product or service is provided under
+ * */
+ programCode: CodeableConcept;
+ /**
+ * Date or dates of service or product delivery
+ * */
+ serviced: string;
+ /**
+ * Place of service or where product was supplied
+ * */
+ location: CodeableConcept;
+ /**
+ * Count of products or services
+ * */
+ quantity: Quantity;
+ /**
+ * Fee, charge or cost per item
+ * */
+ unitPrice: Money;
+ /**
+ * Price scaling factor
+ * */
+ factor: number;
+ /**
+ * Total item cost
+ * */
+ net: Money;
+ /**
+ * Anatomical location
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * Anatomical sub-location
+ * */
+ subSite: CodeableConcept;
+ /**
+ * Applicable note numbers
+ * */
+ noteNumber: number;
+ /**
+ * Applicable note numbers
+ * */
+ detail: number;
+ };
+ /**
+ * Header-level adjudication
+ * */
+ adjudication: any;
+ /**
+ * Adjudication totals
+ * */
+ total: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of adjudication information
+ * */
+ category: CodeableConcept;
+ /**
+ * Financial total for the category
+ * */
+ amount: Money;
+ };
+ /**
+ * Payment Details
+ * */
+ payment: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Partial or complete payment
+ * */
+ type: CodeableConcept;
+ /**
+ * Payment adjustment for non-claim issues
+ * */
+ adjustment: Money;
+ /**
+ * Explanation for the variance
+ * */
+ adjustmentReason: CodeableConcept;
+ /**
+ * Expected date of payment
+ * */
+ date: string;
+ /**
+ * Payable amount after adjustment
+ * */
+ amount: Money;
+ /**
+ * Business identifier for the payment
+ * */
+ identifier: Identifier;
+ };
+ /**
+ * Printed form identifier
+ * */
+ formCode: CodeableConcept;
+ /**
+ * Printed reference or actual form
+ * */
+ form: Attachment;
+ /**
+ * Note concerning adjudication
+ * */
+ processNote: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Note instance identifier
+ * */
+ number: number;
+ /**
+ * display | print | printoper
+ * */
+ type: string;
+ /**
+ * Note explanatory text
+ * */
+ text: string;
+ /**
+ * Language of the text
+ * */
+ language: CodeableConcept;
+ };
+ /**
+ * When the benefits are applicable
+ * */
+ benefitPeriod: Period;
+ /**
+ * Balance by Benefit Category
+ * */
+ benefitBalance: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Benefit classification
+ * */
+ category: CodeableConcept;
+ /**
+ * Excluded from the plan
+ * */
+ excluded: boolean;
+ /**
+ * Short name for the benefit
+ * */
+ name: string;
+ /**
+ * Description of the benefit or services covered
+ * */
+ description: string;
+ /**
+ * In or out of network
+ * */
+ network: CodeableConcept;
+ /**
+ * Individual or family
+ * */
+ unit: CodeableConcept;
+ /**
+ * Annual or lifetime
+ * */
+ term: CodeableConcept;
+ /**
+ * Benefits used
+ * */
+ financial: number;
+ };
+};
+
+type ExplanationOfBenefit__lookups = {
+ "ExplanationOfBenefit": ExplanationOfBenefit_ExplanationOfBenefit_Props;
+};
+
+export declare function explanationOfBenefit(type: T, props: ExplanationOfBenefit__lookups[T]);;
+
+type FamilyMemberHistory_FamilyMemberHistory_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Id(s) for this record
+ * */
+ identifier: Identifier;
+ /**
+ * Instantiates FHIR protocol or definition
+ * */
+ instantiatesCanonical: any;
+ /**
+ * Instantiates external protocol or definition
+ * */
+ instantiatesUri: string;
+ /**
+ * partial | completed | entered-in-error | health-unknown
+ * */
+ status: string;
+ /**
+ * subject-unknown | withheld | unable-to-obtain | deferred
+ * */
+ dataAbsentReason: CodeableConcept;
+ /**
+ * Patient history is about
+ * */
+ patient: Reference;
+ /**
+ * When history was recorded or last updated
+ * */
+ date: string;
+ /**
+ * The family member described
+ * */
+ name: string;
+ /**
+ * Relationship to the subject
+ * */
+ relationship: CodeableConcept;
+ /**
+ * male | female | other | unknown
+ * */
+ sex: CodeableConcept;
+ /**
+ * (approximate) date of birth
+ * */
+ born: Period;
+ /**
+ * (approximate) age
+ * */
+ age: Age;
+ /**
+ * Age is estimated?
+ * */
+ estimatedAge: boolean;
+ /**
+ * Dead? How old/when?
+ * */
+ deceased: boolean;
+ /**
+ * Why was family member history performed?
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why was family member history performed?
+ * */
+ reasonReference: Reference;
+ /**
+ * General note about related person
+ * */
+ note: Annotation;
+ /**
+ * Condition that the related person had
+ * */
+ condition: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Condition suffered by relation
+ * */
+ code: CodeableConcept;
+ /**
+ * deceased | permanent disability | etc.
+ * */
+ outcome: CodeableConcept;
+ /**
+ * Whether the condition contributed to the cause of death
+ * */
+ contributedToDeath: boolean;
+ /**
+ * When condition first manifested
+ * */
+ onset: Age;
+ /**
+ * Extra information about condition
+ * */
+ note: Annotation;
+ };
+};
+
+type FamilyMemberHistory__lookups = {
+ "FamilyMemberHistory": FamilyMemberHistory_FamilyMemberHistory_Props;
+};
+
+export declare function familyMemberHistory(type: T, props: FamilyMemberHistory__lookups[T]);;
+
+type Flag_Flag_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier
+ * */
+ identifier: Identifier;
+ /**
+ * active | inactive | entered-in-error
+ * */
+ status: string;
+ /**
+ * Clinical, administrative, etc.
+ * */
+ category: CodeableConcept;
+ /**
+ * Coded or textual message to display to user
+ * */
+ code: CodeableConcept;
+ /**
+ * Who/What is flag about?
+ * */
+ subject: Reference;
+ /**
+ * Time period when flag is active
+ * */
+ period: Period;
+ /**
+ * Alert relevant during encounter
+ * */
+ encounter: Reference;
+ /**
+ * Flag creator
+ * */
+ author: Reference;
+};
+
+type Flag__lookups = {
+ "Flag": Flag_Flag_Props;
+};
+
+export declare function flag(type: T, props: Flag__lookups[T]);;
+
+type Goal_Goal_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Ids for this goal
+ * */
+ identifier: Identifier;
+ /**
+ * proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected
+ * */
+ lifecycleStatus: string;
+ /**
+ * in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable
+ * */
+ achievementStatus: CodeableConcept;
+ /**
+ * E.g. Treatment, dietary, behavioral, etc.
+ * */
+ category: CodeableConcept;
+ /**
+ * high-priority | medium-priority | low-priority
+ * */
+ priority: CodeableConcept;
+ /**
+ * Code or text describing goal
+ * */
+ description: CodeableConcept;
+ /**
+ * Who this goal is intended for
+ * */
+ subject: Reference;
+ /**
+ * When goal pursuit begins
+ * */
+ start: string;
+ /**
+ * Target outcome for the goal
+ * */
+ target: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The parameter whose value is being tracked
+ * */
+ measure: CodeableConcept;
+ /**
+ * The target value to be achieved
+ * */
+ detail: Quantity;
+ /**
+ * Reach goal on or before
+ * */
+ due: string;
+ };
+ /**
+ * When goal status took effect
+ * */
+ statusDate: string;
+ /**
+ * Reason for current status
+ * */
+ statusReason: string;
+ /**
+ * Who's responsible for creating Goal?
+ * */
+ expressedBy: Reference;
+ /**
+ * Issues addressed by this goal
+ * */
+ addresses: Reference;
+ /**
+ * Comments about the goal
+ * */
+ note: Annotation;
+ /**
+ * What result was achieved regarding the goal?
+ * */
+ outcomeCode: CodeableConcept;
+ /**
+ * Observation that resulted from goal
+ * */
+ outcomeReference: Reference;
+};
+
+type Goal__lookups = {
+ "Goal": Goal_Goal_Props;
+};
+
+export declare function goal(type: T, props: Goal__lookups[T]);;
+
+type GraphDefinition_GraphDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this graph definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Business version of the graph definition
+ * */
+ version: string;
+ /**
+ * Name for this graph definition (computer friendly)
+ * */
+ name: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the graph definition
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for graph definition (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this graph definition is defined
+ * */
+ purpose: markdown;
+ /**
+ * Type of resource at which the graph starts
+ * */
+ start: string;
+ /**
+ * Profile on base resource
+ * */
+ profile: any;
+ /**
+ * Links this graph makes rules about
+ * */
+ link: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Path in the resource that contains the link
+ * */
+ path: string;
+ /**
+ * Which slice (if profiled)
+ * */
+ sliceName: string;
+ /**
+ * Minimum occurrences for this link
+ * */
+ min: number;
+ /**
+ * Maximum occurrences for this link
+ * */
+ max: string;
+ /**
+ * Why this link is specified
+ * */
+ description: string;
+ /**
+ * Documentation for FHIRPath expression
+ * */
+ target: string;
+ };
+};
+
+type GraphDefinition__lookups = {
+ "GraphDefinition": GraphDefinition_GraphDefinition_Props;
+};
+
+export declare function graphDefinition(type: T, props: GraphDefinition__lookups[T]);;
+
+type Group_Group_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique id
+ * */
+ identifier: Identifier;
+ /**
+ * Whether this group's record is in active use
+ * */
+ active: boolean;
+ /**
+ * person | animal | practitioner | device | medication | substance
+ * */
+ type: string;
+ /**
+ * Descriptive or actual
+ * */
+ actual: boolean;
+ /**
+ * Kind of Group members
+ * */
+ code: CodeableConcept;
+ /**
+ * Label for Group
+ * */
+ name: string;
+ /**
+ * Number of members
+ * */
+ quantity: number;
+ /**
+ * Entity that is the custodian of the Group's definition
+ * */
+ managingEntity: Reference;
+ /**
+ * Include / Exclude group members by Trait
+ * */
+ characteristic: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Kind of characteristic
+ * */
+ code: CodeableConcept;
+ /**
+ * Value held by characteristic
+ * */
+ value: CodeableConcept;
+ /**
+ * Group includes or excludes
+ * */
+ exclude: boolean;
+ /**
+ * Period over which characteristic is tested
+ * */
+ period: Period;
+ };
+ /**
+ * Who or what is in group
+ * */
+ member: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Reference to the group member
+ * */
+ entity: Reference;
+ /**
+ * Period member belonged to the group
+ * */
+ period: Period;
+ /**
+ * If member is no longer in group
+ * */
+ inactive: boolean;
+ };
+};
+
+type Group__lookups = {
+ "Group": Group_Group_Props;
+};
+
+export declare function group(type: T, props: Group__lookups[T]);;
+
+type GuidanceResponse_GuidanceResponse_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * The identifier of the request associated with this response, if any
+ * */
+ requestIdentifier: Identifier;
+ /**
+ * Business identifier
+ * */
+ identifier: Identifier;
+ /**
+ * What guidance was requested
+ * */
+ module: string;
+ /**
+ * success | data-requested | data-required | in-progress | failure | entered-in-error
+ * */
+ status: string;
+ /**
+ * Patient the request was performed for
+ * */
+ subject: Reference;
+ /**
+ * Encounter during which the response was returned
+ * */
+ encounter: Reference;
+ /**
+ * When the guidance response was processed
+ * */
+ occurrenceDateTime: string;
+ /**
+ * Device returning the guidance
+ * */
+ performer: Reference;
+ /**
+ * Why guidance is needed
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why guidance is needed
+ * */
+ reasonReference: Reference;
+ /**
+ * Additional notes about the response
+ * */
+ note: Annotation;
+ /**
+ * Messages resulting from the evaluation of the artifact or artifacts
+ * */
+ evaluationMessage: Reference;
+ /**
+ * The output parameters of the evaluation, if any
+ * */
+ outputParameters: Reference;
+ /**
+ * Proposed actions, if any
+ * */
+ result: Reference;
+ /**
+ * Additional required data
+ * */
+ dataRequirement: DataRequirement;
+};
+
+type GuidanceResponse__lookups = {
+ "GuidanceResponse": GuidanceResponse_GuidanceResponse_Props;
+};
+
+export declare function guidanceResponse(type: T, props: GuidanceResponse__lookups[T]);;
+
+type HealthcareService_HealthcareService_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External identifiers for this item
+ * */
+ identifier: Identifier;
+ /**
+ * Whether this HealthcareService record is in active use
+ * */
+ active: boolean;
+ /**
+ * Organization that provides this service
+ * */
+ providedBy: Reference;
+ /**
+ * Broad category of service being performed or delivered
+ * */
+ category: CodeableConcept;
+ /**
+ * Type of service that may be delivered or performed
+ * */
+ type: CodeableConcept;
+ /**
+ * Specialties handled by the HealthcareService
+ * */
+ specialty: CodeableConcept;
+ /**
+ * Location(s) where service may be provided
+ * */
+ location: Reference;
+ /**
+ * Description of service as presented to a consumer while searching
+ * */
+ name: string;
+ /**
+ * Additional description and/or any specific issues not covered elsewhere
+ * */
+ comment: string;
+ /**
+ * Extra details about the service that can't be placed in the other fields
+ * */
+ extraDetails: markdown;
+ /**
+ * Facilitates quick identification of the service
+ * */
+ photo: Attachment;
+ /**
+ * Contacts related to the healthcare service
+ * */
+ telecom: ContactPoint;
+ /**
+ * Location(s) service is intended for/available to
+ * */
+ coverageArea: Reference;
+ /**
+ * Conditions under which service is available/offered
+ * */
+ serviceProvisionCode: CodeableConcept;
+ /**
+ * Specific eligibility requirements required to use the service
+ * */
+ eligibility: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Coded value for the eligibility
+ * */
+ code: CodeableConcept;
+ /**
+ * Describes the eligibility conditions for the service
+ * */
+ comment: markdown;
+ };
+ /**
+ * Programs that this service is applicable to
+ * */
+ program: CodeableConcept;
+ /**
+ * Collection of characteristics (attributes)
+ * */
+ characteristic: CodeableConcept;
+ /**
+ * The language that this service is offered in
+ * */
+ communication: CodeableConcept;
+ /**
+ * Ways that the service accepts referrals
+ * */
+ referralMethod: CodeableConcept;
+ /**
+ * If an appointment is required for access to this service
+ * */
+ appointmentRequired: boolean;
+ /**
+ * Times the Service Site is available
+ * */
+ availableTime: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * mon | tue | wed | thu | fri | sat | sun
+ * */
+ daysOfWeek: string;
+ /**
+ * Always available? e.g. 24 hour service
+ * */
+ allDay: boolean;
+ /**
+ * Opening time of day (ignored if allDay = true)
+ * */
+ availableStartTime: time;
+ /**
+ * Closing time of day (ignored if allDay = true)
+ * */
+ availableEndTime: time;
+ };
+ /**
+ * Not available during this time due to provided reason
+ * */
+ notAvailable: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Reason presented to the user explaining why time not available
+ * */
+ description: string;
+ /**
+ * Service not available from this date
+ * */
+ during: Period;
+ };
+ /**
+ * Description of availability exceptions
+ * */
+ availabilityExceptions: string;
+ /**
+ * Technical endpoints providing access to electronic services operated for the healthcare service
+ * */
+ endpoint: Reference;
+};
+
+type HealthcareService__lookups = {
+ "HealthcareService": HealthcareService_HealthcareService_Props;
+};
+
+export declare function healthcareService(type: T, props: HealthcareService__lookups[T]);;
+
+type ImagingStudy_ImagingStudy_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifiers for the whole study
+ * */
+ identifier: Identifier;
+ /**
+ * registered | available | cancelled | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * All series modality if actual acquisition modalities
+ * */
+ modality: Coding;
+ /**
+ * Who or what is the subject of the study
+ * */
+ subject: Reference;
+ /**
+ * Encounter with which this imaging study is associated
+ * */
+ encounter: Reference;
+ /**
+ * When the study was started
+ * */
+ started: string;
+ /**
+ * Request fulfilled
+ * */
+ basedOn: Reference;
+ /**
+ * Referring physician
+ * */
+ referrer: Reference;
+ /**
+ * Who interpreted images
+ * */
+ interpreter: Reference;
+ /**
+ * Study access endpoint
+ * */
+ endpoint: Reference;
+ /**
+ * Number of Study Related Series
+ * */
+ numberOfSeries: number;
+ /**
+ * Number of Study Related Instances
+ * */
+ numberOfInstances: number;
+ /**
+ * The performed Procedure reference
+ * */
+ procedureReference: Reference;
+ /**
+ * The performed procedure code
+ * */
+ procedureCode: CodeableConcept;
+ /**
+ * Where ImagingStudy occurred
+ * */
+ location: Reference;
+ /**
+ * Why the study was requested
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why was study performed
+ * */
+ reasonReference: Reference;
+ /**
+ * User-defined comments
+ * */
+ note: Annotation;
+ /**
+ * Institution-generated description
+ * */
+ description: string;
+ /**
+ * Each study has one or more series of instances
+ * */
+ series: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * DICOM Series Instance UID for the series
+ * */
+ uid: string;
+ /**
+ * Numeric identifier of this series
+ * */
+ number: number;
+ /**
+ * The modality of the instances in the series
+ * */
+ modality: Coding;
+ /**
+ * A short human readable summary of the series
+ * */
+ description: string;
+ /**
+ * Number of Series Related Instances
+ * */
+ numberOfInstances: number;
+ /**
+ * Series access endpoint
+ * */
+ endpoint: Reference;
+ /**
+ * Body part examined
+ * */
+ bodySite: Coding;
+ /**
+ * Body part laterality
+ * */
+ laterality: Coding;
+ /**
+ * Specimen imaged
+ * */
+ specimen: Reference;
+ /**
+ * When the series started
+ * */
+ started: string;
+ /**
+ * Who performed the series
+ * */
+ performer: Reference;
+ /**
+ * Description of instance
+ * */
+ instance: string;
+ };
+};
+
+type ImagingStudy__lookups = {
+ "ImagingStudy": ImagingStudy_ImagingStudy_Props;
+};
+
+export declare function imagingStudy(type: T, props: ImagingStudy__lookups[T]);;
+
+type Immunization_Immunization_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier
+ * */
+ identifier: Identifier;
+ /**
+ * completed | entered-in-error | not-done
+ * */
+ status: string;
+ /**
+ * Reason not done
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * Vaccine product administered
+ * */
+ vaccineCode: CodeableConcept;
+ /**
+ * Who was immunized
+ * */
+ patient: Reference;
+ /**
+ * Encounter immunization was part of
+ * */
+ encounter: Reference;
+ /**
+ * Vaccine administration date
+ * */
+ occurrence: string;
+ /**
+ * When the immunization was first captured in the subject's record
+ * */
+ recorded: string;
+ /**
+ * Indicates context the data was recorded in
+ * */
+ primarySource: boolean;
+ /**
+ * Indicates the source of a secondarily reported record
+ * */
+ reportOrigin: CodeableConcept;
+ /**
+ * Where immunization occurred
+ * */
+ location: Reference;
+ /**
+ * Vaccine manufacturer
+ * */
+ manufacturer: Reference;
+ /**
+ * Vaccine lot number
+ * */
+ lotNumber: string;
+ /**
+ * Vaccine expiration date
+ * */
+ expirationDate: string;
+ /**
+ * Body site vaccine was administered
+ * */
+ site: CodeableConcept;
+ /**
+ * How vaccine entered body
+ * */
+ route: CodeableConcept;
+ /**
+ * Amount of vaccine administered
+ * */
+ doseQuantity: Quantity;
+ /**
+ * Who performed event
+ * */
+ performer: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * What type of performance was done
+ * */
+ function: CodeableConcept;
+ /**
+ * Individual or organization who was performing
+ * */
+ actor: Reference;
+ };
+ /**
+ * Additional immunization notes
+ * */
+ note: Annotation;
+ /**
+ * Why immunization occurred
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why immunization occurred
+ * */
+ reasonReference: Reference;
+ /**
+ * Dose potency
+ * */
+ isSubpotent: boolean;
+ /**
+ * Reason for being subpotent
+ * */
+ subpotentReason: CodeableConcept;
+ /**
+ * Educational material presented to patient
+ * */
+ education: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Educational material document identifier
+ * */
+ documentType: string;
+ /**
+ * Educational material reference pointer
+ * */
+ reference: string;
+ /**
+ * Educational material publication date
+ * */
+ publicationDate: string;
+ /**
+ * Educational material presentation date
+ * */
+ presentationDate: string;
+ };
+ /**
+ * Patient eligibility for a vaccination program
+ * */
+ programEligibility: CodeableConcept;
+ /**
+ * Funding source for the vaccine
+ * */
+ fundingSource: CodeableConcept;
+ /**
+ * Details of a reaction that follows immunization
+ * */
+ reaction: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * When reaction started
+ * */
+ date: string;
+ /**
+ * Additional information on reaction
+ * */
+ detail: Reference;
+ /**
+ * Indicates self-reported reaction
+ * */
+ reported: boolean;
+ };
+ /**
+ * Protocol followed by the provider
+ * */
+ protocolApplied: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Name of vaccine series
+ * */
+ series: string;
+ /**
+ * Who is responsible for publishing the recommendations
+ * */
+ authority: Reference;
+ /**
+ * Vaccine preventatable disease being targetted
+ * */
+ targetDisease: CodeableConcept;
+ /**
+ * Dose number within series
+ * */
+ doseNumber: number;
+ /**
+ * Recommended number of doses for immunity
+ * */
+ seriesDoses: number;
+ };
+};
+
+type Immunization__lookups = {
+ "Immunization": Immunization_Immunization_Props;
+};
+
+export declare function immunization(type: T, props: Immunization__lookups[T]);;
+
+type ImmunizationEvaluation_ImmunizationEvaluation_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier
+ * */
+ identifier: Identifier;
+ /**
+ * completed | entered-in-error
+ * */
+ status: string;
+ /**
+ * Who this evaluation is for
+ * */
+ patient: Reference;
+ /**
+ * Date evaluation was performed
+ * */
+ date: string;
+ /**
+ * Who is responsible for publishing the recommendations
+ * */
+ authority: Reference;
+ /**
+ * Evaluation target disease
+ * */
+ targetDisease: CodeableConcept;
+ /**
+ * Immunization being evaluated
+ * */
+ immunizationEvent: Reference;
+ /**
+ * Status of the dose relative to published recommendations
+ * */
+ doseStatus: CodeableConcept;
+ /**
+ * Reason for the dose status
+ * */
+ doseStatusReason: CodeableConcept;
+ /**
+ * Evaluation notes
+ * */
+ description: string;
+ /**
+ * Name of vaccine series
+ * */
+ series: string;
+ /**
+ * Dose number within series
+ * */
+ doseNumber: number;
+ /**
+ * Recommended number of doses for immunity
+ * */
+ seriesDoses: number;
+};
+
+type ImmunizationEvaluation__lookups = {
+ "ImmunizationEvaluation": ImmunizationEvaluation_ImmunizationEvaluation_Props;
+};
+
+export declare function immunizationEvaluation(type: T, props: ImmunizationEvaluation__lookups[T]);;
+
+type ImmunizationRecommendation_ImmunizationRecommendation_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Who this profile is for
+ * */
+ patient: Reference;
+ /**
+ * Date recommendation(s) created
+ * */
+ date: string;
+ /**
+ * Who is responsible for protocol
+ * */
+ authority: Reference;
+ /**
+ * Vaccine administration recommendations
+ * */
+ recommendation: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Vaccine or vaccine group recommendation applies to
+ * */
+ vaccineCode: CodeableConcept;
+ /**
+ * Disease to be immunized against
+ * */
+ targetDisease: CodeableConcept;
+ /**
+ * Vaccine which is contraindicated to fulfill the recommendation
+ * */
+ contraindicatedVaccineCode: CodeableConcept;
+ /**
+ * Vaccine recommendation status
+ * */
+ forecastStatus: CodeableConcept;
+ /**
+ * Vaccine administration status reason
+ * */
+ forecastReason: CodeableConcept;
+ /**
+ * Recommended date
+ * */
+ dateCriterion: string;
+ /**
+ * Protocol details
+ * */
+ description: string;
+ /**
+ * Name of vaccination series
+ * */
+ series: string;
+ /**
+ * Recommended dose number within series
+ * */
+ doseNumber: number;
+ /**
+ * Recommended number of doses for immunity
+ * */
+ seriesDoses: number;
+ /**
+ * Past immunizations supporting recommendation
+ * */
+ supportingImmunization: Reference;
+ /**
+ * Patient observations supporting recommendation
+ * */
+ supportingPatientInformation: Reference;
+ };
+};
+
+type ImmunizationRecommendation__lookups = {
+ "ImmunizationRecommendation": ImmunizationRecommendation_ImmunizationRecommendation_Props;
+};
+
+export declare function immunizationRecommendation(type: T, props: ImmunizationRecommendation__lookups[T]);;
+
+type ImplementationGuide_ImplementationGuide_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this implementation guide, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Business version of the implementation guide
+ * */
+ version: string;
+ /**
+ * Name for this implementation guide (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this implementation guide (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the implementation guide
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for implementation guide (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * NPM Package name for IG
+ * */
+ packageId: string;
+ /**
+ * SPDX license code for this IG (or not-open-source)
+ * */
+ license: string;
+ /**
+ * FHIR Version(s) this Implementation Guide targets
+ * */
+ fhirVersion: string;
+ /**
+ * Another Implementation guide this depends on
+ * */
+ dependsOn: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identity of the IG that this depends on
+ * */
+ uri: any;
+ /**
+ * NPM Package name for IG this depends on
+ * */
+ packageId: string;
+ /**
+ * Version of the IG
+ * */
+ version: string;
+ };
+ /**
+ * Profiles that apply globally
+ * */
+ global: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type this profile applies to
+ * */
+ type: string;
+ /**
+ * Profile that all resources must conform to
+ * */
+ profile: any;
+ };
+ /**
+ * Information needed to build the IG
+ * */
+ definition: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Human readable text describing the package
+ * */
+ grouping: string;
+ /**
+ * Grouping this is part of
+ * */
+ resource: string;
+ /**
+ * html | markdown | xml | generated
+ * */
+ page: string;
+ /**
+ * Value for named type
+ * */
+ parameter: string;
+ /**
+ * The scope in which the template applies
+ * */
+ template: string;
+ };
+ /**
+ * Information about an assembled IG
+ * */
+ manifest: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Location of rendered implementation guide
+ * */
+ rendering: url;
+ /**
+ * Relative path for page in IG
+ * */
+ resource: url;
+ /**
+ * Anchor available on the page
+ * */
+ page: string;
+ /**
+ * Image within the IG
+ * */
+ image: string;
+ /**
+ * Additional linkable file in IG
+ * */
+ other: string;
+ };
+};
+
+type ImplementationGuide__lookups = {
+ "ImplementationGuide": ImplementationGuide_ImplementationGuide_Props;
+};
+
+export declare function implementationGuide(type: T, props: ImplementationGuide__lookups[T]);;
+
+type Ingredient_Ingredient_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * An identifier or code by which the ingredient can be referenced
+ * */
+ identifier: Identifier;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * The product which this ingredient is a constituent part of
+ * */
+ for: Reference;
+ /**
+ * Purpose of the ingredient within the product, e.g. active, inactive
+ * */
+ role: CodeableConcept;
+ /**
+ * Precise action within the drug product, e.g. antioxidant, alkalizing agent
+ * */
+ function: CodeableConcept;
+ /**
+ * If the ingredient is a known or suspected allergen
+ * */
+ allergenicIndicator: boolean;
+ /**
+ * An organization that manufactures this ingredient
+ * */
+ manufacturer: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * allowed | possible | actual
+ * */
+ role: string;
+ /**
+ * An organization that manufactures this ingredient
+ * */
+ manufacturer: Reference;
+ };
+ /**
+ * The substance that comprises this ingredient
+ * */
+ substance: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A code or full resource that represents the ingredient substance
+ * */
+ code: CodeableReference;
+ /**
+ * Where the strength range applies
+ * */
+ strength: CodeableConcept;
+ };
+};
+
+type Ingredient__lookups = {
+ "Ingredient": Ingredient_Ingredient_Props;
+};
+
+export declare function ingredient(type: T, props: Ingredient__lookups[T]);;
+
+type InsurancePlan_InsurancePlan_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for Product
+ * */
+ identifier: Identifier;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * Kind of product
+ * */
+ type: CodeableConcept;
+ /**
+ * Official name
+ * */
+ name: string;
+ /**
+ * Alternate names
+ * */
+ alias: string;
+ /**
+ * When the product is available
+ * */
+ period: Period;
+ /**
+ * Plan issuer
+ * */
+ ownedBy: Reference;
+ /**
+ * Product administrator
+ * */
+ administeredBy: Reference;
+ /**
+ * Where product applies
+ * */
+ coverageArea: Reference;
+ /**
+ * Contact for the product
+ * */
+ contact: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The type of contact
+ * */
+ purpose: CodeableConcept;
+ /**
+ * A name associated with the contact
+ * */
+ name: HumanName;
+ /**
+ * Contact details (telephone, email, etc.) for a contact
+ * */
+ telecom: ContactPoint;
+ /**
+ * Visiting or postal addresses for the contact
+ * */
+ address: Address;
+ };
+ /**
+ * Technical endpoint
+ * */
+ endpoint: Reference;
+ /**
+ * What networks are Included
+ * */
+ network: Reference;
+ /**
+ * Coverage details
+ * */
+ coverage: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of coverage
+ * */
+ type: CodeableConcept;
+ /**
+ * What networks provide coverage
+ * */
+ network: Reference;
+ /**
+ * Benefit limit details
+ * */
+ benefit: CodeableConcept;
+ };
+ /**
+ * Plan details
+ * */
+ plan: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for Product
+ * */
+ identifier: Identifier;
+ /**
+ * Type of plan
+ * */
+ type: CodeableConcept;
+ /**
+ * Where product applies
+ * */
+ coverageArea: Reference;
+ /**
+ * What networks provide coverage
+ * */
+ network: Reference;
+ /**
+ * Additional cost information
+ * */
+ generalCost: string;
+ /**
+ * The actual cost value
+ * */
+ specificCost: Quantity;
+ };
+};
+
+type InsurancePlan__lookups = {
+ "InsurancePlan": InsurancePlan_InsurancePlan_Props;
+};
+
+export declare function insurancePlan(type: T, props: InsurancePlan__lookups[T]);;
+
+type Invoice_Invoice_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for item
+ * */
+ identifier: Identifier;
+ /**
+ * draft | issued | balanced | cancelled | entered-in-error
+ * */
+ status: string;
+ /**
+ * Reason for cancellation of this Invoice
+ * */
+ cancelledReason: string;
+ /**
+ * Type of Invoice
+ * */
+ type: CodeableConcept;
+ /**
+ * Recipient(s) of goods and services
+ * */
+ subject: Reference;
+ /**
+ * Recipient of this invoice
+ * */
+ recipient: Reference;
+ /**
+ * Invoice date / posting date
+ * */
+ date: string;
+ /**
+ * Participant in creation of this Invoice
+ * */
+ participant: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of involvement in creation of this Invoice
+ * */
+ role: CodeableConcept;
+ /**
+ * Individual who was involved
+ * */
+ actor: Reference;
+ };
+ /**
+ * Issuing Organization of Invoice
+ * */
+ issuer: Reference;
+ /**
+ * Account that is being balanced
+ * */
+ account: Reference;
+ /**
+ * Line items of this Invoice
+ * */
+ lineItem: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Sequence number of line item
+ * */
+ sequence: number;
+ /**
+ * Reference to ChargeItem containing details of this line item or an inline billing code
+ * */
+ chargeItem: Reference;
+ /**
+ * Monetary amount associated with this component
+ * */
+ priceComponent: Money;
+ };
+ /**
+ * Components of Invoice total
+ * */
+ totalPriceComponent: any;
+ /**
+ * Net total of this Invoice
+ * */
+ totalNet: Money;
+ /**
+ * Gross total of this Invoice
+ * */
+ totalGross: Money;
+ /**
+ * Payment details
+ * */
+ paymentTerms: markdown;
+ /**
+ * Comments made about the invoice
+ * */
+ note: Annotation;
+};
+
+type Invoice__lookups = {
+ "Invoice": Invoice_Invoice_Props;
+};
+
+export declare function invoice(type: T, props: Invoice__lookups[T]);;
+
+type Library_Library_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this library, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the library
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the library
+ * */
+ version: string;
+ /**
+ * Name for this library (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this library (human friendly)
+ * */
+ title: string;
+ /**
+ * Subordinate title of the library
+ * */
+ subtitle: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * logic-library | model-definition | asset-collection | module-definition
+ * */
+ type: CodeableConcept;
+ /**
+ * Type of individual the library content is focused on
+ * */
+ subject: CodeableConcept;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the library
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for library (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this library is defined
+ * */
+ purpose: markdown;
+ /**
+ * Describes the clinical usage of the library
+ * */
+ usage: string;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * When the library was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the library was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * When the library is expected to be used
+ * */
+ effectivePeriod: Period;
+ /**
+ * E.g. Education, Treatment, Assessment, etc.
+ * */
+ topic: CodeableConcept;
+ /**
+ * Who authored the content
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the content
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the content
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the content
+ * */
+ endorser: ContactDetail;
+ /**
+ * Additional documentation, citations, etc.
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * Parameters defined by the library
+ * */
+ parameter: ParameterDefinition;
+ /**
+ * What data is referenced by this library
+ * */
+ dataRequirement: DataRequirement;
+ /**
+ * Contents of the library, either embedded or referenced
+ * */
+ content: Attachment;
+};
+
+type Library__lookups = {
+ "Library": Library_Library_Props;
+};
+
+export declare function library(type: T, props: Library__lookups[T]);;
+
+type Linkage_Linkage_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Whether this linkage assertion is active or not
+ * */
+ active: boolean;
+ /**
+ * Who is responsible for linkages
+ * */
+ author: Reference;
+ /**
+ * Item to be linked
+ * */
+ item: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * source | alternate | historical
+ * */
+ type: string;
+ /**
+ * Resource being linked
+ * */
+ resource: Reference;
+ };
+};
+
+type Linkage__lookups = {
+ "Linkage": Linkage_Linkage_Props;
+};
+
+export declare function linkage(type: T, props: Linkage__lookups[T]);;
+
+type List_List_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier
+ * */
+ identifier: Identifier;
+ /**
+ * current | retired | entered-in-error
+ * */
+ status: string;
+ /**
+ * working | snapshot | changes
+ * */
+ mode: string;
+ /**
+ * Descriptive name for the list
+ * */
+ title: string;
+ /**
+ * What the purpose of this list is
+ * */
+ code: CodeableConcept;
+ /**
+ * If all resources have the same subject
+ * */
+ subject: Reference;
+ /**
+ * Context in which list created
+ * */
+ encounter: Reference;
+ /**
+ * When the list was prepared
+ * */
+ date: string;
+ /**
+ * Who and/or what defined the list contents (aka Author)
+ * */
+ source: Reference;
+ /**
+ * What order the list has
+ * */
+ orderedBy: CodeableConcept;
+ /**
+ * Comments about the list
+ * */
+ note: Annotation;
+ /**
+ * Entries in the list
+ * */
+ entry: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Status/Workflow information about this item
+ * */
+ flag: CodeableConcept;
+ /**
+ * If this item is actually marked as deleted
+ * */
+ deleted: boolean;
+ /**
+ * When item added to list
+ * */
+ date: string;
+ /**
+ * Actual entry
+ * */
+ item: Reference;
+ };
+ /**
+ * Why list is empty
+ * */
+ emptyReason: CodeableConcept;
+};
+
+type List__lookups = {
+ "List": List_List_Props;
+};
+
+export declare function list(type: T, props: List__lookups[T]);;
+
+type Location_Location_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique code or number identifying the location to its users
+ * */
+ identifier: Identifier;
+ /**
+ * active | suspended | inactive
+ * */
+ status: string;
+ /**
+ * The operational status of the location (typically only for a bed/room)
+ * */
+ operationalStatus: Coding;
+ /**
+ * Name of the location as used by humans
+ * */
+ name: string;
+ /**
+ * A list of alternate names that the location is known as, or was known as, in the past
+ * */
+ alias: string;
+ /**
+ * Additional details about the location that could be displayed as further information to identify the location beyond its name
+ * */
+ description: string;
+ /**
+ * instance | kind
+ * */
+ mode: string;
+ /**
+ * Type of function performed
+ * */
+ type: CodeableConcept;
+ /**
+ * Contact details of the location
+ * */
+ telecom: ContactPoint;
+ /**
+ * Physical location
+ * */
+ address: Address;
+ /**
+ * Physical form of the location
+ * */
+ physicalType: CodeableConcept;
+ /**
+ * The absolute geographic location
+ * */
+ position: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Longitude with WGS84 datum
+ * */
+ longitude: number;
+ /**
+ * Latitude with WGS84 datum
+ * */
+ latitude: number;
+ /**
+ * Altitude with WGS84 datum
+ * */
+ altitude: number;
+ };
+ /**
+ * Organization responsible for provisioning and upkeep
+ * */
+ managingOrganization: Reference;
+ /**
+ * Another Location this one is physically a part of
+ * */
+ partOf: Reference;
+ /**
+ * What days/times during a week is this location usually open
+ * */
+ hoursOfOperation: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * mon | tue | wed | thu | fri | sat | sun
+ * */
+ daysOfWeek: string;
+ /**
+ * The Location is open all day
+ * */
+ allDay: boolean;
+ /**
+ * Time that the Location opens
+ * */
+ openingTime: time;
+ /**
+ * Time that the Location closes
+ * */
+ closingTime: time;
+ };
+ /**
+ * Description of availability exceptions
+ * */
+ availabilityExceptions: string;
+ /**
+ * Technical endpoints providing access to services operated for the location
+ * */
+ endpoint: Reference;
+};
+
+type Location__lookups = {
+ "Location": Location_Location_Props;
+};
+
+export declare function location(type: T, props: Location__lookups[T]);;
+
+type ManufacturedItemDefinition_ManufacturedItemDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique identifier
+ * */
+ identifier: Identifier;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * Dose form as manufactured (before any necessary transformation)
+ * */
+ manufacturedDoseForm: CodeableConcept;
+ /**
+ * The “real world” units in which the quantity of the item is described
+ * */
+ unitOfPresentation: CodeableConcept;
+ /**
+ * Manufacturer of the item (Note that this should be named "manufacturer" but it currently causes technical issues)
+ * */
+ manufacturer: Reference;
+ /**
+ * The ingredients of this manufactured item. Only needed if these are not specified by incoming references from the Ingredient resource
+ * */
+ ingredient: CodeableConcept;
+ /**
+ * General characteristics of this item
+ * */
+ property: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A code expressing the type of characteristic
+ * */
+ type: CodeableConcept;
+ /**
+ * A value for the characteristic
+ * */
+ value: CodeableConcept;
+ };
+};
+
+type ManufacturedItemDefinition__lookups = {
+ "ManufacturedItemDefinition": ManufacturedItemDefinition_ManufacturedItemDefinition_Props;
+};
+
+export declare function manufacturedItemDefinition(type: T, props: ManufacturedItemDefinition__lookups[T]);;
+
+type Measure_Measure_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this measure, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the measure
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the measure
+ * */
+ version: string;
+ /**
+ * Name for this measure (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this measure (human friendly)
+ * */
+ title: string;
+ /**
+ * Subordinate title of the measure
+ * */
+ subtitle: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device
+ * */
+ subject: CodeableConcept;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the measure
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for measure (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this measure is defined
+ * */
+ purpose: markdown;
+ /**
+ * Describes the clinical usage of the measure
+ * */
+ usage: string;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * When the measure was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the measure was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * When the measure is expected to be used
+ * */
+ effectivePeriod: Period;
+ /**
+ * The category of the measure, such as Education, Treatment, Assessment, etc.
+ * */
+ topic: CodeableConcept;
+ /**
+ * Who authored the content
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the content
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the content
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the content
+ * */
+ endorser: ContactDetail;
+ /**
+ * Additional documentation, citations, etc.
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * Logic used by the measure
+ * */
+ library: any;
+ /**
+ * Disclaimer for use of the measure or its referenced content
+ * */
+ disclaimer: markdown;
+ /**
+ * proportion | ratio | continuous-variable | cohort
+ * */
+ scoring: CodeableConcept;
+ /**
+ * opportunity | all-or-nothing | linear | weighted
+ * */
+ compositeScoring: CodeableConcept;
+ /**
+ * process | outcome | structure | patient-reported-outcome | composite
+ * */
+ type: CodeableConcept;
+ /**
+ * How risk adjustment is applied for this measure
+ * */
+ riskAdjustment: string;
+ /**
+ * How is rate aggregation performed for this measure
+ * */
+ rateAggregation: string;
+ /**
+ * Detailed description of why the measure exists
+ * */
+ rationale: markdown;
+ /**
+ * Summary of clinical guidelines
+ * */
+ clinicalRecommendationStatement: markdown;
+ /**
+ * increase | decrease
+ * */
+ improvementNotation: CodeableConcept;
+ /**
+ * Defined terms used in the measure documentation
+ * */
+ definition: markdown;
+ /**
+ * Additional guidance for implementers
+ * */
+ guidance: markdown;
+ /**
+ * Population criteria group
+ * */
+ group: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Meaning of the group
+ * */
+ code: CodeableConcept;
+ /**
+ * Summary description
+ * */
+ description: string;
+ /**
+ * The criteria that defines this population
+ * */
+ population: Expression;
+ /**
+ * Component of how the measure should be stratified
+ * */
+ stratifier: Expression;
+ };
+ /**
+ * What other data should be reported with the measure
+ * */
+ supplementalData: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Meaning of the supplemental data
+ * */
+ code: CodeableConcept;
+ /**
+ * supplemental-data | risk-adjustment-factor
+ * */
+ usage: CodeableConcept;
+ /**
+ * The human readable description of this supplemental data
+ * */
+ description: string;
+ /**
+ * Expression describing additional data to be reported
+ * */
+ criteria: Expression;
+ };
+};
+
+type Measure__lookups = {
+ "Measure": Measure_Measure_Props;
+};
+
+export declare function measure(type: T, props: Measure__lookups[T]);;
+
+type MeasureReport_MeasureReport_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Additional identifier for the MeasureReport
+ * */
+ identifier: Identifier;
+ /**
+ * complete | pending | error
+ * */
+ status: string;
+ /**
+ * individual | subject-list | summary | data-collection
+ * */
+ type: string;
+ /**
+ * What measure was calculated
+ * */
+ measure: any;
+ /**
+ * What individual(s) the report is for
+ * */
+ subject: Reference;
+ /**
+ * When the report was generated
+ * */
+ date: string;
+ /**
+ * Who is reporting the data
+ * */
+ reporter: Reference;
+ /**
+ * What period the report covers
+ * */
+ period: Period;
+ /**
+ * increase | decrease
+ * */
+ improvementNotation: CodeableConcept;
+ /**
+ * Measure results for each group
+ * */
+ group: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Meaning of the group
+ * */
+ code: CodeableConcept;
+ /**
+ * For subject-list reports, the subject results in this population
+ * */
+ population: Reference;
+ /**
+ * What score this group achieved
+ * */
+ measureScore: Quantity;
+ /**
+ * What score this stratum achieved
+ * */
+ stratifier: Quantity;
+ };
+ /**
+ * What data was used to calculate the measure score
+ * */
+ evaluatedResource: Reference;
+};
+
+type MeasureReport__lookups = {
+ "MeasureReport": MeasureReport_MeasureReport_Props;
+};
+
+export declare function measureReport(type: T, props: MeasureReport__lookups[T]);;
+
+type Media_Media_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifier(s) for the image
+ * */
+ identifier: Identifier;
+ /**
+ * Procedure that caused this media to be created
+ * */
+ basedOn: Reference;
+ /**
+ * Part of referenced event
+ * */
+ partOf: Reference;
+ /**
+ * preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * Classification of media as image, video, or audio
+ * */
+ type: CodeableConcept;
+ /**
+ * The type of acquisition equipment/process
+ * */
+ modality: CodeableConcept;
+ /**
+ * Imaging view, e.g. Lateral or Antero-posterior
+ * */
+ view: CodeableConcept;
+ /**
+ * Who/What this Media is a record of
+ * */
+ subject: Reference;
+ /**
+ * Encounter associated with media
+ * */
+ encounter: Reference;
+ /**
+ * When Media was collected
+ * */
+ created: string;
+ /**
+ * Date/Time this version was made available
+ * */
+ issued: string;
+ /**
+ * The person who generated the image
+ * */
+ operator: Reference;
+ /**
+ * Why was event performed?
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Observed body part
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * Name of the device/manufacturer
+ * */
+ deviceName: string;
+ /**
+ * Observing Device
+ * */
+ device: Reference;
+ /**
+ * Height of the image in pixels (photo/video)
+ * */
+ height: number;
+ /**
+ * Width of the image in pixels (photo/video)
+ * */
+ width: number;
+ /**
+ * Number of frames if > 1 (photo)
+ * */
+ frames: number;
+ /**
+ * Length in seconds (audio / video)
+ * */
+ duration: number;
+ /**
+ * Actual Media - reference or data
+ * */
+ content: Attachment;
+ /**
+ * Comments made about the media
+ * */
+ note: Annotation;
+};
+
+type Media__lookups = {
+ "Media": Media_Media_Props;
+};
+
+export declare function media(type: T, props: Media__lookups[T]);;
+
+type Medication_Medication_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier for this medication
+ * */
+ identifier: Identifier;
+ /**
+ * Codes that identify this medication
+ * */
+ code: CodeableConcept;
+ /**
+ * active | inactive | entered-in-error
+ * */
+ status: string;
+ /**
+ * Manufacturer of the item
+ * */
+ manufacturer: Reference;
+ /**
+ * powder | tablets | capsule +
+ * */
+ form: CodeableConcept;
+ /**
+ * Amount of drug in package
+ * */
+ amount: Ratio;
+ /**
+ * Active or inactive ingredient
+ * */
+ ingredient: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The actual ingredient or content
+ * */
+ item: CodeableConcept;
+ /**
+ * Active ingredient indicator
+ * */
+ isActive: boolean;
+ /**
+ * Quantity of ingredient present
+ * */
+ strength: Ratio;
+ };
+ /**
+ * Details about packaged medications
+ * */
+ batch: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifier assigned to batch
+ * */
+ lotNumber: string;
+ /**
+ * When batch will expire
+ * */
+ expirationDate: string;
+ };
+};
+
+type Medication__lookups = {
+ "Medication": Medication_Medication_Props;
+};
+
+export declare function medication(type: T, props: Medication__lookups[T]);;
+
+type MedicationAdministration_MedicationAdministration_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Instantiates protocol or definition
+ * */
+ instantiates: string;
+ /**
+ * Part of referenced event
+ * */
+ partOf: Reference;
+ /**
+ * in-progress | not-done | on-hold | completed | entered-in-error | stopped | unknown
+ * */
+ status: string;
+ /**
+ * Reason administration not performed
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * Type of medication usage
+ * */
+ category: CodeableConcept;
+ /**
+ * What was administered
+ * */
+ medication: CodeableConcept;
+ /**
+ * Who received medication
+ * */
+ subject: Reference;
+ /**
+ * Encounter or Episode of Care administered as part of
+ * */
+ context: Reference;
+ /**
+ * Additional information to support administration
+ * */
+ supportingInformation: Reference;
+ /**
+ * Start and end time of administration
+ * */
+ effective: string;
+ /**
+ * Who performed the medication administration and what they did
+ * */
+ performer: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of performance
+ * */
+ function: CodeableConcept;
+ /**
+ * Who performed the medication administration
+ * */
+ actor: Reference;
+ };
+ /**
+ * Reason administration performed
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Condition or observation that supports why the medication was administered
+ * */
+ reasonReference: Reference;
+ /**
+ * Request administration performed against
+ * */
+ request: Reference;
+ /**
+ * Device used to administer
+ * */
+ device: Reference;
+ /**
+ * Information about the administration
+ * */
+ note: Annotation;
+ /**
+ * Details of how medication was taken
+ * */
+ dosage: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Free text dosage instructions e.g. SIG
+ * */
+ text: string;
+ /**
+ * Body site administered to
+ * */
+ site: CodeableConcept;
+ /**
+ * Path of substance into body
+ * */
+ route: CodeableConcept;
+ /**
+ * How drug was administered
+ * */
+ method: CodeableConcept;
+ /**
+ * Amount of medication per dose
+ * */
+ dose: Quantity;
+ /**
+ * Dose quantity per unit of time
+ * */
+ rate: Ratio;
+ };
+ /**
+ * A list of events of interest in the lifecycle
+ * */
+ eventHistory: Reference;
+};
+
+type MedicationAdministration__lookups = {
+ "MedicationAdministration": MedicationAdministration_MedicationAdministration_Props;
+};
+
+export declare function medicationAdministration(type: T, props: MedicationAdministration__lookups[T]);;
+
+type MedicationDispense_MedicationDispense_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Event that dispense is part of
+ * */
+ partOf: Reference;
+ /**
+ * preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown
+ * */
+ status: string;
+ /**
+ * Why a dispense was not performed
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * Type of medication dispense
+ * */
+ category: CodeableConcept;
+ /**
+ * What medication was supplied
+ * */
+ medication: CodeableConcept;
+ /**
+ * Who the dispense is for
+ * */
+ subject: Reference;
+ /**
+ * Encounter / Episode associated with event
+ * */
+ context: Reference;
+ /**
+ * Information that supports the dispensing of the medication
+ * */
+ supportingInformation: Reference;
+ /**
+ * Who performed event
+ * */
+ performer: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Who performed the dispense and what they did
+ * */
+ function: CodeableConcept;
+ /**
+ * Individual who was performing
+ * */
+ actor: Reference;
+ };
+ /**
+ * Where the dispense occurred
+ * */
+ location: Reference;
+ /**
+ * Medication order that authorizes the dispense
+ * */
+ authorizingPrescription: Reference;
+ /**
+ * Trial fill, partial fill, emergency fill, etc.
+ * */
+ type: CodeableConcept;
+ /**
+ * Amount dispensed
+ * */
+ quantity: Quantity;
+ /**
+ * Amount of medication expressed as a timing amount
+ * */
+ daysSupply: Quantity;
+ /**
+ * When product was packaged and reviewed
+ * */
+ whenPrepared: string;
+ /**
+ * When product was given out
+ * */
+ whenHandedOver: string;
+ /**
+ * Where the medication was sent
+ * */
+ destination: Reference;
+ /**
+ * Who collected the medication
+ * */
+ receiver: Reference;
+ /**
+ * Information about the dispense
+ * */
+ note: Annotation;
+ /**
+ * How the medication is to be used by the patient or administered by the caregiver
+ * */
+ dosageInstruction: Dosage;
+ /**
+ * Whether a substitution was performed on the dispense
+ * */
+ substitution: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Whether a substitution was or was not performed on the dispense
+ * */
+ wasSubstituted: boolean;
+ /**
+ * Code signifying whether a different drug was dispensed from what was prescribed
+ * */
+ type: CodeableConcept;
+ /**
+ * Why was substitution made
+ * */
+ reason: CodeableConcept;
+ /**
+ * Who is responsible for the substitution
+ * */
+ responsibleParty: Reference;
+ };
+ /**
+ * Clinical issue with action
+ * */
+ detectedIssue: Reference;
+ /**
+ * A list of relevant lifecycle events
+ * */
+ eventHistory: Reference;
+};
+
+type MedicationDispense__lookups = {
+ "MedicationDispense": MedicationDispense_MedicationDispense_Props;
+};
+
+export declare function medicationDispense(type: T, props: MedicationDispense__lookups[T]);;
+
+type MedicationKnowledge_MedicationKnowledge_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Code that identifies this medication
+ * */
+ code: CodeableConcept;
+ /**
+ * active | inactive | entered-in-error
+ * */
+ status: string;
+ /**
+ * Manufacturer of the item
+ * */
+ manufacturer: Reference;
+ /**
+ * powder | tablets | capsule +
+ * */
+ doseForm: CodeableConcept;
+ /**
+ * Amount of drug in package
+ * */
+ amount: Quantity;
+ /**
+ * Additional names for a medication
+ * */
+ synonym: string;
+ /**
+ * Associated or related medication information
+ * */
+ relatedMedicationKnowledge: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Category of medicationKnowledge
+ * */
+ type: CodeableConcept;
+ /**
+ * Associated documentation about the associated medication knowledge
+ * */
+ reference: Reference;
+ };
+ /**
+ * A medication resource that is associated with this medication
+ * */
+ associatedMedication: Reference;
+ /**
+ * Category of the medication or product
+ * */
+ productType: CodeableConcept;
+ /**
+ * Associated documentation about the medication
+ * */
+ monograph: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The category of medication document
+ * */
+ type: CodeableConcept;
+ /**
+ * Associated documentation about the medication
+ * */
+ source: Reference;
+ };
+ /**
+ * Active or inactive ingredient
+ * */
+ ingredient: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Medication(s) or substance(s) contained in the medication
+ * */
+ item: CodeableConcept;
+ /**
+ * Active ingredient indicator
+ * */
+ isActive: boolean;
+ /**
+ * Quantity of ingredient present
+ * */
+ strength: Ratio;
+ };
+ /**
+ * The instructions for preparing the medication
+ * */
+ preparationInstruction: markdown;
+ /**
+ * The intended or approved route of administration
+ * */
+ intendedRoute: CodeableConcept;
+ /**
+ * The pricing of the medication
+ * */
+ cost: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The category of the cost information
+ * */
+ type: CodeableConcept;
+ /**
+ * The source or owner for the price information
+ * */
+ source: string;
+ /**
+ * The price of the medication
+ * */
+ cost: Money;
+ };
+ /**
+ * Program under which a medication is reviewed
+ * */
+ monitoringProgram: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of program under which the medication is monitored
+ * */
+ type: CodeableConcept;
+ /**
+ * Name of the reviewing program
+ * */
+ name: string;
+ };
+ /**
+ * Guidelines for administration of the medication
+ * */
+ administrationGuidelines: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Dosage for the medication for the specific guidelines
+ * */
+ dosage: Dosage;
+ /**
+ * Indication for use that apply to the specific administration guidelines
+ * */
+ indication: CodeableConcept;
+ /**
+ * The specific characteristic
+ * */
+ patientCharacteristics: string;
+ };
+ /**
+ * Categorization of the medication within a formulary or classification system
+ * */
+ medicineClassification: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The type of category for the medication (for example, therapeutic classification, therapeutic sub-classification)
+ * */
+ type: CodeableConcept;
+ /**
+ * Specific category assigned to the medication
+ * */
+ classification: CodeableConcept;
+ };
+ /**
+ * Details about packaged medications
+ * */
+ packaging: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A code that defines the specific type of packaging that the medication can be found in
+ * */
+ type: CodeableConcept;
+ /**
+ * The number of product units the package would contain if fully loaded
+ * */
+ quantity: Quantity;
+ };
+ /**
+ * Specifies descriptive properties of the medicine
+ * */
+ drugCharacteristic: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Code specifying the type of characteristic of medication
+ * */
+ type: CodeableConcept;
+ /**
+ * Description of the characteristic
+ * */
+ value: CodeableConcept;
+ };
+ /**
+ * Potential clinical issue with or between medication(s)
+ * */
+ contraindication: Reference;
+ /**
+ * Regulatory information about a medication
+ * */
+ regulatory: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Specifies the authority of the regulation
+ * */
+ regulatoryAuthority: Reference;
+ /**
+ * Specifies if regulation allows for changes in the medication when dispensing
+ * */
+ substitution: boolean;
+ /**
+ * Specifies the specific drug schedule
+ * */
+ schedule: CodeableConcept;
+ /**
+ * The period that applies to the maximum number of units
+ * */
+ maxDispense: Duration;
+ };
+ /**
+ * The time course of drug absorption, distribution, metabolism and excretion of a medication from the body
+ * */
+ kinetics: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The drug concentration measured at certain discrete points in time
+ * */
+ areaUnderCurve: Quantity;
+ /**
+ * The median lethal dose of a drug
+ * */
+ lethalDose50: Quantity;
+ /**
+ * Time required for concentration in the body to decrease by half
+ * */
+ halfLifePeriod: Duration;
+ };
+};
+
+type MedicationKnowledge__lookups = {
+ "MedicationKnowledge": MedicationKnowledge_MedicationKnowledge_Props;
+};
+
+export declare function medicationKnowledge(type: T, props: MedicationKnowledge__lookups[T]);;
+
+type MedicationRequest_MedicationRequest_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External ids for this request
+ * */
+ identifier: Identifier;
+ /**
+ * active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown
+ * */
+ status: string;
+ /**
+ * Reason for current status
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
+ * */
+ intent: string;
+ /**
+ * Type of medication usage
+ * */
+ category: CodeableConcept;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * True if request is prohibiting action
+ * */
+ doNotPerform: boolean;
+ /**
+ * Reported rather than primary record
+ * */
+ reported: boolean;
+ /**
+ * Medication to be taken
+ * */
+ medication: CodeableConcept;
+ /**
+ * Who or group medication request is for
+ * */
+ subject: Reference;
+ /**
+ * Encounter created as part of encounter/admission/stay
+ * */
+ encounter: Reference;
+ /**
+ * Information to support ordering of the medication
+ * */
+ supportingInformation: Reference;
+ /**
+ * When request was initially authored
+ * */
+ authoredOn: string;
+ /**
+ * Who/What requested the Request
+ * */
+ requester: Reference;
+ /**
+ * Intended performer of administration
+ * */
+ performer: Reference;
+ /**
+ * Desired kind of performer of the medication administration
+ * */
+ performerType: CodeableConcept;
+ /**
+ * Person who entered the request
+ * */
+ recorder: Reference;
+ /**
+ * Reason or indication for ordering or not ordering the medication
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Condition or observation that supports why the prescription is being written
+ * */
+ reasonReference: Reference;
+ /**
+ * Instantiates FHIR protocol or definition
+ * */
+ instantiatesCanonical: any;
+ /**
+ * Instantiates external protocol or definition
+ * */
+ instantiatesUri: string;
+ /**
+ * What request fulfills
+ * */
+ basedOn: Reference;
+ /**
+ * Composite request this is part of
+ * */
+ groupIdentifier: Identifier;
+ /**
+ * Overall pattern of medication administration
+ * */
+ courseOfTherapyType: CodeableConcept;
+ /**
+ * Associated insurance coverage
+ * */
+ insurance: Reference;
+ /**
+ * Information about the prescription
+ * */
+ note: Annotation;
+ /**
+ * How the medication should be taken
+ * */
+ dosageInstruction: Dosage;
+ /**
+ * Medication supply authorization
+ * */
+ dispenseRequest: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * First fill duration
+ * */
+ initialFill: Duration;
+ /**
+ * Minimum period of time between dispenses
+ * */
+ dispenseInterval: Duration;
+ /**
+ * Time period supply is authorized for
+ * */
+ validityPeriod: Period;
+ /**
+ * Number of refills authorized
+ * */
+ numberOfRepeatsAllowed: number;
+ /**
+ * Amount of medication to supply per dispense
+ * */
+ quantity: Quantity;
+ /**
+ * Number of days supply per dispense
+ * */
+ expectedSupplyDuration: Duration;
+ /**
+ * Intended dispenser
+ * */
+ performer: Reference;
+ };
+ /**
+ * Any restrictions on medication substitution
+ * */
+ substitution: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Whether substitution is allowed or not
+ * */
+ allowed: boolean;
+ /**
+ * Why should (not) substitution be made
+ * */
+ reason: CodeableConcept;
+ };
+ /**
+ * An order/prescription that is being replaced
+ * */
+ priorPrescription: Reference;
+ /**
+ * Clinical Issue with action
+ * */
+ detectedIssue: Reference;
+ /**
+ * A list of events of interest in the lifecycle
+ * */
+ eventHistory: Reference;
+};
+
+type MedicationRequest__lookups = {
+ "MedicationRequest": MedicationRequest_MedicationRequest_Props;
+};
+
+export declare function medicationRequest(type: T, props: MedicationRequest__lookups[T]);;
+
+type MedicationStatement_MedicationStatement_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Fulfils plan, proposal or order
+ * */
+ basedOn: Reference;
+ /**
+ * Part of referenced event
+ * */
+ partOf: Reference;
+ /**
+ * active | completed | entered-in-error | intended | stopped | on-hold | unknown | not-taken
+ * */
+ status: string;
+ /**
+ * Reason for current status
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * Type of medication usage
+ * */
+ category: CodeableConcept;
+ /**
+ * What medication was taken
+ * */
+ medication: CodeableConcept;
+ /**
+ * Who is/was taking the medication
+ * */
+ subject: Reference;
+ /**
+ * Encounter / Episode associated with MedicationStatement
+ * */
+ context: Reference;
+ /**
+ * The date/time or interval when the medication is/was/will be taken
+ * */
+ effective: string;
+ /**
+ * When the statement was asserted?
+ * */
+ dateAsserted: string;
+ /**
+ * Person or organization that provided the information about the taking of this medication
+ * */
+ informationSource: Reference;
+ /**
+ * Additional supporting information
+ * */
+ derivedFrom: Reference;
+ /**
+ * Reason for why the medication is being/was taken
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Condition or observation that supports why the medication is being/was taken
+ * */
+ reasonReference: Reference;
+ /**
+ * Further information about the statement
+ * */
+ note: Annotation;
+ /**
+ * Details of how medication is/was taken or should be taken
+ * */
+ dosage: Dosage;
+};
+
+type MedicationStatement__lookups = {
+ "MedicationStatement": MedicationStatement_MedicationStatement_Props;
+};
+
+export declare function medicationStatement(type: T, props: MedicationStatement__lookups[T]);;
+
+type MedicinalProductDefinition_MedicinalProductDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier for this product. Could be an MPID
+ * */
+ identifier: Identifier;
+ /**
+ * Regulatory type, e.g. Investigational or Authorized
+ * */
+ type: CodeableConcept;
+ /**
+ * If this medicine applies to human or veterinary uses
+ * */
+ domain: CodeableConcept;
+ /**
+ * A business identifier relating to a specific version of the product
+ * */
+ version: string;
+ /**
+ * The status within the lifecycle of this product record
+ * */
+ status: CodeableConcept;
+ /**
+ * The date at which the given status became applicable
+ * */
+ statusDate: string;
+ /**
+ * General description of this product
+ * */
+ description: markdown;
+ /**
+ * The dose form for a single part product, or combined form of a multiple part product
+ * */
+ combinedPharmaceuticalDoseForm: CodeableConcept;
+ /**
+ * The path by which the product is taken into or makes contact with the body
+ * */
+ route: CodeableConcept;
+ /**
+ * Description of indication(s) for this product, used when structured indications are not required
+ * */
+ indication: markdown;
+ /**
+ * The legal status of supply of the medicinal product as classified by the regulator
+ * */
+ legalStatusOfSupply: CodeableConcept;
+ /**
+ * Whether the Medicinal Product is subject to additional monitoring for regulatory reasons
+ * */
+ additionalMonitoringIndicator: CodeableConcept;
+ /**
+ * Whether the Medicinal Product is subject to special measures for regulatory reasons
+ * */
+ specialMeasures: CodeableConcept;
+ /**
+ * If authorised for use in children
+ * */
+ pediatricUseIndicator: CodeableConcept;
+ /**
+ * Allows the product to be classified by various systems
+ * */
+ classification: CodeableConcept;
+ /**
+ * Marketing status of the medicinal product, in contrast to marketing authorization
+ * */
+ marketingStatus: MarketingStatus;
+ /**
+ * Package type for the product
+ * */
+ packagedMedicinalProduct: CodeableConcept;
+ /**
+ * The ingredients of this medicinal product - when not detailed in other resources
+ * */
+ ingredient: CodeableConcept;
+ /**
+ * Any component of the drug product which is not the chemical entity defined as the drug substance, or an excipient in the drug product
+ * */
+ impurity: CodeableReference;
+ /**
+ * Additional documentation about the medicinal product
+ * */
+ attachedDocument: Reference;
+ /**
+ * A master file for the medicinal product (e.g. Pharmacovigilance System Master File)
+ * */
+ masterFile: Reference;
+ /**
+ * A product specific contact, person (in a role), or an organization
+ * */
+ contact: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Allows the contact to be classified, for example QPPV, Pharmacovigilance Enquiry Information
+ * */
+ type: CodeableConcept;
+ /**
+ * A product specific contact, person (in a role), or an organization
+ * */
+ contact: Reference;
+ };
+ /**
+ * Clinical trials or studies that this product is involved in
+ * */
+ clinicalTrial: Reference;
+ /**
+ * A code that this product is known by, within some formal terminology
+ * */
+ code: Coding;
+ /**
+ * The product's name, including full name and possibly coded parts
+ * */
+ name: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The full product name
+ * */
+ productName: string;
+ /**
+ * Type of product name, such as rINN, BAN, Proprietary, Non-Proprietary
+ * */
+ type: CodeableConcept;
+ /**
+ * Identifying type for this part of the name (e.g. strength part)
+ * */
+ namePart: CodeableConcept;
+ /**
+ * Language code for this name
+ * */
+ countryLanguage: CodeableConcept;
+ };
+ /**
+ * Reference to another product, e.g. for linking authorised to investigational product
+ * */
+ crossReference: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Reference to another product, e.g. for linking authorised to investigational product
+ * */
+ product: CodeableReference;
+ /**
+ * The type of relationship, for instance branded to generic or virtual to actual product
+ * */
+ type: CodeableConcept;
+ };
+ /**
+ * A manufacturing or administrative process for the medicinal product
+ * */
+ operation: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The type of manufacturing operation e.g. manufacturing itself, re-packaging
+ * */
+ type: CodeableReference;
+ /**
+ * Date range of applicability
+ * */
+ effectiveDate: Period;
+ /**
+ * The organization responsible for the particular process, e.g. the manufacturer or importer
+ * */
+ organization: Reference;
+ /**
+ * Specifies whether this process is considered proprietary or confidential
+ * */
+ confidentialityIndicator: CodeableConcept;
+ };
+ /**
+ * Key product features such as "sugar free", "modified release"
+ * */
+ characteristic: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A code expressing the type of characteristic
+ * */
+ type: CodeableConcept;
+ /**
+ * A value for the characteristic
+ * */
+ value: CodeableConcept;
+ };
+};
+
+type MedicinalProductDefinition__lookups = {
+ "MedicinalProductDefinition": MedicinalProductDefinition_MedicinalProductDefinition_Props;
+};
+
+export declare function medicinalProductDefinition(type: T, props: MedicinalProductDefinition__lookups[T]);;
+
+type MessageDefinition_MessageDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for a given MessageDefinition
+ * */
+ url: string;
+ /**
+ * Primary key for the message definition on a given server
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the message definition
+ * */
+ version: string;
+ /**
+ * Name for this message definition (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this message definition (human friendly)
+ * */
+ title: string;
+ /**
+ * Takes the place of
+ * */
+ replaces: any;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the message definition
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for message definition (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this message definition is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * Definition this one is based on
+ * */
+ base: any;
+ /**
+ * Protocol/workflow this is part of
+ * */
+ parent: any;
+ /**
+ * Event code or link to the EventDefinition
+ * */
+ event: Coding;
+ /**
+ * consequence | currency | notification
+ * */
+ category: string;
+ /**
+ * Resource(s) that are the subject of the event
+ * */
+ focus: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of resource
+ * */
+ code: string;
+ /**
+ * Profile that must be adhered to by focus
+ * */
+ profile: any;
+ /**
+ * Minimum number of focuses of this type
+ * */
+ min: number;
+ /**
+ * Maximum number of focuses of this type
+ * */
+ max: string;
+ };
+ /**
+ * always | on-error | never | on-success
+ * */
+ responseRequired: string;
+ /**
+ * Responses to this message
+ * */
+ allowedResponse: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Reference to allowed message definition response
+ * */
+ message: any;
+ /**
+ * When should this response be used
+ * */
+ situation: markdown;
+ };
+ /**
+ * Canonical reference to a GraphDefinition
+ * */
+ graph: any;
+};
+
+type MessageDefinition__lookups = {
+ "MessageDefinition": MessageDefinition_MessageDefinition_Props;
+};
+
+export declare function messageDefinition(type: T, props: MessageDefinition__lookups[T]);;
+
+type MessageHeader_MessageHeader_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Code for the event this message represents or link to event definition
+ * */
+ event: Coding;
+ /**
+ * Message destination application(s)
+ * */
+ destination: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Name of system
+ * */
+ name: string;
+ /**
+ * Particular delivery destination within the destination
+ * */
+ target: Reference;
+ /**
+ * Actual destination address or id
+ * */
+ endpoint: url;
+ /**
+ * Intended "real-world" recipient for the data
+ * */
+ receiver: Reference;
+ };
+ /**
+ * Real world sender of the message
+ * */
+ sender: Reference;
+ /**
+ * The source of the data entry
+ * */
+ enterer: Reference;
+ /**
+ * The source of the decision
+ * */
+ author: Reference;
+ /**
+ * Message source application
+ * */
+ source: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Name of system
+ * */
+ name: string;
+ /**
+ * Name of software running the system
+ * */
+ software: string;
+ /**
+ * Version of software running
+ * */
+ version: string;
+ /**
+ * Human contact for problems
+ * */
+ contact: ContactPoint;
+ /**
+ * Actual message source address or id
+ * */
+ endpoint: url;
+ };
+ /**
+ * Final responsibility for event
+ * */
+ responsible: Reference;
+ /**
+ * Cause of event
+ * */
+ reason: CodeableConcept;
+ /**
+ * If this is a reply to prior message
+ * */
+ response: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Id of original message
+ * */
+ identifier: string;
+ /**
+ * ok | transient-error | fatal-error
+ * */
+ code: string;
+ /**
+ * Specific list of hints/warnings/errors
+ * */
+ details: Reference;
+ };
+ /**
+ * The actual content of the message
+ * */
+ focus: Reference;
+ /**
+ * Link to the definition for this message
+ * */
+ definition: any;
+};
+
+type MessageHeader__lookups = {
+ "MessageHeader": MessageHeader_MessageHeader_Props;
+};
+
+export declare function messageHeader(type: T, props: MessageHeader__lookups[T]);;
+
+type MolecularSequence_MolecularSequence_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique ID for this particular sequence. This is a FHIR-defined id
+ * */
+ identifier: Identifier;
+ /**
+ * aa | dna | rna
+ * */
+ type: string;
+ /**
+ * 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)
+ * */
+ coordinateSystem: number;
+ /**
+ * Who and/or what this is about
+ * */
+ patient: Reference;
+ /**
+ * Specimen used for sequencing
+ * */
+ specimen: Reference;
+ /**
+ * The method for sequencing
+ * */
+ device: Reference;
+ /**
+ * Who should be responsible for test result
+ * */
+ performer: Reference;
+ /**
+ * The number of copies of the sequence of interest. (RNASeq)
+ * */
+ quantity: Quantity;
+ /**
+ * A sequence used as reference
+ * */
+ referenceSeq: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Chromosome containing genetic finding
+ * */
+ chromosome: CodeableConcept;
+ /**
+ * The Genome Build used for reference, following GRCh build versions e.g. 'GRCh 37'
+ * */
+ genomeBuild: string;
+ /**
+ * sense | antisense
+ * */
+ orientation: string;
+ /**
+ * Reference identifier
+ * */
+ referenceSeqId: CodeableConcept;
+ /**
+ * A pointer to another MolecularSequence entity as reference sequence
+ * */
+ referenceSeqPointer: Reference;
+ /**
+ * A string to represent reference sequence
+ * */
+ referenceSeqString: string;
+ /**
+ * watson | crick
+ * */
+ strand: string;
+ /**
+ * Start position of the window on the reference sequence
+ * */
+ windowStart: number;
+ /**
+ * End position of the window on the reference sequence
+ * */
+ windowEnd: number;
+ };
+ /**
+ * Variant in sequence
+ * */
+ variant: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Start position of the variant on the reference sequence
+ * */
+ start: number;
+ /**
+ * End position of the variant on the reference sequence
+ * */
+ end: number;
+ /**
+ * Allele that was observed
+ * */
+ observedAllele: string;
+ /**
+ * Allele in the reference sequence
+ * */
+ referenceAllele: string;
+ /**
+ * Extended CIGAR string for aligning the sequence with reference bases
+ * */
+ cigar: string;
+ /**
+ * Pointer to observed variant information
+ * */
+ variantPointer: Reference;
+ };
+ /**
+ * Sequence that was observed
+ * */
+ observedSeq: string;
+ /**
+ * An set of value as quality of sequence
+ * */
+ quality: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * indel | snp | unknown
+ * */
+ type: string;
+ /**
+ * Standard sequence for comparison
+ * */
+ standardSequence: CodeableConcept;
+ /**
+ * Start position of the sequence
+ * */
+ start: number;
+ /**
+ * End position of the sequence
+ * */
+ end: number;
+ /**
+ * Quality score for the comparison
+ * */
+ score: Quantity;
+ /**
+ * Method to get quality
+ * */
+ method: CodeableConcept;
+ /**
+ * True positives from the perspective of the truth data
+ * */
+ truthTP: number;
+ /**
+ * True positives from the perspective of the query data
+ * */
+ queryTP: number;
+ /**
+ * False negatives
+ * */
+ truthFN: number;
+ /**
+ * False positives
+ * */
+ queryFP: number;
+ /**
+ * False positives where the non-REF alleles in the Truth and Query Call Sets match
+ * */
+ gtFP: number;
+ /**
+ * Precision of comparison
+ * */
+ precision: number;
+ /**
+ * Recall of comparison
+ * */
+ recall: number;
+ /**
+ * F-score
+ * */
+ fScore: number;
+ /**
+ * FScore of the GQ score
+ * */
+ roc: number;
+ };
+ /**
+ * Average number of reads representing a given nucleotide in the reconstructed sequence
+ * */
+ readCoverage: number;
+ /**
+ * External repository which contains detailed report related with observedSeq in this resource
+ * */
+ repository: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * directlink | openapi | login | oauth | other
+ * */
+ type: string;
+ /**
+ * URI of the repository
+ * */
+ url: string;
+ /**
+ * Repository's name
+ * */
+ name: string;
+ /**
+ * Id of the dataset that used to call for dataset in repository
+ * */
+ datasetId: string;
+ /**
+ * Id of the variantset that used to call for variantset in repository
+ * */
+ variantsetId: string;
+ /**
+ * Id of the read
+ * */
+ readsetId: string;
+ };
+ /**
+ * Pointer to next atomic sequence
+ * */
+ pointer: Reference;
+ /**
+ * Structural variant
+ * */
+ structureVariant: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Structural variant change type
+ * */
+ variantType: CodeableConcept;
+ /**
+ * Does the structural variant have base pair resolution breakpoints?
+ * */
+ exact: boolean;
+ /**
+ * Structural variant length
+ * */
+ length: number;
+ /**
+ * Structural variant outer end
+ * */
+ outer: number;
+ /**
+ * Structural variant inner end
+ * */
+ inner: number;
+ };
+};
+
+type MolecularSequence__lookups = {
+ "MolecularSequence": MolecularSequence_MolecularSequence_Props;
+};
+
+export declare function molecularSequence(type: T, props: MolecularSequence__lookups[T]);;
+
+type NamingSystem_NamingSystem_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Name for this naming system (computer friendly)
+ * */
+ name: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * codesystem | identifier | root
+ * */
+ kind: string;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Who maintains system namespace?
+ * */
+ responsible: string;
+ /**
+ * e.g. driver, provider, patient, bank etc.
+ * */
+ type: CodeableConcept;
+ /**
+ * Natural language description of the naming system
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for naming system (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * How/where is it used
+ * */
+ usage: string;
+ /**
+ * Unique identifiers used for system
+ * */
+ uniqueId: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * oid | uuid | uri | other
+ * */
+ type: string;
+ /**
+ * The unique identifier
+ * */
+ value: string;
+ /**
+ * Is this the id that should be used for this type
+ * */
+ preferred: boolean;
+ /**
+ * Notes about identifier usage
+ * */
+ comment: string;
+ /**
+ * When is identifier valid?
+ * */
+ period: Period;
+ };
+};
+
+type NamingSystem__lookups = {
+ "NamingSystem": NamingSystem_NamingSystem_Props;
+};
+
+export declare function namingSystem(type: T, props: NamingSystem__lookups[T]);;
+
+type NutritionOrder_NutritionOrder_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifiers assigned to this order
+ * */
+ identifier: Identifier;
+ /**
+ * Instantiates FHIR protocol or definition
+ * */
+ instantiatesCanonical: any;
+ /**
+ * Instantiates external protocol or definition
+ * */
+ instantiatesUri: string;
+ /**
+ * Instantiates protocol or definition
+ * */
+ instantiates: string;
+ /**
+ * draft | active | on-hold | revoked | completed | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
+ * */
+ intent: string;
+ /**
+ * The person who requires the diet, formula or nutritional supplement
+ * */
+ patient: Reference;
+ /**
+ * The encounter associated with this nutrition order
+ * */
+ encounter: Reference;
+ /**
+ * Date and time the nutrition order was requested
+ * */
+ dateTime: string;
+ /**
+ * Who ordered the diet, formula or nutritional supplement
+ * */
+ orderer: Reference;
+ /**
+ * List of the patient's food and nutrition-related allergies and intolerances
+ * */
+ allergyIntolerance: Reference;
+ /**
+ * Order-specific modifier about the type of food that should be given
+ * */
+ foodPreferenceModifier: CodeableConcept;
+ /**
+ * Order-specific modifier about the type of food that should not be given
+ * */
+ excludeFoodModifier: CodeableConcept;
+ /**
+ * Oral diet components
+ * */
+ oralDiet: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of oral diet or diet restrictions that describe what can be consumed orally
+ * */
+ type: CodeableConcept;
+ /**
+ * Scheduled frequency of diet
+ * */
+ schedule: Timing;
+ /**
+ * Quantity of the specified nutrient
+ * */
+ nutrient: Quantity;
+ /**
+ * Concepts that are used to identify an entity that is ingested for nutritional purposes
+ * */
+ texture: CodeableConcept;
+ /**
+ * The required consistency of fluids and liquids provided to the patient
+ * */
+ fluidConsistencyType: CodeableConcept;
+ /**
+ * Instructions or additional information about the oral diet
+ * */
+ instruction: string;
+ };
+ /**
+ * Supplement components
+ * */
+ supplement: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of supplement product requested
+ * */
+ type: CodeableConcept;
+ /**
+ * Product or brand name of the nutritional supplement
+ * */
+ productName: string;
+ /**
+ * Scheduled frequency of supplement
+ * */
+ schedule: Timing;
+ /**
+ * Amount of the nutritional supplement
+ * */
+ quantity: Quantity;
+ /**
+ * Instructions or additional information about the oral supplement
+ * */
+ instruction: string;
+ };
+ /**
+ * Enteral formula components
+ * */
+ enteralFormula: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of enteral or infant formula
+ * */
+ baseFormulaType: CodeableConcept;
+ /**
+ * Product or brand name of the enteral or infant formula
+ * */
+ baseFormulaProductName: string;
+ /**
+ * Type of modular component to add to the feeding
+ * */
+ additiveType: CodeableConcept;
+ /**
+ * Product or brand name of the modular additive
+ * */
+ additiveProductName: string;
+ /**
+ * Amount of energy per specified volume that is required
+ * */
+ caloricDensity: Quantity;
+ /**
+ * How the formula should enter the patient's gastrointestinal tract
+ * */
+ routeofAdministration: CodeableConcept;
+ /**
+ * Speed with which the formula is provided per period of time
+ * */
+ administration: Quantity;
+ /**
+ * Upper limit on formula volume per unit of time
+ * */
+ maxVolumeToDeliver: Quantity;
+ /**
+ * Formula feeding instructions expressed as text
+ * */
+ administrationInstruction: string;
+ };
+ /**
+ * Comments
+ * */
+ note: Annotation;
+};
+
+type NutritionOrder__lookups = {
+ "NutritionOrder": NutritionOrder_NutritionOrder_Props;
+};
+
+export declare function nutritionOrder(type: T, props: NutritionOrder__lookups[T]);;
+
+type NutritionProduct_NutritionProduct_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * active | inactive | entered-in-error
+ * */
+ status: string;
+ /**
+ * A category or class of the nutrition product (halal, kosher, gluten free, vegan, etc)
+ * */
+ category: CodeableConcept;
+ /**
+ * A code designating a specific type of nutritional product
+ * */
+ code: CodeableConcept;
+ /**
+ * Manufacturer, representative or officially responsible for the product
+ * */
+ manufacturer: Reference;
+ /**
+ * The product's nutritional information expressed by the nutrients
+ * */
+ nutrient: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The (relevant) nutrients in the product
+ * */
+ item: CodeableReference;
+ /**
+ * The amount of nutrient expressed in one or more units: X per pack / per serving / per dose
+ * */
+ amount: Ratio;
+ };
+ /**
+ * Ingredients contained in this product
+ * */
+ ingredient: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The ingredient contained in the product
+ * */
+ item: CodeableReference;
+ /**
+ * The amount of ingredient that is in the product
+ * */
+ amount: Ratio;
+ };
+ /**
+ * Known or suspected allergens that are a part of this product
+ * */
+ knownAllergen: CodeableReference;
+ /**
+ * Specifies descriptive properties of the nutrition product
+ * */
+ productCharacteristic: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Code specifying the type of characteristic
+ * */
+ type: CodeableConcept;
+ /**
+ * The value of the characteristic
+ * */
+ value: CodeableConcept;
+ };
+ /**
+ * One or several physical instances or occurrences of the nutrition product
+ * */
+ instance: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The amount of items or instances
+ * */
+ quantity: Quantity;
+ /**
+ * The identifier for the physical instance, typically a serial number
+ * */
+ identifier: Identifier;
+ /**
+ * The identification of the batch or lot of the product
+ * */
+ lotNumber: string;
+ /**
+ * The expiry date or date and time for the product
+ * */
+ expiry: string;
+ /**
+ * The date until which the product is expected to be good for consumption
+ * */
+ useBy: string;
+ };
+ /**
+ * Comments made about the product
+ * */
+ note: Annotation;
+};
+
+type NutritionProduct__lookups = {
+ "NutritionProduct": NutritionProduct_NutritionProduct_Props;
+};
+
+export declare function nutritionProduct(type: T, props: NutritionProduct__lookups[T]);;
+
+type Observation_Observation_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for observation
+ * */
+ identifier: Identifier;
+ /**
+ * Fulfills plan, proposal or order
+ * */
+ basedOn: Reference;
+ /**
+ * Part of referenced event
+ * */
+ partOf: Reference;
+ /**
+ * registered | preliminary | final | amended +
+ * */
+ status: string;
+ /**
+ * Classification of type of observation
+ * */
+ category: CodeableConcept;
+ /**
+ * Type of observation (code / type)
+ * */
+ code: CodeableConcept;
+ /**
+ * Who and/or what the observation is about
+ * */
+ subject: Reference;
+ /**
+ * What the observation is about, when it is not about the subject of record
+ * */
+ focus: Reference;
+ /**
+ * Healthcare event during which this observation is made
+ * */
+ encounter: Reference;
+ /**
+ * Clinically relevant time/time-period for observation
+ * */
+ effective: string;
+ /**
+ * Date/Time this version was made available
+ * */
+ issued: string;
+ /**
+ * Who is responsible for the observation
+ * */
+ performer: Reference;
+ /**
+ * Actual result
+ * */
+ value: Quantity;
+ /**
+ * Why the result is missing
+ * */
+ dataAbsentReason: CodeableConcept;
+ /**
+ * High, low, normal, etc.
+ * */
+ interpretation: CodeableConcept;
+ /**
+ * Comments about the observation
+ * */
+ note: Annotation;
+ /**
+ * Observed body part
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * How it was done
+ * */
+ method: CodeableConcept;
+ /**
+ * Specimen used for this observation
+ * */
+ specimen: Reference;
+ /**
+ * (Measurement) Device
+ * */
+ device: Reference;
+ /**
+ * Provides guide for interpretation
+ * */
+ referenceRange: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Low Range, if relevant
+ * */
+ low: Quantity;
+ /**
+ * High Range, if relevant
+ * */
+ high: Quantity;
+ /**
+ * Reference range qualifier
+ * */
+ type: CodeableConcept;
+ /**
+ * Reference range population
+ * */
+ appliesTo: CodeableConcept;
+ /**
+ * Applicable age range, if relevant
+ * */
+ age: Range;
+ /**
+ * Text based reference range in an observation
+ * */
+ text: string;
+ };
+ /**
+ * Related resource that belongs to the Observation group
+ * */
+ hasMember: Reference;
+ /**
+ * Related measurements the observation is made from
+ * */
+ derivedFrom: Reference;
+ /**
+ * Component results
+ * */
+ component: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of component observation (code / type)
+ * */
+ code: CodeableConcept;
+ /**
+ * Actual component result
+ * */
+ value: Quantity;
+ /**
+ * Why the component result is missing
+ * */
+ dataAbsentReason: CodeableConcept;
+ /**
+ * High, low, normal, etc.
+ * */
+ interpretation: CodeableConcept;
+ };
+};
+
+type Observation__lookups = {
+ "Observation": Observation_Observation_Props;
+};
+
+export declare function observation(type: T, props: Observation__lookups[T]);;
+
+type ObservationDefinition_ObservationDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Category of observation
+ * */
+ category: CodeableConcept;
+ /**
+ * Type of observation (code / type)
+ * */
+ code: CodeableConcept;
+ /**
+ * Business identifier for this ObservationDefinition instance
+ * */
+ identifier: Identifier;
+ /**
+ * Quantity | CodeableConcept | string | boolean | integer | Range | Ratio | SampledData | time | dateTime | Period
+ * */
+ permittedDataType: string;
+ /**
+ * Multiple results allowed
+ * */
+ multipleResultsAllowed: boolean;
+ /**
+ * Method used to produce the observation
+ * */
+ method: CodeableConcept;
+ /**
+ * Preferred report name
+ * */
+ preferredReportName: string;
+ /**
+ * Characteristics of quantitative results
+ * */
+ quantitativeDetails: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Customary unit for quantitative results
+ * */
+ customaryUnit: CodeableConcept;
+ /**
+ * SI unit for quantitative results
+ * */
+ unit: CodeableConcept;
+ /**
+ * SI to Customary unit conversion factor
+ * */
+ conversionFactor: number;
+ /**
+ * Decimal precision of observation quantitative results
+ * */
+ decimalPrecision: number;
+ };
+ /**
+ * Qualified range for continuous and ordinal observation results
+ * */
+ qualifiedInterval: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * reference | critical | absolute
+ * */
+ category: string;
+ /**
+ * The interval itself, for continuous or ordinal observations
+ * */
+ range: Range;
+ /**
+ * Range context qualifier
+ * */
+ context: CodeableConcept;
+ /**
+ * Targetted population of the range
+ * */
+ appliesTo: CodeableConcept;
+ /**
+ * male | female | other | unknown
+ * */
+ gender: string;
+ /**
+ * Applicable age range, if relevant
+ * */
+ age: Range;
+ /**
+ * Applicable gestational age range, if relevant
+ * */
+ gestationalAge: Range;
+ /**
+ * Condition associated with the reference range
+ * */
+ condition: string;
+ };
+ /**
+ * Value set of valid coded values for the observations conforming to this ObservationDefinition
+ * */
+ validCodedValueSet: Reference;
+ /**
+ * Value set of normal coded values for the observations conforming to this ObservationDefinition
+ * */
+ normalCodedValueSet: Reference;
+ /**
+ * Value set of abnormal coded values for the observations conforming to this ObservationDefinition
+ * */
+ abnormalCodedValueSet: Reference;
+ /**
+ * Value set of critical coded values for the observations conforming to this ObservationDefinition
+ * */
+ criticalCodedValueSet: Reference;
+};
+
+type ObservationDefinition__lookups = {
+ "ObservationDefinition": ObservationDefinition_ObservationDefinition_Props;
+};
+
+export declare function observationDefinition(type: T, props: ObservationDefinition__lookups[T]);;
+
+type OperationDefinition_OperationDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this operation definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Business version of the operation definition
+ * */
+ version: string;
+ /**
+ * Name for this operation definition (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this operation definition (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * operation | query
+ * */
+ kind: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the operation definition
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for operation definition (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this operation definition is defined
+ * */
+ purpose: markdown;
+ /**
+ * Whether content is changed by the operation
+ * */
+ affectsState: boolean;
+ /**
+ * Name used to invoke the operation
+ * */
+ code: string;
+ /**
+ * Additional information about use
+ * */
+ comment: markdown;
+ /**
+ * Marks this as a profile of the base
+ * */
+ base: any;
+ /**
+ * Types this operation applies to
+ * */
+ resource: string;
+ /**
+ * Invoke at the system level?
+ * */
+ system: boolean;
+ /**
+ * Invoke at the type level?
+ * */
+ type: boolean;
+ /**
+ * Invoke on an instance?
+ * */
+ instance: boolean;
+ /**
+ * Validation information for in parameters
+ * */
+ inputProfile: any;
+ /**
+ * Validation information for out parameters
+ * */
+ outputProfile: any;
+ /**
+ * Parameters for the operation/query
+ * */
+ parameter: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Name in Parameters.parameter.name or in URL
+ * */
+ name: string;
+ /**
+ * in | out
+ * */
+ use: string;
+ /**
+ * Minimum Cardinality
+ * */
+ min: number;
+ /**
+ * Maximum Cardinality (a number or *)
+ * */
+ max: string;
+ /**
+ * Description of meaning/use
+ * */
+ documentation: string;
+ /**
+ * What type this parameter has
+ * */
+ type: string;
+ /**
+ * If type is Reference | canonical, allowed targets
+ * */
+ targetProfile: any;
+ /**
+ * number | date | string | token | reference | composite | quantity | uri | special
+ * */
+ searchType: string;
+ /**
+ * Source of value set
+ * */
+ binding: any;
+ /**
+ * Element id of reference
+ * */
+ referencedFrom: string;
+ };
+ /**
+ * Define overloaded variants for when generating code
+ * */
+ overload: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Name of parameter to include in overload
+ * */
+ parameterName: string;
+ /**
+ * Comments to go on overload
+ * */
+ comment: string;
+ };
+};
+
+type OperationDefinition__lookups = {
+ "OperationDefinition": OperationDefinition_OperationDefinition_Props;
+};
+
+export declare function operationDefinition(type: T, props: OperationDefinition__lookups[T]);;
+
+type OperationOutcome_OperationOutcome_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * A single issue associated with the action
+ * */
+ issue: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * fatal | error | warning | information
+ * */
+ severity: string;
+ /**
+ * Error or warning code
+ * */
+ code: string;
+ /**
+ * Additional details about the error
+ * */
+ details: CodeableConcept;
+ /**
+ * Additional diagnostic information about the issue
+ * */
+ diagnostics: string;
+ /**
+ * Deprecated: Path of element(s) related to issue
+ * */
+ location: string;
+ /**
+ * FHIRPath of element(s) related to issue
+ * */
+ expression: string;
+ };
+};
+
+type OperationOutcome__lookups = {
+ "OperationOutcome": OperationOutcome_OperationOutcome_Props;
+};
+
+export declare function operationOutcome(type: T, props: OperationOutcome__lookups[T]);;
+
+type Organization_Organization_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifies this organization across multiple systems
+ * */
+ identifier: Identifier;
+ /**
+ * Whether the organization's record is still in active use
+ * */
+ active: boolean;
+ /**
+ * Kind of organization
+ * */
+ type: CodeableConcept;
+ /**
+ * Name used for the organization
+ * */
+ name: string;
+ /**
+ * A list of alternate names that the organization is known as, or was known as in the past
+ * */
+ alias: string;
+ /**
+ * A contact detail for the organization
+ * */
+ telecom: ContactPoint;
+ /**
+ * An address for the organization
+ * */
+ address: Address;
+ /**
+ * The organization of which this organization forms a part
+ * */
+ partOf: Reference;
+ /**
+ * Contact for the organization for a certain purpose
+ * */
+ contact: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The type of contact
+ * */
+ purpose: CodeableConcept;
+ /**
+ * A name associated with the contact
+ * */
+ name: HumanName;
+ /**
+ * Contact details (telephone, email, etc.) for a contact
+ * */
+ telecom: ContactPoint;
+ /**
+ * Visiting or postal addresses for the contact
+ * */
+ address: Address;
+ };
+ /**
+ * Technical endpoints providing access to services operated for the organization
+ * */
+ endpoint: Reference;
+};
+
+type Organization__lookups = {
+ "Organization": Organization_Organization_Props;
+};
+
+export declare function organization(type: T, props: Organization__lookups[T]);;
+
+type OrganizationAffiliation_OrganizationAffiliation_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifiers that are specific to this role
+ * */
+ identifier: Identifier;
+ /**
+ * Whether this organization affiliation record is in active use
+ * */
+ active: boolean;
+ /**
+ * The period during which the participatingOrganization is affiliated with the primary organization
+ * */
+ period: Period;
+ /**
+ * Organization where the role is available
+ * */
+ organization: Reference;
+ /**
+ * Organization that provides/performs the role (e.g. providing services or is a member of)
+ * */
+ participatingOrganization: Reference;
+ /**
+ * Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined)
+ * */
+ network: Reference;
+ /**
+ * Definition of the role the participatingOrganization plays
+ * */
+ code: CodeableConcept;
+ /**
+ * Specific specialty of the participatingOrganization in the context of the role
+ * */
+ specialty: CodeableConcept;
+ /**
+ * The location(s) at which the role occurs
+ * */
+ location: Reference;
+ /**
+ * Healthcare services provided through the role
+ * */
+ healthcareService: Reference;
+ /**
+ * Contact details at the participatingOrganization relevant to this Affiliation
+ * */
+ telecom: ContactPoint;
+ /**
+ * Technical endpoints providing access to services operated for this role
+ * */
+ endpoint: Reference;
+};
+
+type OrganizationAffiliation__lookups = {
+ "OrganizationAffiliation": OrganizationAffiliation_OrganizationAffiliation_Props;
+};
+
+export declare function organizationAffiliation(type: T, props: OrganizationAffiliation__lookups[T]);;
+
+type PackagedProductDefinition_PackagedProductDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * A unique identifier for this package as whole
+ * */
+ identifier: Identifier;
+ /**
+ * A name for this package. Typically as listed in a drug formulary, catalogue, inventory etc
+ * */
+ name: string;
+ /**
+ * A high level category e.g. medicinal product, raw material, shipping container etc
+ * */
+ type: CodeableConcept;
+ /**
+ * The product that this is a pack for
+ * */
+ packageFor: Reference;
+ /**
+ * The status within the lifecycle of this item. High level - not intended to duplicate details elsewhere e.g. legal status, or authorization/marketing status
+ * */
+ status: CodeableConcept;
+ /**
+ * The date at which the given status became applicable
+ * */
+ statusDate: string;
+ /**
+ * A total of the complete count of contained items of a particular type/form, independent of sub-packaging or organization. This can be considered as the pack size
+ * */
+ containedItemQuantity: Quantity;
+ /**
+ * Textual description. Note that this is not the name of the package or product
+ * */
+ description: markdown;
+ /**
+ * The legal status of supply of the packaged item as classified by the regulator
+ * */
+ legalStatusOfSupply: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The actual status of supply. In what situation this package type may be supplied for use
+ * */
+ code: CodeableConcept;
+ /**
+ * The place where the legal status of supply applies
+ * */
+ jurisdiction: CodeableConcept;
+ };
+ /**
+ * Allows specifying that an item is on the market for sale, or that it is not available, and the dates and locations associated
+ * */
+ marketingStatus: MarketingStatus;
+ /**
+ * Allows the key features to be recorded, such as "hospital pack", "nurse prescribable"
+ * */
+ characteristic: CodeableConcept;
+ /**
+ * If the drug product is supplied with another item such as a diluent or adjuvant
+ * */
+ copackagedIndicator: boolean;
+ /**
+ * Manufacturer of this package type (multiple means these are all possible manufacturers)
+ * */
+ manufacturer: Reference;
+ /**
+ * A packaging item, as a container for medically related items, possibly with other packaging items within, or a packaging component, such as bottle cap
+ * */
+ package: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * An identifier that is specific to this particular part of the packaging. Including possibly a Data Carrier Identifier
+ * */
+ identifier: Identifier;
+ /**
+ * The physical type of the container of the items
+ * */
+ type: CodeableConcept;
+ /**
+ * The quantity of this level of packaging in the package that contains it (with the outermost level being 1)
+ * */
+ quantity: number;
+ /**
+ * Material type of the package item
+ * */
+ material: CodeableConcept;
+ /**
+ * A possible alternate material for this part of the packaging, that is allowed to be used instead of the usual material
+ * */
+ alternateMaterial: CodeableConcept;
+ /**
+ * Special precautions for storage, if any, can be specified using an appropriate controlled vocabulary. The controlled term and the controlled term identifier shall be specified
+ * */
+ shelfLifeStorage: CodeableConcept;
+ /**
+ * Manufacturer of this package Item (multiple means these are all possible manufacturers)
+ * */
+ manufacturer: Reference;
+ /**
+ * A value for the characteristic
+ * */
+ property: CodeableConcept;
+ /**
+ * The number of this type of item within this packaging
+ * */
+ containedItem: Quantity;
+ };
+};
+
+type PackagedProductDefinition__lookups = {
+ "PackagedProductDefinition": PackagedProductDefinition_PackagedProductDefinition_Props;
+};
+
+export declare function packagedProductDefinition(type: T, props: PackagedProductDefinition__lookups[T]);;
+
+type Parameters_Parameters_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Operation Parameter
+ * */
+ parameter: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Name from the definition
+ * */
+ name: string;
+ /**
+ * If parameter is a data type
+ * */
+ value: base64Binary;
+ /**
+ * If parameter is a whole resource
+ * */
+ resource: Resource;
+ };
+};
+
+type Parameters__lookups = {
+ "Parameters": Parameters_Parameters_Props;
+};
+
+export declare function parameters(type: T, props: Parameters__lookups[T]);;
+
+type Patient_Patient_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * An identifier for this patient
+ * */
+ identifier: Identifier;
+ /**
+ * Whether this patient's record is in active use
+ * */
+ active: boolean;
+ /**
+ * A name associated with the patient
+ * */
+ name: HumanName;
+ /**
+ * A contact detail for the individual
+ * */
+ telecom: ContactPoint;
+ /**
+ * male | female | other | unknown
+ * */
+ gender: string;
+ /**
+ * The date of birth for the individual
+ * */
+ birthDate: string;
+ /**
+ * Indicates if the individual is deceased or not
+ * */
+ deceased: boolean;
+ /**
+ * An address for the individual
+ * */
+ address: Address;
+ /**
+ * Marital (civil) status of a patient
+ * */
+ maritalStatus: CodeableConcept;
+ /**
+ * Whether patient is part of a multiple birth
+ * */
+ multipleBirth: boolean;
+ /**
+ * Image of the patient
+ * */
+ photo: Attachment;
+ /**
+ * A contact party (e.g. guardian, partner, friend) for the patient
+ * */
+ contact: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The kind of relationship
+ * */
+ relationship: CodeableConcept;
+ /**
+ * A name associated with the contact person
+ * */
+ name: HumanName;
+ /**
+ * A contact detail for the person
+ * */
+ telecom: ContactPoint;
+ /**
+ * Address for the contact person
+ * */
+ address: Address;
+ /**
+ * male | female | other | unknown
+ * */
+ gender: string;
+ /**
+ * Organization that is associated with the contact
+ * */
+ organization: Reference;
+ /**
+ * The period during which this contact person or organization is valid to be contacted relating to this patient
+ * */
+ period: Period;
+ };
+ /**
+ * A language which may be used to communicate with the patient about his or her health
+ * */
+ communication: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The language which can be used to communicate with the patient about his or her health
+ * */
+ language: CodeableConcept;
+ /**
+ * Language preference indicator
+ * */
+ preferred: boolean;
+ };
+ /**
+ * Patient's nominated primary care provider
+ * */
+ generalPractitioner: Reference;
+ /**
+ * Organization that is the custodian of the patient record
+ * */
+ managingOrganization: Reference;
+ /**
+ * Link to another patient resource that concerns the same actual person
+ * */
+ link: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The other patient or related person resource that the link refers to
+ * */
+ other: Reference;
+ /**
+ * replaced-by | replaces | refer | seealso
+ * */
+ type: string;
+ };
+};
+
+type Patient__lookups = {
+ "Patient": Patient_Patient_Props;
+};
+
+export declare function patient(type: T, props: Patient__lookups[T]);;
+
+type PaymentNotice_PaymentNotice_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for the payment noctice
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * Request reference
+ * */
+ request: Reference;
+ /**
+ * Response reference
+ * */
+ response: Reference;
+ /**
+ * Creation date
+ * */
+ created: string;
+ /**
+ * Responsible practitioner
+ * */
+ provider: Reference;
+ /**
+ * Payment reference
+ * */
+ payment: Reference;
+ /**
+ * Payment or clearing date
+ * */
+ paymentDate: string;
+ /**
+ * Party being paid
+ * */
+ payee: Reference;
+ /**
+ * Party being notified
+ * */
+ recipient: Reference;
+ /**
+ * Monetary amount of the payment
+ * */
+ amount: Money;
+ /**
+ * Issued or cleared Status of the payment
+ * */
+ paymentStatus: CodeableConcept;
+};
+
+type PaymentNotice__lookups = {
+ "PaymentNotice": PaymentNotice_PaymentNotice_Props;
+};
+
+export declare function paymentNotice(type: T, props: PaymentNotice__lookups[T]);;
+
+type PaymentReconciliation_PaymentReconciliation_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for a payment reconciliation
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * Period covered
+ * */
+ period: Period;
+ /**
+ * Creation date
+ * */
+ created: string;
+ /**
+ * Party generating payment
+ * */
+ paymentIssuer: Reference;
+ /**
+ * Reference to requesting resource
+ * */
+ request: Reference;
+ /**
+ * Responsible practitioner
+ * */
+ requestor: Reference;
+ /**
+ * queued | complete | error | partial
+ * */
+ outcome: string;
+ /**
+ * Disposition message
+ * */
+ disposition: string;
+ /**
+ * When payment issued
+ * */
+ paymentDate: string;
+ /**
+ * Total amount of Payment
+ * */
+ paymentAmount: Money;
+ /**
+ * Business identifier for the payment
+ * */
+ paymentIdentifier: Identifier;
+ /**
+ * Settlement particulars
+ * */
+ detail: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier of the payment detail
+ * */
+ identifier: Identifier;
+ /**
+ * Business identifier of the prior payment detail
+ * */
+ predecessor: Identifier;
+ /**
+ * Category of payment
+ * */
+ type: CodeableConcept;
+ /**
+ * Request giving rise to the payment
+ * */
+ request: Reference;
+ /**
+ * Submitter of the request
+ * */
+ submitter: Reference;
+ /**
+ * Response committing to a payment
+ * */
+ response: Reference;
+ /**
+ * Date of commitment to pay
+ * */
+ date: string;
+ /**
+ * Contact for the response
+ * */
+ responsible: Reference;
+ /**
+ * Recipient of the payment
+ * */
+ payee: Reference;
+ /**
+ * Amount allocated to this payable
+ * */
+ amount: Money;
+ };
+ /**
+ * Printed form identifier
+ * */
+ formCode: CodeableConcept;
+ /**
+ * Note concerning processing
+ * */
+ processNote: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * display | print | printoper
+ * */
+ type: string;
+ /**
+ * Note explanatory text
+ * */
+ text: string;
+ };
+};
+
+type PaymentReconciliation__lookups = {
+ "PaymentReconciliation": PaymentReconciliation_PaymentReconciliation_Props;
+};
+
+export declare function paymentReconciliation(type: T, props: PaymentReconciliation__lookups[T]);;
+
+type Person_Person_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * A human identifier for this person
+ * */
+ identifier: Identifier;
+ /**
+ * A name associated with the person
+ * */
+ name: HumanName;
+ /**
+ * A contact detail for the person
+ * */
+ telecom: ContactPoint;
+ /**
+ * male | female | other | unknown
+ * */
+ gender: string;
+ /**
+ * The date on which the person was born
+ * */
+ birthDate: string;
+ /**
+ * One or more addresses for the person
+ * */
+ address: Address;
+ /**
+ * Image of the person
+ * */
+ photo: Attachment;
+ /**
+ * The organization that is the custodian of the person record
+ * */
+ managingOrganization: Reference;
+ /**
+ * This person's record is in active use
+ * */
+ active: boolean;
+ /**
+ * Link to a resource that concerns the same actual person
+ * */
+ link: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The resource to which this actual person is associated
+ * */
+ target: Reference;
+ /**
+ * level1 | level2 | level3 | level4
+ * */
+ assurance: string;
+ };
+};
+
+type Person__lookups = {
+ "Person": Person_Person_Props;
+};
+
+export declare function person(type: T, props: Person__lookups[T]);;
+
+type PlanDefinition_PlanDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this plan definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the plan definition
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the plan definition
+ * */
+ version: string;
+ /**
+ * Name for this plan definition (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this plan definition (human friendly)
+ * */
+ title: string;
+ /**
+ * Subordinate title of the plan definition
+ * */
+ subtitle: string;
+ /**
+ * order-set | clinical-protocol | eca-rule | workflow-definition
+ * */
+ type: CodeableConcept;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Type of individual the plan definition is focused on
+ * */
+ subject: CodeableConcept;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the plan definition
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for plan definition (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this plan definition is defined
+ * */
+ purpose: markdown;
+ /**
+ * Describes the clinical usage of the plan
+ * */
+ usage: string;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * When the plan definition was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the plan definition was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * When the plan definition is expected to be used
+ * */
+ effectivePeriod: Period;
+ /**
+ * E.g. Education, Treatment, Assessment
+ * */
+ topic: CodeableConcept;
+ /**
+ * Who authored the content
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the content
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the content
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the content
+ * */
+ endorser: ContactDetail;
+ /**
+ * Additional documentation, citations
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * Logic used by the plan definition
+ * */
+ library: any;
+ /**
+ * What the plan is trying to accomplish
+ * */
+ goal: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * E.g. Treatment, dietary, behavioral
+ * */
+ category: CodeableConcept;
+ /**
+ * Code or text describing the goal
+ * */
+ description: CodeableConcept;
+ /**
+ * high-priority | medium-priority | low-priority
+ * */
+ priority: CodeableConcept;
+ /**
+ * When goal pursuit begins
+ * */
+ start: CodeableConcept;
+ /**
+ * What does the goal address
+ * */
+ addresses: CodeableConcept;
+ /**
+ * Supporting documentation for the goal
+ * */
+ documentation: RelatedArtifact;
+ /**
+ * Reach goal within
+ * */
+ target: Duration;
+ };
+ /**
+ * Action defined by the plan
+ * */
+ action: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * User-visible prefix for the action (e.g. 1. or A.)
+ * */
+ prefix: string;
+ /**
+ * User-visible title
+ * */
+ title: string;
+ /**
+ * Brief description of the action
+ * */
+ description: string;
+ /**
+ * Static text equivalent of the action, used if the dynamic aspects cannot be interpreted by the receiving system
+ * */
+ textEquivalent: string;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * Code representing the meaning of the action or sub-actions
+ * */
+ code: CodeableConcept;
+ /**
+ * Why the action should be performed
+ * */
+ reason: CodeableConcept;
+ /**
+ * Supporting documentation for the intended performer of the action
+ * */
+ documentation: RelatedArtifact;
+ /**
+ * What goals this action supports
+ * */
+ goalId: string;
+ /**
+ * Type of individual the action is focused on
+ * */
+ subject: CodeableConcept;
+ /**
+ * When the action should be triggered
+ * */
+ trigger: TriggerDefinition;
+ /**
+ * Boolean-valued expression
+ * */
+ condition: Expression;
+ /**
+ * Input data requirements
+ * */
+ input: DataRequirement;
+ /**
+ * Output data definition
+ * */
+ output: DataRequirement;
+ /**
+ * Time offset for the relationship
+ * */
+ relatedAction: Duration;
+ /**
+ * When the action should take place
+ * */
+ timing: string;
+ /**
+ * E.g. Nurse, Surgeon, Parent
+ * */
+ participant: CodeableConcept;
+ /**
+ * create | update | remove | fire-event
+ * */
+ type: CodeableConcept;
+ /**
+ * visual-group | logical-group | sentence-group
+ * */
+ groupingBehavior: string;
+ /**
+ * any | all | all-or-none | exactly-one | at-most-one | one-or-more
+ * */
+ selectionBehavior: string;
+ /**
+ * must | could | must-unless-documented
+ * */
+ requiredBehavior: string;
+ /**
+ * yes | no
+ * */
+ precheckBehavior: string;
+ /**
+ * single | multiple
+ * */
+ cardinalityBehavior: string;
+ /**
+ * Description of the activity to be performed
+ * */
+ definition: any;
+ /**
+ * Transform to apply the template
+ * */
+ transform: any;
+ /**
+ * An expression that provides the dynamic value for the customization
+ * */
+ dynamicValue: Expression;
+ };
+};
+
+type PlanDefinition__lookups = {
+ "PlanDefinition": PlanDefinition_PlanDefinition_Props;
+};
+
+export declare function planDefinition(type: T, props: PlanDefinition__lookups[T]);;
+
+type Practitioner_Practitioner_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * An identifier for the person as this agent
+ * */
+ identifier: Identifier;
+ /**
+ * Whether this practitioner's record is in active use
+ * */
+ active: boolean;
+ /**
+ * The name(s) associated with the practitioner
+ * */
+ name: HumanName;
+ /**
+ * A contact detail for the practitioner (that apply to all roles)
+ * */
+ telecom: ContactPoint;
+ /**
+ * Address(es) of the practitioner that are not role specific (typically home address)
+ * */
+ address: Address;
+ /**
+ * male | female | other | unknown
+ * */
+ gender: string;
+ /**
+ * The date on which the practitioner was born
+ * */
+ birthDate: string;
+ /**
+ * Image of the person
+ * */
+ photo: Attachment;
+ /**
+ * Certification, licenses, or training pertaining to the provision of care
+ * */
+ qualification: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * An identifier for this qualification for the practitioner
+ * */
+ identifier: Identifier;
+ /**
+ * Coded representation of the qualification
+ * */
+ code: CodeableConcept;
+ /**
+ * Period during which the qualification is valid
+ * */
+ period: Period;
+ /**
+ * Organization that regulates and issues the qualification
+ * */
+ issuer: Reference;
+ };
+ /**
+ * A language the practitioner can use in patient communication
+ * */
+ communication: CodeableConcept;
+};
+
+type Practitioner__lookups = {
+ "Practitioner": Practitioner_Practitioner_Props;
+};
+
+export declare function practitioner(type: T, props: Practitioner__lookups[T]);;
+
+type PractitionerRole_PractitionerRole_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifiers that are specific to a role/location
+ * */
+ identifier: Identifier;
+ /**
+ * Whether this practitioner role record is in active use
+ * */
+ active: boolean;
+ /**
+ * The period during which the practitioner is authorized to perform in these role(s)
+ * */
+ period: Period;
+ /**
+ * Practitioner that is able to provide the defined services for the organization
+ * */
+ practitioner: Reference;
+ /**
+ * Organization where the roles are available
+ * */
+ organization: Reference;
+ /**
+ * Roles which this practitioner may perform
+ * */
+ code: CodeableConcept;
+ /**
+ * Specific specialty of the practitioner
+ * */
+ specialty: CodeableConcept;
+ /**
+ * The location(s) at which this practitioner provides care
+ * */
+ location: Reference;
+ /**
+ * The list of healthcare services that this worker provides for this role's Organization/Location(s)
+ * */
+ healthcareService: Reference;
+ /**
+ * Contact details that are specific to the role/location/service
+ * */
+ telecom: ContactPoint;
+ /**
+ * Times the Service Site is available
+ * */
+ availableTime: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * mon | tue | wed | thu | fri | sat | sun
+ * */
+ daysOfWeek: string;
+ /**
+ * Always available? e.g. 24 hour service
+ * */
+ allDay: boolean;
+ /**
+ * Opening time of day (ignored if allDay = true)
+ * */
+ availableStartTime: time;
+ /**
+ * Closing time of day (ignored if allDay = true)
+ * */
+ availableEndTime: time;
+ };
+ /**
+ * Not available during this time due to provided reason
+ * */
+ notAvailable: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Reason presented to the user explaining why time not available
+ * */
+ description: string;
+ /**
+ * Service not available from this date
+ * */
+ during: Period;
+ };
+ /**
+ * Description of availability exceptions
+ * */
+ availabilityExceptions: string;
+ /**
+ * Technical endpoints providing access to services operated for the practitioner with this role
+ * */
+ endpoint: Reference;
+};
+
+type PractitionerRole__lookups = {
+ "PractitionerRole": PractitionerRole_PractitionerRole_Props;
+};
+
+export declare function practitionerRole(type: T, props: PractitionerRole__lookups[T]);;
+
+type Procedure_Procedure_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Identifiers for this procedure
+ * */
+ identifier: Identifier;
+ /**
+ * Instantiates FHIR protocol or definition
+ * */
+ instantiatesCanonical: any;
+ /**
+ * Instantiates external protocol or definition
+ * */
+ instantiatesUri: string;
+ /**
+ * A request for this procedure
+ * */
+ basedOn: Reference;
+ /**
+ * Part of referenced event
+ * */
+ partOf: Reference;
+ /**
+ * preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * Reason for current status
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * Classification of the procedure
+ * */
+ category: CodeableConcept;
+ /**
+ * Identification of the procedure
+ * */
+ code: CodeableConcept;
+ /**
+ * Who the procedure was performed on
+ * */
+ subject: Reference;
+ /**
+ * Encounter created as part of
+ * */
+ encounter: Reference;
+ /**
+ * When the procedure was performed
+ * */
+ performed: string;
+ /**
+ * Who recorded the procedure
+ * */
+ recorder: Reference;
+ /**
+ * Person who asserts this procedure
+ * */
+ asserter: Reference;
+ /**
+ * The people who performed the procedure
+ * */
+ performer: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Type of performance
+ * */
+ function: CodeableConcept;
+ /**
+ * The reference to the practitioner
+ * */
+ actor: Reference;
+ /**
+ * Organization the device or practitioner was acting for
+ * */
+ onBehalfOf: Reference;
+ };
+ /**
+ * Where the procedure happened
+ * */
+ location: Reference;
+ /**
+ * Coded reason procedure performed
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * The justification that the procedure was performed
+ * */
+ reasonReference: Reference;
+ /**
+ * Target body sites
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * The result of procedure
+ * */
+ outcome: CodeableConcept;
+ /**
+ * Any report resulting from the procedure
+ * */
+ report: Reference;
+ /**
+ * Complication following the procedure
+ * */
+ complication: CodeableConcept;
+ /**
+ * A condition that is a result of the procedure
+ * */
+ complicationDetail: Reference;
+ /**
+ * Instructions for follow up
+ * */
+ followUp: CodeableConcept;
+ /**
+ * Additional information about the procedure
+ * */
+ note: Annotation;
+ /**
+ * Manipulated, implanted, or removed device
+ * */
+ focalDevice: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Kind of change to device
+ * */
+ action: CodeableConcept;
+ /**
+ * Device that was changed
+ * */
+ manipulated: Reference;
+ };
+ /**
+ * Items used during procedure
+ * */
+ usedReference: Reference;
+ /**
+ * Coded items used during the procedure
+ * */
+ usedCode: CodeableConcept;
+};
+
+type Procedure__lookups = {
+ "Procedure": Procedure_Procedure_Props;
+};
+
+export declare function procedure(type: T, props: Procedure__lookups[T]);;
+
+type Provenance_Provenance_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Target Reference(s) (usually version specific)
+ * */
+ target: Reference;
+ /**
+ * When the activity occurred
+ * */
+ occurred: Period;
+ /**
+ * When the activity was recorded / updated
+ * */
+ recorded: string;
+ /**
+ * Policy or plan the activity was defined by
+ * */
+ policy: string;
+ /**
+ * Where the activity occurred, if relevant
+ * */
+ location: Reference;
+ /**
+ * Reason the activity is occurring
+ * */
+ reason: CodeableConcept;
+ /**
+ * Activity that occurred
+ * */
+ activity: CodeableConcept;
+ /**
+ * Actor involved
+ * */
+ agent: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * How the agent participated
+ * */
+ type: CodeableConcept;
+ /**
+ * What the agents role was
+ * */
+ role: CodeableConcept;
+ /**
+ * Who participated
+ * */
+ who: Reference;
+ /**
+ * Who the agent is representing
+ * */
+ onBehalfOf: Reference;
+ };
+ /**
+ * An entity used in this activity
+ * */
+ entity: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * derivation | revision | quotation | source | removal
+ * */
+ role: string;
+ /**
+ * Identity of entity
+ * */
+ what: Reference;
+ };
+ /**
+ * Signature on target
+ * */
+ signature: Signature;
+};
+
+type Provenance__lookups = {
+ "Provenance": Provenance_Provenance_Props;
+};
+
+export declare function provenance(type: T, props: Provenance__lookups[T]);;
+
+type Questionnaire_Questionnaire_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this questionnaire, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the questionnaire
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the questionnaire
+ * */
+ version: string;
+ /**
+ * Name for this questionnaire (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this questionnaire (human friendly)
+ * */
+ title: string;
+ /**
+ * Instantiates protocol or definition
+ * */
+ derivedFrom: any;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Resource that can be subject of QuestionnaireResponse
+ * */
+ subjectType: string;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the questionnaire
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for questionnaire (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this questionnaire is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * When the questionnaire was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the questionnaire was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * When the questionnaire is expected to be used
+ * */
+ effectivePeriod: Period;
+ /**
+ * Concept that represents the overall questionnaire
+ * */
+ code: Coding;
+ /**
+ * Questions and sections within the Questionnaire
+ * */
+ item: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique id for item in questionnaire
+ * */
+ linkId: string;
+ /**
+ * ElementDefinition - details for the item
+ * */
+ definition: string;
+ /**
+ * Corresponding concept for this item in a terminology
+ * */
+ code: Coding;
+ /**
+ * E.g. "1(a)", "2.5.3"
+ * */
+ prefix: string;
+ /**
+ * Primary text for the item
+ * */
+ text: string;
+ /**
+ * group | display | boolean | decimal | integer | date | dateTime +
+ * */
+ type: string;
+ /**
+ * Value for question comparison based on operator
+ * */
+ enableWhen: boolean;
+ /**
+ * all | any
+ * */
+ enableBehavior: string;
+ /**
+ * Whether the item must be included in data results
+ * */
+ required: boolean;
+ /**
+ * Whether the item may repeat
+ * */
+ repeats: boolean;
+ /**
+ * Don't allow human editing
+ * */
+ readOnly: boolean;
+ /**
+ * No more than this many characters
+ * */
+ maxLength: number;
+ /**
+ * Valueset containing permitted answers
+ * */
+ answerValueSet: any;
+ /**
+ * Whether option is selected by default
+ * */
+ answerOption: boolean;
+ /**
+ * Actual value for initializing the question
+ * */
+ initial: boolean;
+ };
+};
+
+type Questionnaire__lookups = {
+ "Questionnaire": Questionnaire_Questionnaire_Props;
+};
+
+export declare function questionnaire(type: T, props: Questionnaire__lookups[T]);;
+
+type QuestionnaireResponse_QuestionnaireResponse_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique id for this set of answers
+ * */
+ identifier: Identifier;
+ /**
+ * Request fulfilled by this QuestionnaireResponse
+ * */
+ basedOn: Reference;
+ /**
+ * Part of this action
+ * */
+ partOf: Reference;
+ /**
+ * Form being answered
+ * */
+ questionnaire: any;
+ /**
+ * in-progress | completed | amended | entered-in-error | stopped
+ * */
+ status: string;
+ /**
+ * The subject of the questions
+ * */
+ subject: Reference;
+ /**
+ * Encounter created as part of
+ * */
+ encounter: Reference;
+ /**
+ * Date the answers were gathered
+ * */
+ authored: string;
+ /**
+ * Person who received and recorded the answers
+ * */
+ author: Reference;
+ /**
+ * The person who answered the questions
+ * */
+ source: Reference;
+ /**
+ * Groups and questions
+ * */
+ item: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Pointer to specific item from Questionnaire
+ * */
+ linkId: string;
+ /**
+ * ElementDefinition - details for the item
+ * */
+ definition: string;
+ /**
+ * Name for group or question text
+ * */
+ text: string;
+ /**
+ * Single-valued answer to the question
+ * */
+ answer: boolean;
+ };
+};
+
+type QuestionnaireResponse__lookups = {
+ "QuestionnaireResponse": QuestionnaireResponse_QuestionnaireResponse_Props;
+};
+
+export declare function questionnaireResponse(type: T, props: QuestionnaireResponse__lookups[T]);;
+
+type RegulatedAuthorization_RegulatedAuthorization_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier for the authorization, typically assigned by the authorizing body
+ * */
+ identifier: Identifier;
+ /**
+ * The product type, treatment, facility or activity that is being authorized
+ * */
+ subject: Reference;
+ /**
+ * Overall type of this authorization, for example drug marketing approval, orphan drug designation
+ * */
+ type: CodeableConcept;
+ /**
+ * General textual supporting information
+ * */
+ description: markdown;
+ /**
+ * The territory in which the authorization has been granted
+ * */
+ region: CodeableConcept;
+ /**
+ * The status that is authorised e.g. approved. Intermediate states can be tracked with cases and applications
+ * */
+ status: CodeableConcept;
+ /**
+ * The date at which the current status was assigned
+ * */
+ statusDate: string;
+ /**
+ * The time period in which the regulatory approval etc. is in effect, e.g. a Marketing Authorization includes the date of authorization and/or expiration date
+ * */
+ validityPeriod: Period;
+ /**
+ * Condition for which the use of the regulated product applies
+ * */
+ indication: CodeableReference;
+ /**
+ * The intended use of the product, e.g. prevention, treatment
+ * */
+ intendedUse: CodeableConcept;
+ /**
+ * The legal/regulatory framework or reasons under which this authorization is granted
+ * */
+ basis: CodeableConcept;
+ /**
+ * The organization that has been granted this authorization, by the regulator
+ * */
+ holder: Reference;
+ /**
+ * The regulatory authority or authorizing body granting the authorization
+ * */
+ regulator: Reference;
+ /**
+ * The case or regulatory procedure for granting or amending a regulated authorization. Note: This area is subject to ongoing review and the workgroup is seeking implementer feedback on its use (see link at bottom of page)
+ * */
+ case: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifier by which this case can be referenced
+ * */
+ identifier: Identifier;
+ /**
+ * The defining type of case
+ * */
+ type: CodeableConcept;
+ /**
+ * The status associated with the case
+ * */
+ status: CodeableConcept;
+ /**
+ * Relevant date for this case
+ * */
+ date: Period;
+ };
+};
+
+type RegulatedAuthorization__lookups = {
+ "RegulatedAuthorization": RegulatedAuthorization_RegulatedAuthorization_Props;
+};
+
+export declare function regulatedAuthorization(type: T, props: RegulatedAuthorization__lookups[T]);;
+
+type RelatedPerson_RelatedPerson_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * A human identifier for this person
+ * */
+ identifier: Identifier;
+ /**
+ * Whether this related person's record is in active use
+ * */
+ active: boolean;
+ /**
+ * The patient this person is related to
+ * */
+ patient: Reference;
+ /**
+ * The nature of the relationship
+ * */
+ relationship: CodeableConcept;
+ /**
+ * A name associated with the person
+ * */
+ name: HumanName;
+ /**
+ * A contact detail for the person
+ * */
+ telecom: ContactPoint;
+ /**
+ * male | female | other | unknown
+ * */
+ gender: string;
+ /**
+ * The date on which the related person was born
+ * */
+ birthDate: string;
+ /**
+ * Address where the related person can be contacted or visited
+ * */
+ address: Address;
+ /**
+ * Image of the person
+ * */
+ photo: Attachment;
+ /**
+ * Period of time that this relationship is considered valid
+ * */
+ period: Period;
+ /**
+ * A language which may be used to communicate with about the patient's health
+ * */
+ communication: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The language which can be used to communicate with the patient about his or her health
+ * */
+ language: CodeableConcept;
+ /**
+ * Language preference indicator
+ * */
+ preferred: boolean;
+ };
+};
+
+type RelatedPerson__lookups = {
+ "RelatedPerson": RelatedPerson_RelatedPerson_Props;
+};
+
+export declare function relatedPerson(type: T, props: RelatedPerson__lookups[T]);;
+
+type RequestGroup_RequestGroup_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Instantiates FHIR protocol or definition
+ * */
+ instantiatesCanonical: any;
+ /**
+ * Instantiates external protocol or definition
+ * */
+ instantiatesUri: string;
+ /**
+ * Fulfills plan, proposal, or order
+ * */
+ basedOn: Reference;
+ /**
+ * Request(s) replaced by this request
+ * */
+ replaces: Reference;
+ /**
+ * Composite request this is part of
+ * */
+ groupIdentifier: Identifier;
+ /**
+ * draft | active | on-hold | revoked | completed | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
+ * */
+ intent: string;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * What's being requested/ordered
+ * */
+ code: CodeableConcept;
+ /**
+ * Who the request group is about
+ * */
+ subject: Reference;
+ /**
+ * Created as part of
+ * */
+ encounter: Reference;
+ /**
+ * When the request group was authored
+ * */
+ authoredOn: string;
+ /**
+ * Device or practitioner that authored the request group
+ * */
+ author: Reference;
+ /**
+ * Why the request group is needed
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why the request group is needed
+ * */
+ reasonReference: Reference;
+ /**
+ * Additional notes about the response
+ * */
+ note: Annotation;
+ /**
+ * Proposed actions, if any
+ * */
+ action: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * User-visible prefix for the action (e.g. 1. or A.)
+ * */
+ prefix: string;
+ /**
+ * User-visible title
+ * */
+ title: string;
+ /**
+ * Short description of the action
+ * */
+ description: string;
+ /**
+ * Static text equivalent of the action, used if the dynamic aspects cannot be interpreted by the receiving system
+ * */
+ textEquivalent: string;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * Code representing the meaning of the action or sub-actions
+ * */
+ code: CodeableConcept;
+ /**
+ * Supporting documentation for the intended performer of the action
+ * */
+ documentation: RelatedArtifact;
+ /**
+ * Boolean-valued expression
+ * */
+ condition: Expression;
+ /**
+ * Time offset for the relationship
+ * */
+ relatedAction: Duration;
+ /**
+ * When the action should take place
+ * */
+ timing: string;
+ /**
+ * Who should perform the action
+ * */
+ participant: Reference;
+ /**
+ * create | update | remove | fire-event
+ * */
+ type: CodeableConcept;
+ /**
+ * visual-group | logical-group | sentence-group
+ * */
+ groupingBehavior: string;
+ /**
+ * any | all | all-or-none | exactly-one | at-most-one | one-or-more
+ * */
+ selectionBehavior: string;
+ /**
+ * must | could | must-unless-documented
+ * */
+ requiredBehavior: string;
+ /**
+ * yes | no
+ * */
+ precheckBehavior: string;
+ /**
+ * single | multiple
+ * */
+ cardinalityBehavior: string;
+ /**
+ * The target of the action
+ * */
+ resource: Reference;
+ };
+};
+
+type RequestGroup__lookups = {
+ "RequestGroup": RequestGroup_RequestGroup_Props;
+};
+
+export declare function requestGroup(type: T, props: RequestGroup__lookups[T]);;
+
+type ResearchDefinition_ResearchDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this research definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the research definition
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the research definition
+ * */
+ version: string;
+ /**
+ * Name for this research definition (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this research definition (human friendly)
+ * */
+ title: string;
+ /**
+ * Title for use in informal contexts
+ * */
+ shortTitle: string;
+ /**
+ * Subordinate title of the ResearchDefinition
+ * */
+ subtitle: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device
+ * */
+ subject: CodeableConcept;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the research definition
+ * */
+ description: markdown;
+ /**
+ * Used for footnotes or explanatory notes
+ * */
+ comment: string;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for research definition (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this research definition is defined
+ * */
+ purpose: markdown;
+ /**
+ * Describes the clinical usage of the ResearchDefinition
+ * */
+ usage: string;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * When the research definition was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the research definition was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * When the research definition is expected to be used
+ * */
+ effectivePeriod: Period;
+ /**
+ * The category of the ResearchDefinition, such as Education, Treatment, Assessment, etc.
+ * */
+ topic: CodeableConcept;
+ /**
+ * Who authored the content
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the content
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the content
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the content
+ * */
+ endorser: ContactDetail;
+ /**
+ * Additional documentation, citations, etc.
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * Logic used by the ResearchDefinition
+ * */
+ library: any;
+ /**
+ * What population?
+ * */
+ population: Reference;
+ /**
+ * What exposure?
+ * */
+ exposure: Reference;
+ /**
+ * What alternative exposure state?
+ * */
+ exposureAlternative: Reference;
+ /**
+ * What outcome?
+ * */
+ outcome: Reference;
+};
+
+type ResearchDefinition__lookups = {
+ "ResearchDefinition": ResearchDefinition_ResearchDefinition_Props;
+};
+
+export declare function researchDefinition(type: T, props: ResearchDefinition__lookups[T]);;
+
+type ResearchElementDefinition_ResearchElementDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this research element definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the research element definition
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the research element definition
+ * */
+ version: string;
+ /**
+ * Name for this research element definition (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this research element definition (human friendly)
+ * */
+ title: string;
+ /**
+ * Title for use in informal contexts
+ * */
+ shortTitle: string;
+ /**
+ * Subordinate title of the ResearchElementDefinition
+ * */
+ subtitle: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * E.g. Patient, Practitioner, RelatedPerson, Organization, Location, Device
+ * */
+ subject: CodeableConcept;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the research element definition
+ * */
+ description: markdown;
+ /**
+ * Used for footnotes or explanatory notes
+ * */
+ comment: string;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for research element definition (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this research element definition is defined
+ * */
+ purpose: markdown;
+ /**
+ * Describes the clinical usage of the ResearchElementDefinition
+ * */
+ usage: string;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * When the research element definition was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * When the research element definition was last reviewed
+ * */
+ lastReviewDate: string;
+ /**
+ * When the research element definition is expected to be used
+ * */
+ effectivePeriod: Period;
+ /**
+ * The category of the ResearchElementDefinition, such as Education, Treatment, Assessment, etc.
+ * */
+ topic: CodeableConcept;
+ /**
+ * Who authored the content
+ * */
+ author: ContactDetail;
+ /**
+ * Who edited the content
+ * */
+ editor: ContactDetail;
+ /**
+ * Who reviewed the content
+ * */
+ reviewer: ContactDetail;
+ /**
+ * Who endorsed the content
+ * */
+ endorser: ContactDetail;
+ /**
+ * Additional documentation, citations, etc.
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * Logic used by the ResearchElementDefinition
+ * */
+ library: any;
+ /**
+ * population | exposure | outcome
+ * */
+ type: string;
+ /**
+ * dichotomous | continuous | descriptive
+ * */
+ variableType: string;
+ /**
+ * What defines the members of the research element
+ * */
+ characteristic: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * What code or expression defines members?
+ * */
+ definition: CodeableConcept;
+ /**
+ * What code/value pairs define members?
+ * */
+ usageContext: UsageContext;
+ /**
+ * Whether the characteristic includes or excludes members
+ * */
+ exclude: boolean;
+ /**
+ * What unit is the outcome described in?
+ * */
+ unitOfMeasure: CodeableConcept;
+ /**
+ * What time period does the study cover
+ * */
+ studyEffectiveDescription: string;
+ /**
+ * What time period does the study cover
+ * */
+ studyEffective: string;
+ /**
+ * Observation time from study start
+ * */
+ studyEffectiveTimeFromStart: Duration;
+ /**
+ * mean | median | mean-of-mean | mean-of-median | median-of-mean | median-of-median
+ * */
+ studyEffectiveGroupMeasure: string;
+ /**
+ * What time period do participants cover
+ * */
+ participantEffectiveDescription: string;
+ /**
+ * What time period do participants cover
+ * */
+ participantEffective: string;
+ /**
+ * Observation time from study start
+ * */
+ participantEffectiveTimeFromStart: Duration;
+ /**
+ * mean | median | mean-of-mean | mean-of-median | median-of-mean | median-of-median
+ * */
+ participantEffectiveGroupMeasure: string;
+ };
+};
+
+type ResearchElementDefinition__lookups = {
+ "ResearchElementDefinition": ResearchElementDefinition_ResearchElementDefinition_Props;
+};
+
+export declare function researchElementDefinition(type: T, props: ResearchElementDefinition__lookups[T]);;
+
+type ResearchStudy_ResearchStudy_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for study
+ * */
+ identifier: Identifier;
+ /**
+ * Name for this study
+ * */
+ title: string;
+ /**
+ * Steps followed in executing study
+ * */
+ protocol: Reference;
+ /**
+ * Part of larger study
+ * */
+ partOf: Reference;
+ /**
+ * active | administratively-completed | approved | closed-to-accrual | closed-to-accrual-and-intervention | completed | disapproved | in-review | temporarily-closed-to-accrual | temporarily-closed-to-accrual-and-intervention | withdrawn
+ * */
+ status: string;
+ /**
+ * treatment | prevention | diagnostic | supportive-care | screening | health-services-research | basic-science | device-feasibility
+ * */
+ primaryPurposeType: CodeableConcept;
+ /**
+ * n-a | early-phase-1 | phase-1 | phase-1-phase-2 | phase-2 | phase-2-phase-3 | phase-3 | phase-4
+ * */
+ phase: CodeableConcept;
+ /**
+ * Classifications for the study
+ * */
+ category: CodeableConcept;
+ /**
+ * Drugs, devices, etc. under study
+ * */
+ focus: CodeableConcept;
+ /**
+ * Condition being studied
+ * */
+ condition: CodeableConcept;
+ /**
+ * Contact details for the study
+ * */
+ contact: ContactDetail;
+ /**
+ * References and dependencies
+ * */
+ relatedArtifact: RelatedArtifact;
+ /**
+ * Used to search for the study
+ * */
+ keyword: CodeableConcept;
+ /**
+ * Geographic region(s) for study
+ * */
+ location: CodeableConcept;
+ /**
+ * What this is study doing
+ * */
+ description: markdown;
+ /**
+ * Inclusion & exclusion criteria
+ * */
+ enrollment: Reference;
+ /**
+ * When the study began and ended
+ * */
+ period: Period;
+ /**
+ * Organization that initiates and is legally responsible for the study
+ * */
+ sponsor: Reference;
+ /**
+ * Researcher who oversees multiple aspects of the study
+ * */
+ principalInvestigator: Reference;
+ /**
+ * Facility where study activities are conducted
+ * */
+ site: Reference;
+ /**
+ * accrual-goal-met | closed-due-to-toxicity | closed-due-to-lack-of-study-progress | temporarily-closed-per-study-design
+ * */
+ reasonStopped: CodeableConcept;
+ /**
+ * Comments made about the study
+ * */
+ note: Annotation;
+ /**
+ * Defined path through the study for a subject
+ * */
+ arm: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Label for study arm
+ * */
+ name: string;
+ /**
+ * Categorization of study arm
+ * */
+ type: CodeableConcept;
+ /**
+ * Short explanation of study path
+ * */
+ description: string;
+ };
+ /**
+ * A goal for the study
+ * */
+ objective: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Label for the objective
+ * */
+ name: string;
+ /**
+ * primary | secondary | exploratory
+ * */
+ type: CodeableConcept;
+ };
+};
+
+type ResearchStudy__lookups = {
+ "ResearchStudy": ResearchStudy_ResearchStudy_Props;
+};
+
+export declare function researchStudy(type: T, props: ResearchStudy__lookups[T]);;
+
+type ResearchSubject_ResearchSubject_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for research subject in a study
+ * */
+ identifier: Identifier;
+ /**
+ * candidate | eligible | follow-up | ineligible | not-registered | off-study | on-study | on-study-intervention | on-study-observation | pending-on-study | potential-candidate | screening | withdrawn
+ * */
+ status: string;
+ /**
+ * Start and end of participation
+ * */
+ period: Period;
+ /**
+ * Study subject is part of
+ * */
+ study: Reference;
+ /**
+ * Who is part of study
+ * */
+ individual: Reference;
+ /**
+ * What path should be followed
+ * */
+ assignedArm: string;
+ /**
+ * What path was followed
+ * */
+ actualArm: string;
+ /**
+ * Agreement to participate in study
+ * */
+ consent: Reference;
+};
+
+type ResearchSubject__lookups = {
+ "ResearchSubject": ResearchSubject_ResearchSubject_Props;
+};
+
+export declare function researchSubject(type: T, props: ResearchSubject__lookups[T]);;
+
+type Resource_Resource_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+};
+
+type Resource__lookups = {
+ "Resource": Resource_Resource_Props;
+};
+
+export declare function resource(type: T, props: Resource__lookups[T]);;
+
+type RiskAssessment_RiskAssessment_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique identifier for the assessment
+ * */
+ identifier: Identifier;
+ /**
+ * Request fulfilled by this assessment
+ * */
+ basedOn: Reference;
+ /**
+ * Part of this occurrence
+ * */
+ parent: Reference;
+ /**
+ * registered | preliminary | final | amended +
+ * */
+ status: string;
+ /**
+ * Evaluation mechanism
+ * */
+ method: CodeableConcept;
+ /**
+ * Type of assessment
+ * */
+ code: CodeableConcept;
+ /**
+ * Who/what does assessment apply to?
+ * */
+ subject: Reference;
+ /**
+ * Where was assessment performed?
+ * */
+ encounter: Reference;
+ /**
+ * When was assessment made?
+ * */
+ occurrence: string;
+ /**
+ * Condition assessed
+ * */
+ condition: Reference;
+ /**
+ * Who did assessment?
+ * */
+ performer: Reference;
+ /**
+ * Why the assessment was necessary?
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why the assessment was necessary?
+ * */
+ reasonReference: Reference;
+ /**
+ * Information used in assessment
+ * */
+ basis: Reference;
+ /**
+ * Outcome predicted
+ * */
+ prediction: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Possible outcome for the subject
+ * */
+ outcome: CodeableConcept;
+ /**
+ * Likelihood of specified outcome
+ * */
+ probability: number;
+ /**
+ * Likelihood of specified outcome as a qualitative value
+ * */
+ qualitativeRisk: CodeableConcept;
+ /**
+ * Relative likelihood
+ * */
+ relativeRisk: number;
+ /**
+ * Timeframe or age range
+ * */
+ when: Period;
+ /**
+ * Explanation of prediction
+ * */
+ rationale: string;
+ };
+ /**
+ * How to reduce risk
+ * */
+ mitigation: string;
+ /**
+ * Comments on the risk assessment
+ * */
+ note: Annotation;
+};
+
+type RiskAssessment__lookups = {
+ "RiskAssessment": RiskAssessment_RiskAssessment_Props;
+};
+
+export declare function riskAssessment(type: T, props: RiskAssessment__lookups[T]);;
+
+type Schedule_Schedule_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Ids for this item
+ * */
+ identifier: Identifier;
+ /**
+ * Whether this schedule is in active use
+ * */
+ active: boolean;
+ /**
+ * High-level category
+ * */
+ serviceCategory: CodeableConcept;
+ /**
+ * Specific service
+ * */
+ serviceType: CodeableConcept;
+ /**
+ * Type of specialty needed
+ * */
+ specialty: CodeableConcept;
+ /**
+ * Resource(s) that availability information is being provided for
+ * */
+ actor: Reference;
+ /**
+ * Period of time covered by schedule
+ * */
+ planningHorizon: Period;
+ /**
+ * Comments on availability
+ * */
+ comment: string;
+};
+
+type Schedule__lookups = {
+ "Schedule": Schedule_Schedule_Props;
+};
+
+export declare function schedule(type: T, props: Schedule__lookups[T]);;
+
+type SearchParameter_SearchParameter_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this search parameter, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Business version of the search parameter
+ * */
+ version: string;
+ /**
+ * Name for this search parameter (computer friendly)
+ * */
+ name: string;
+ /**
+ * Original definition for the search parameter
+ * */
+ derivedFrom: any;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the search parameter
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for search parameter (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this search parameter is defined
+ * */
+ purpose: markdown;
+ /**
+ * Code used in URL
+ * */
+ code: string;
+ /**
+ * The resource type(s) this search parameter applies to
+ * */
+ base: string;
+ /**
+ * number | date | string | token | reference | composite | quantity | uri | special
+ * */
+ type: string;
+ /**
+ * FHIRPath expression that extracts the values
+ * */
+ expression: string;
+ /**
+ * XPath that extracts the values
+ * */
+ xpath: string;
+ /**
+ * normal | phonetic | nearby | distance | other
+ * */
+ xpathUsage: string;
+ /**
+ * Types of resource (if a resource reference)
+ * */
+ target: string;
+ /**
+ * Allow multiple values per parameter (or)
+ * */
+ multipleOr: boolean;
+ /**
+ * Allow multiple parameters (and)
+ * */
+ multipleAnd: boolean;
+ /**
+ * eq | ne | gt | lt | ge | le | sa | eb | ap
+ * */
+ comparator: string;
+ /**
+ * missing | exact | contains | not | text | in | not-in | below | above | type | identifier | ofType
+ * */
+ modifier: string;
+ /**
+ * Chained names supported
+ * */
+ chain: string;
+ /**
+ * For Composite resources to define the parts
+ * */
+ component: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Defines how the part works
+ * */
+ definition: any;
+ /**
+ * Subexpression relative to main expression
+ * */
+ expression: string;
+ };
+};
+
+type SearchParameter__lookups = {
+ "SearchParameter": SearchParameter_SearchParameter_Props;
+};
+
+export declare function searchParameter(type: T, props: SearchParameter__lookups[T]);;
+
+type ServiceRequest_ServiceRequest_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifiers assigned to this order
+ * */
+ identifier: Identifier;
+ /**
+ * Instantiates FHIR protocol or definition
+ * */
+ instantiatesCanonical: any;
+ /**
+ * Instantiates external protocol or definition
+ * */
+ instantiatesUri: string;
+ /**
+ * What request fulfills
+ * */
+ basedOn: Reference;
+ /**
+ * What request replaces
+ * */
+ replaces: Reference;
+ /**
+ * Composite Request ID
+ * */
+ requisition: Identifier;
+ /**
+ * draft | active | on-hold | revoked | completed | entered-in-error | unknown
+ * */
+ status: string;
+ /**
+ * proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
+ * */
+ intent: string;
+ /**
+ * Classification of service
+ * */
+ category: CodeableConcept;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * True if service/procedure should not be performed
+ * */
+ doNotPerform: boolean;
+ /**
+ * What is being requested/ordered
+ * */
+ code: CodeableConcept;
+ /**
+ * Additional order information
+ * */
+ orderDetail: CodeableConcept;
+ /**
+ * Service amount
+ * */
+ quantity: Quantity;
+ /**
+ * Individual or Entity the service is ordered for
+ * */
+ subject: Reference;
+ /**
+ * Encounter in which the request was created
+ * */
+ encounter: Reference;
+ /**
+ * When service should occur
+ * */
+ occurrence: string;
+ /**
+ * Preconditions for service
+ * */
+ asNeeded: boolean;
+ /**
+ * Date request signed
+ * */
+ authoredOn: string;
+ /**
+ * Who/what is requesting service
+ * */
+ requester: Reference;
+ /**
+ * Performer role
+ * */
+ performerType: CodeableConcept;
+ /**
+ * Requested performer
+ * */
+ performer: Reference;
+ /**
+ * Requested location
+ * */
+ locationCode: CodeableConcept;
+ /**
+ * Requested location
+ * */
+ locationReference: Reference;
+ /**
+ * Explanation/Justification for procedure or service
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Explanation/Justification for service or service
+ * */
+ reasonReference: Reference;
+ /**
+ * Associated insurance coverage
+ * */
+ insurance: Reference;
+ /**
+ * Additional clinical information
+ * */
+ supportingInfo: Reference;
+ /**
+ * Procedure Samples
+ * */
+ specimen: Reference;
+ /**
+ * Location on Body
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * Comments
+ * */
+ note: Annotation;
+ /**
+ * Patient or consumer-oriented instructions
+ * */
+ patientInstruction: string;
+ /**
+ * Request provenance
+ * */
+ relevantHistory: Reference;
+};
+
+type ServiceRequest__lookups = {
+ "ServiceRequest": ServiceRequest_ServiceRequest_Props;
+};
+
+export declare function serviceRequest(type: T, props: ServiceRequest__lookups[T]);;
+
+type Slot_Slot_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Ids for this item
+ * */
+ identifier: Identifier;
+ /**
+ * A broad categorization of the service that is to be performed during this appointment
+ * */
+ serviceCategory: CodeableConcept;
+ /**
+ * 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
+ * */
+ serviceType: CodeableConcept;
+ /**
+ * The specialty of a practitioner that would be required to perform the service requested in this appointment
+ * */
+ specialty: CodeableConcept;
+ /**
+ * The style of appointment or patient that may be booked in the slot (not service type)
+ * */
+ appointmentType: CodeableConcept;
+ /**
+ * The schedule resource that this slot defines an interval of status information
+ * */
+ schedule: Reference;
+ /**
+ * busy | free | busy-unavailable | busy-tentative | entered-in-error
+ * */
+ status: string;
+ /**
+ * Date/Time that the slot is to begin
+ * */
+ start: string;
+ /**
+ * Date/Time that the slot is to conclude
+ * */
+ end: string;
+ /**
+ * This slot has already been overbooked, appointments are unlikely to be accepted for this time
+ * */
+ overbooked: boolean;
+ /**
+ * Comments on the slot to describe any extended information. Such as custom constraints on the slot
+ * */
+ comment: string;
+};
+
+type Slot__lookups = {
+ "Slot": Slot_Slot_Props;
+};
+
+export declare function slot(type: T, props: Slot__lookups[T]);;
+
+type Specimen_Specimen_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External Identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Identifier assigned by the lab
+ * */
+ accessionIdentifier: Identifier;
+ /**
+ * available | unavailable | unsatisfactory | entered-in-error
+ * */
+ status: string;
+ /**
+ * Kind of material that forms the specimen
+ * */
+ type: CodeableConcept;
+ /**
+ * Where the specimen came from. This may be from patient(s), from a location (e.g., the source of an environmental sample), or a sampling of a substance or a device
+ * */
+ subject: Reference;
+ /**
+ * The time when specimen was received for processing
+ * */
+ receivedTime: string;
+ /**
+ * Specimen from which this specimen originated
+ * */
+ parent: Reference;
+ /**
+ * Why the specimen was collected
+ * */
+ request: Reference;
+ /**
+ * Collection details
+ * */
+ collection: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Who collected the specimen
+ * */
+ collector: Reference;
+ /**
+ * Collection time
+ * */
+ collected: string;
+ /**
+ * How long it took to collect specimen
+ * */
+ duration: Duration;
+ /**
+ * The quantity of specimen collected
+ * */
+ quantity: Quantity;
+ /**
+ * Technique used to perform collection
+ * */
+ method: CodeableConcept;
+ /**
+ * Anatomical collection site
+ * */
+ bodySite: CodeableConcept;
+ /**
+ * Whether or how long patient abstained from food and/or drink
+ * */
+ fastingStatus: CodeableConcept;
+ };
+ /**
+ * Processing and processing step details
+ * */
+ processing: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Textual description of procedure
+ * */
+ description: string;
+ /**
+ * Indicates the treatment step applied to the specimen
+ * */
+ procedure: CodeableConcept;
+ /**
+ * Material used in the processing step
+ * */
+ additive: Reference;
+ /**
+ * Date and time of specimen processing
+ * */
+ time: string;
+ };
+ /**
+ * Direct container of specimen (tube/slide, etc.)
+ * */
+ container: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Id for the container
+ * */
+ identifier: Identifier;
+ /**
+ * Textual description of the container
+ * */
+ description: string;
+ /**
+ * Kind of container directly associated with specimen
+ * */
+ type: CodeableConcept;
+ /**
+ * Container volume or size
+ * */
+ capacity: Quantity;
+ /**
+ * Quantity of specimen within container
+ * */
+ specimenQuantity: Quantity;
+ /**
+ * Additive associated with container
+ * */
+ additive: CodeableConcept;
+ };
+ /**
+ * State of the specimen
+ * */
+ condition: CodeableConcept;
+ /**
+ * Comments
+ * */
+ note: Annotation;
+};
+
+type Specimen__lookups = {
+ "Specimen": Specimen_Specimen_Props;
+};
+
+export declare function specimen(type: T, props: Specimen__lookups[T]);;
+
+type SpecimenDefinition_SpecimenDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business identifier of a kind of specimen
+ * */
+ identifier: Identifier;
+ /**
+ * Kind of material to collect
+ * */
+ typeCollected: CodeableConcept;
+ /**
+ * Patient preparation for collection
+ * */
+ patientPreparation: CodeableConcept;
+ /**
+ * Time aspect for collection
+ * */
+ timeAspect: string;
+ /**
+ * Specimen collection procedure
+ * */
+ collection: CodeableConcept;
+ /**
+ * Specimen in container intended for testing by lab
+ * */
+ typeTested: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Primary or secondary specimen
+ * */
+ isDerived: boolean;
+ /**
+ * Type of intended specimen
+ * */
+ type: CodeableConcept;
+ /**
+ * preferred | alternate
+ * */
+ preference: string;
+ /**
+ * Specimen container preparation
+ * */
+ container: string;
+ /**
+ * Specimen requirements
+ * */
+ requirement: string;
+ /**
+ * Specimen retention time
+ * */
+ retentionTime: Duration;
+ /**
+ * Rejection criterion
+ * */
+ rejectionCriterion: CodeableConcept;
+ /**
+ * Preservation instruction
+ * */
+ handling: string;
+ };
+};
+
+type SpecimenDefinition__lookups = {
+ "SpecimenDefinition": SpecimenDefinition_SpecimenDefinition_Props;
+};
+
+export declare function specimenDefinition(type: T, props: SpecimenDefinition__lookups[T]);;
+
+type StructureDefinition_StructureDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this structure definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the structure definition
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the structure definition
+ * */
+ version: string;
+ /**
+ * Name for this structure definition (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this structure definition (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the structure definition
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for structure definition (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this structure definition is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * Assist with indexing and finding
+ * */
+ keyword: Coding;
+ /**
+ * FHIR Version this StructureDefinition targets
+ * */
+ fhirVersion: string;
+ /**
+ * External specification that the content is mapped to
+ * */
+ mapping: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Internal id when this mapping is used
+ * */
+ identity: string;
+ /**
+ * Identifies what this mapping refers to
+ * */
+ uri: string;
+ /**
+ * Names what this mapping refers to
+ * */
+ name: string;
+ /**
+ * Versions, Issues, Scope limitations etc.
+ * */
+ comment: string;
+ };
+ /**
+ * primitive-type | complex-type | resource | logical
+ * */
+ kind: string;
+ /**
+ * Whether the structure is abstract
+ * */
+ abstract: boolean;
+ /**
+ * If an extension, where it can be used in instances
+ * */
+ context: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * fhirpath | element | extension
+ * */
+ type: string;
+ /**
+ * Where the extension can be used in instances
+ * */
+ expression: string;
+ };
+ /**
+ * FHIRPath invariants - when the extension can be used
+ * */
+ contextInvariant: string;
+ /**
+ * Type defined or constrained by this structure
+ * */
+ type: string;
+ /**
+ * Definition that this type is constrained/specialized from
+ * */
+ baseDefinition: any;
+ /**
+ * specialization | constraint - How relates to base definition
+ * */
+ derivation: string;
+ /**
+ * Snapshot view of the structure
+ * */
+ snapshot: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Definition of elements in the resource (if no StructureDefinition)
+ * */
+ element: ElementDefinition;
+ };
+ /**
+ * Differential view of the structure
+ * */
+ differential: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Definition of elements in the resource (if no StructureDefinition)
+ * */
+ element: ElementDefinition;
+ };
+};
+
+type StructureDefinition__lookups = {
+ "StructureDefinition": StructureDefinition_StructureDefinition_Props;
+};
+
+export declare function structureDefinition(type: T, props: StructureDefinition__lookups[T]);;
+
+type StructureMap_StructureMap_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this structure map, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the structure map
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the structure map
+ * */
+ version: string;
+ /**
+ * Name for this structure map (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this structure map (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the structure map
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for structure map (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this structure map is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * Structure Definition used by this map
+ * */
+ structure: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical reference to structure definition
+ * */
+ url: any;
+ /**
+ * source | queried | target | produced
+ * */
+ mode: string;
+ /**
+ * Name for type in this map
+ * */
+ alias: string;
+ /**
+ * Documentation on use of structure
+ * */
+ documentation: string;
+ };
+ /**
+ * Other maps used by this map (canonical URLs)
+ * */
+ import: any;
+ /**
+ * Named sections for reader convenience
+ * */
+ group: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Human-readable label
+ * */
+ name: string;
+ /**
+ * Another group that this group adds rules to
+ * */
+ extends: string;
+ /**
+ * none | types | type-and-types
+ * */
+ typeMode: string;
+ /**
+ * Additional description/explanation for group
+ * */
+ documentation: string;
+ /**
+ * Documentation for this instance of data
+ * */
+ input: string;
+ /**
+ * Documentation for this instance of data
+ * */
+ rule: string;
+ };
+};
+
+type StructureMap__lookups = {
+ "StructureMap": StructureMap_StructureMap_Props;
+};
+
+export declare function structureMap(type: T, props: StructureMap__lookups[T]);;
+
+type Subscription_Subscription_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * requested | active | error | off
+ * */
+ status: string;
+ /**
+ * Contact details for source (e.g. troubleshooting)
+ * */
+ contact: ContactPoint;
+ /**
+ * When to automatically delete the subscription
+ * */
+ end: string;
+ /**
+ * Description of why this subscription was created
+ * */
+ reason: string;
+ /**
+ * Rule for server push
+ * */
+ criteria: string;
+ /**
+ * Latest error note
+ * */
+ error: string;
+ /**
+ * The channel on which to report matches to the criteria
+ * */
+ channel: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * rest-hook | websocket | email | sms | message
+ * */
+ type: string;
+ /**
+ * Where the channel points to
+ * */
+ endpoint: url;
+ /**
+ * MIME type to send, or omit for no payload
+ * */
+ payload: string;
+ /**
+ * Usage depends on the channel type
+ * */
+ header: string;
+ };
+};
+
+type Subscription__lookups = {
+ "Subscription": Subscription_Subscription_Props;
+};
+
+export declare function subscription(type: T, props: Subscription__lookups[T]);;
+
+type SubscriptionStatus_SubscriptionStatus_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * requested | active | error | off | entered-in-error
+ * */
+ status: string;
+ /**
+ * handshake | heartbeat | event-notification | query-status | query-event
+ * */
+ type: string;
+ /**
+ * Events since the Subscription was created
+ * */
+ eventsSinceSubscriptionStart: string;
+ /**
+ * Detailed information about any events relevant to this notification
+ * */
+ notificationEvent: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Event number
+ * */
+ eventNumber: string;
+ /**
+ * The instant this event occurred
+ * */
+ timestamp: string;
+ /**
+ * The focus of this event
+ * */
+ focus: Reference;
+ /**
+ * Additional context for this event
+ * */
+ additionalContext: Reference;
+ };
+ /**
+ * Reference to the Subscription responsible for this notification
+ * */
+ subscription: Reference;
+ /**
+ * Reference to the SubscriptionTopic this notification relates to
+ * */
+ topic: any;
+ /**
+ * List of errors on the subscription
+ * */
+ error: CodeableConcept;
+};
+
+type SubscriptionStatus__lookups = {
+ "SubscriptionStatus": SubscriptionStatus_SubscriptionStatus_Props;
+};
+
+export declare function subscriptionStatus(type: T, props: SubscriptionStatus__lookups[T]);;
+
+type SubscriptionTopic_SubscriptionTopic_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this subscription topic definition, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Business Identifier for this subscription topic
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the subscription topic
+ * */
+ version: string;
+ /**
+ * Name for this subscription topic (Human friendly)
+ * */
+ title: string;
+ /**
+ * Based on FHIR protocol or definition
+ * */
+ derivedFrom: any;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * If for testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date status first applied
+ * */
+ date: string;
+ /**
+ * The name of the individual or organization that published the SubscriptionTopic
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the SubscriptionTopic
+ * */
+ description: markdown;
+ /**
+ * Content intends to support these contexts
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction of the SubscriptionTopic (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this SubscriptionTopic is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * When SubscriptionTopic is/was approved by publisher
+ * */
+ approvalDate: string;
+ /**
+ * Date the Subscription Topic was last reviewed by the publisher
+ * */
+ lastReviewDate: string;
+ /**
+ * The effective date range for the SubscriptionTopic
+ * */
+ effectivePeriod: Period;
+ /**
+ * Definition of a resource-based trigger for the subscription topic
+ * */
+ resourceTrigger: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Text representation of the resource trigger
+ * */
+ description: markdown;
+ /**
+ * Data Type or Resource (reference to definition) for this trigger definition
+ * */
+ resource: string;
+ /**
+ * create | update | delete
+ * */
+ supportedInteraction: string;
+ /**
+ * Both must be true flag
+ * */
+ queryCriteria: boolean;
+ /**
+ * FHIRPath based trigger rule
+ * */
+ fhirPathCriteria: string;
+ };
+ /**
+ * Event definitions the SubscriptionTopic
+ * */
+ eventTrigger: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Text representation of the event trigger
+ * */
+ description: markdown;
+ /**
+ * Event which can trigger a notification from the SubscriptionTopic
+ * */
+ event: CodeableConcept;
+ /**
+ * Data Type or Resource (reference to definition) for this trigger definition
+ * */
+ resource: string;
+ };
+ /**
+ * Properties by which a Subscription can filter notifications from the SubscriptionTopic
+ * */
+ canFilterBy: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Description of this filter parameter
+ * */
+ description: markdown;
+ /**
+ * URL of the triggering Resource that this filter applies to
+ * */
+ resource: string;
+ /**
+ * Human-readable and computation-friendly name for a filter parameter usable by subscriptions on this topic, via Subscription.filterBy.filterParameter
+ * */
+ filterParameter: string;
+ /**
+ * Canonical URL for a filterParameter definition
+ * */
+ filterDefinition: string;
+ /**
+ * = | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type
+ * */
+ modifier: string;
+ };
+ /**
+ * Properties for describing the shape of notifications generated by this topic
+ * */
+ notificationShape: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * URL of the Resource that is the focus (main) resource in a notification shape
+ * */
+ resource: string;
+ /**
+ * Include directives, rooted in the resource for this shape
+ * */
+ include: string;
+ /**
+ * Reverse include directives, rooted in the resource for this shape
+ * */
+ revInclude: string;
+ };
+};
+
+type SubscriptionTopic__lookups = {
+ "SubscriptionTopic": SubscriptionTopic_SubscriptionTopic_Props;
+};
+
+export declare function subscriptionTopic(type: T, props: SubscriptionTopic__lookups[T]);;
+
+type Substance_Substance_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Unique identifier
+ * */
+ identifier: Identifier;
+ /**
+ * active | inactive | entered-in-error
+ * */
+ status: string;
+ /**
+ * What class/type of substance this is
+ * */
+ category: CodeableConcept;
+ /**
+ * What substance this is
+ * */
+ code: CodeableConcept;
+ /**
+ * Textual description of the substance, comments
+ * */
+ description: string;
+ /**
+ * If this describes a specific package/container of the substance
+ * */
+ instance: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifier of the package/container
+ * */
+ identifier: Identifier;
+ /**
+ * When no longer valid to use
+ * */
+ expiry: string;
+ /**
+ * Amount of substance in the package
+ * */
+ quantity: Quantity;
+ };
+ /**
+ * Composition information about the substance
+ * */
+ ingredient: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Optional amount (concentration)
+ * */
+ quantity: Ratio;
+ /**
+ * A component of the substance
+ * */
+ substance: CodeableConcept;
+ };
+};
+
+type Substance__lookups = {
+ "Substance": Substance_Substance_Props;
+};
+
+export declare function substance(type: T, props: Substance__lookups[T]);;
+
+type SubstanceDefinition_SubstanceDefinition_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifier by which this substance is known
+ * */
+ identifier: Identifier;
+ /**
+ * A business level version identifier of the substance
+ * */
+ version: string;
+ /**
+ * Status of substance within the catalogue e.g. active, retired
+ * */
+ status: CodeableConcept;
+ /**
+ * A categorization, high level e.g. polymer or nucleic acid, or food, chemical, biological, or lower e.g. polymer linear or branch chain, or type of impurity
+ * */
+ classification: CodeableConcept;
+ /**
+ * If the substance applies to human or veterinary use
+ * */
+ domain: CodeableConcept;
+ /**
+ * The quality standard, established benchmark, to which substance complies (e.g. USP/NF, BP)
+ * */
+ grade: CodeableConcept;
+ /**
+ * Textual description of the substance
+ * */
+ description: markdown;
+ /**
+ * Supporting literature
+ * */
+ informationSource: Reference;
+ /**
+ * Textual comment about the substance's catalogue or registry record
+ * */
+ note: Annotation;
+ /**
+ * The entity that creates, makes, produces or fabricates the substance
+ * */
+ manufacturer: Reference;
+ /**
+ * An entity that is the source for the substance. It may be different from the manufacturer
+ * */
+ supplier: Reference;
+ /**
+ * Moiety, for structural modifications
+ * */
+ moiety: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Role that the moiety is playing
+ * */
+ role: CodeableConcept;
+ /**
+ * Identifier by which this moiety substance is known
+ * */
+ identifier: Identifier;
+ /**
+ * Textual name for this moiety substance
+ * */
+ name: string;
+ /**
+ * Stereochemistry type
+ * */
+ stereochemistry: CodeableConcept;
+ /**
+ * Optical activity type
+ * */
+ opticalActivity: CodeableConcept;
+ /**
+ * Molecular formula for this moiety (e.g. with the Hill system)
+ * */
+ molecularFormula: string;
+ /**
+ * Quantitative value for this moiety
+ * */
+ amount: Quantity;
+ /**
+ * The measurement type of the quantitative value
+ * */
+ measurementType: CodeableConcept;
+ };
+ /**
+ * General specifications for this substance
+ * */
+ property: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A code expressing the type of property
+ * */
+ type: CodeableConcept;
+ /**
+ * A value for the property
+ * */
+ value: CodeableConcept;
+ };
+ /**
+ * The molecular weight or weight range
+ * */
+ molecularWeight: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The method by which the weight was determined
+ * */
+ method: CodeableConcept;
+ /**
+ * Type of molecular weight e.g. exact, average, weight average
+ * */
+ type: CodeableConcept;
+ /**
+ * Used to capture quantitative values for a variety of elements
+ * */
+ amount: Quantity;
+ };
+ /**
+ * Structural information
+ * */
+ structure: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Stereochemistry type
+ * */
+ stereochemistry: CodeableConcept;
+ /**
+ * Optical activity type
+ * */
+ opticalActivity: CodeableConcept;
+ /**
+ * Molecular formula (e.g. using the Hill system)
+ * */
+ molecularFormula: string;
+ /**
+ * Specified per moiety according to the Hill system
+ * */
+ molecularFormulaByMoiety: string;
+ /**
+ * The method used to find the structure e.g. X-ray, NMR
+ * */
+ technique: CodeableConcept;
+ /**
+ * Source of information for the structure
+ * */
+ sourceDocument: Reference;
+ /**
+ * An attachment with the structural representation e.g. a structure graphic or AnIML file
+ * */
+ representation: Reference;
+ };
+ /**
+ * Codes associated with the substance
+ * */
+ code: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The specific code
+ * */
+ code: CodeableConcept;
+ /**
+ * Status of the code assignment, for example 'provisional', 'approved'
+ * */
+ status: CodeableConcept;
+ /**
+ * The date at which the code status was changed
+ * */
+ statusDate: string;
+ /**
+ * Any comment can be provided in this field
+ * */
+ note: Annotation;
+ /**
+ * Supporting literature
+ * */
+ source: Reference;
+ };
+ /**
+ * Names applicable to this substance
+ * */
+ name: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The actual name
+ * */
+ name: string;
+ /**
+ * Name type e.g. 'systematic', 'scientific, 'brand'
+ * */
+ type: CodeableConcept;
+ /**
+ * The status of the name e.g. 'current', 'proposed'
+ * */
+ status: CodeableConcept;
+ /**
+ * If this is the preferred name for this substance
+ * */
+ preferred: boolean;
+ /**
+ * Human language that the name is written in
+ * */
+ language: CodeableConcept;
+ /**
+ * The use context of this name e.g. as an active ingredient or as a food colour additive
+ * */
+ domain: CodeableConcept;
+ /**
+ * The jurisdiction where this name applies
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Date of official name change
+ * */
+ official: string;
+ /**
+ * Supporting literature
+ * */
+ source: Reference;
+ };
+ /**
+ * A link between this substance and another
+ * */
+ relationship: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A pointer to another substance, as a resource or a representational code
+ * */
+ substanceDefinition: Reference;
+ /**
+ * For example "salt to parent", "active moiety"
+ * */
+ type: CodeableConcept;
+ /**
+ * For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible relationships
+ * */
+ isDefining: boolean;
+ /**
+ * A numeric factor for the relationship, e.g. that a substance salt has some percentage of active substance in relation to some other
+ * */
+ amount: Quantity;
+ /**
+ * For use when the numeric has an uncertain range
+ * */
+ ratioHighLimitAmount: Ratio;
+ /**
+ * An operator for the amount, for example "average", "approximately", "less than"
+ * */
+ comparator: CodeableConcept;
+ /**
+ * Supporting literature
+ * */
+ source: Reference;
+ };
+ /**
+ * Material or taxonomic/anatomical source
+ * */
+ sourceMaterial: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Classification of the origin of the raw material. e.g. cat hair is an Animal source type
+ * */
+ type: CodeableConcept;
+ /**
+ * The genus of an organism e.g. the Latin epithet of the plant/animal scientific name
+ * */
+ genus: CodeableConcept;
+ /**
+ * The species of an organism e.g. the Latin epithet of the species of the plant/animal
+ * */
+ species: CodeableConcept;
+ /**
+ * An anatomical origin of the source material within an organism
+ * */
+ part: CodeableConcept;
+ /**
+ * The country or countries where the material is harvested
+ * */
+ countryOfOrigin: CodeableConcept;
+ };
+};
+
+type SubstanceDefinition__lookups = {
+ "SubstanceDefinition": SubstanceDefinition_SubstanceDefinition_Props;
+};
+
+export declare function substanceDefinition(type: T, props: SubstanceDefinition__lookups[T]);;
+
+type SupplyDelivery_SupplyDelivery_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Fulfills plan, proposal or order
+ * */
+ basedOn: Reference;
+ /**
+ * Part of referenced event
+ * */
+ partOf: Reference;
+ /**
+ * in-progress | completed | abandoned | entered-in-error
+ * */
+ status: string;
+ /**
+ * Patient for whom the item is supplied
+ * */
+ patient: Reference;
+ /**
+ * Category of dispense event
+ * */
+ type: CodeableConcept;
+ /**
+ * The item that is delivered or supplied
+ * */
+ suppliedItem: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Amount dispensed
+ * */
+ quantity: Quantity;
+ /**
+ * Medication, Substance, or Device supplied
+ * */
+ item: CodeableConcept;
+ };
+ /**
+ * When event occurred
+ * */
+ occurrence: string;
+ /**
+ * Dispenser
+ * */
+ supplier: Reference;
+ /**
+ * Where the Supply was sent
+ * */
+ destination: Reference;
+ /**
+ * Who collected the Supply
+ * */
+ receiver: Reference;
+};
+
+type SupplyDelivery__lookups = {
+ "SupplyDelivery": SupplyDelivery_SupplyDelivery_Props;
+};
+
+export declare function supplyDelivery(type: T, props: SupplyDelivery__lookups[T]);;
+
+type SupplyRequest_SupplyRequest_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for SupplyRequest
+ * */
+ identifier: Identifier;
+ /**
+ * draft | active | suspended +
+ * */
+ status: string;
+ /**
+ * The kind of supply (central, non-stock, etc.)
+ * */
+ category: CodeableConcept;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * Medication, Substance, or Device requested to be supplied
+ * */
+ item: CodeableConcept;
+ /**
+ * The requested amount of the item indicated
+ * */
+ quantity: Quantity;
+ /**
+ * Ordered item details
+ * */
+ parameter: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Item detail
+ * */
+ code: CodeableConcept;
+ /**
+ * Value of detail
+ * */
+ value: CodeableConcept;
+ };
+ /**
+ * When the request should be fulfilled
+ * */
+ occurrence: string;
+ /**
+ * When the request was made
+ * */
+ authoredOn: string;
+ /**
+ * Individual making the request
+ * */
+ requester: Reference;
+ /**
+ * Who is intended to fulfill the request
+ * */
+ supplier: Reference;
+ /**
+ * The reason why the supply item was requested
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * The reason why the supply item was requested
+ * */
+ reasonReference: Reference;
+ /**
+ * The origin of the supply
+ * */
+ deliverFrom: Reference;
+ /**
+ * The destination of the supply
+ * */
+ deliverTo: Reference;
+};
+
+type SupplyRequest__lookups = {
+ "SupplyRequest": SupplyRequest_SupplyRequest_Props;
+};
+
+export declare function supplyRequest(type: T, props: SupplyRequest__lookups[T]);;
+
+type Task_Task_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Task Instance Identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Formal definition of task
+ * */
+ instantiatesCanonical: any;
+ /**
+ * Formal definition of task
+ * */
+ instantiatesUri: string;
+ /**
+ * Request fulfilled by this task
+ * */
+ basedOn: Reference;
+ /**
+ * Requisition or grouper id
+ * */
+ groupIdentifier: Identifier;
+ /**
+ * Composite task
+ * */
+ partOf: Reference;
+ /**
+ * draft | requested | received | accepted | +
+ * */
+ status: string;
+ /**
+ * Reason for current status
+ * */
+ statusReason: CodeableConcept;
+ /**
+ * E.g. "Specimen collected", "IV prepped"
+ * */
+ businessStatus: CodeableConcept;
+ /**
+ * unknown | proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option
+ * */
+ intent: string;
+ /**
+ * routine | urgent | asap | stat
+ * */
+ priority: string;
+ /**
+ * Task Type
+ * */
+ code: CodeableConcept;
+ /**
+ * Human-readable explanation of task
+ * */
+ description: string;
+ /**
+ * What task is acting on
+ * */
+ focus: Reference;
+ /**
+ * Beneficiary of the Task
+ * */
+ for: Reference;
+ /**
+ * Healthcare event during which this task originated
+ * */
+ encounter: Reference;
+ /**
+ * Start and end time of execution
+ * */
+ executionPeriod: Period;
+ /**
+ * Task Creation Date
+ * */
+ authoredOn: string;
+ /**
+ * Task Last Modified Date
+ * */
+ lastModified: string;
+ /**
+ * Who is asking for task to be done
+ * */
+ requester: Reference;
+ /**
+ * Requested performer
+ * */
+ performerType: CodeableConcept;
+ /**
+ * Responsible individual
+ * */
+ owner: Reference;
+ /**
+ * Where task occurs
+ * */
+ location: Reference;
+ /**
+ * Why task is needed
+ * */
+ reasonCode: CodeableConcept;
+ /**
+ * Why task is needed
+ * */
+ reasonReference: Reference;
+ /**
+ * Associated insurance coverage
+ * */
+ insurance: Reference;
+ /**
+ * Comments made about the task
+ * */
+ note: Annotation;
+ /**
+ * Key events in history of the Task
+ * */
+ relevantHistory: Reference;
+ /**
+ * Constraints on fulfillment tasks
+ * */
+ restriction: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * How many times to repeat
+ * */
+ repetitions: number;
+ /**
+ * When fulfillment sought
+ * */
+ period: Period;
+ /**
+ * For whom is fulfillment sought?
+ * */
+ recipient: Reference;
+ };
+ /**
+ * Information used to perform task
+ * */
+ input: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Label for the input
+ * */
+ type: CodeableConcept;
+ /**
+ * Content to use in performing the task
+ * */
+ value: base64Binary;
+ };
+ /**
+ * Information produced as part of task
+ * */
+ output: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Label for output
+ * */
+ type: CodeableConcept;
+ /**
+ * Result of output
+ * */
+ value: base64Binary;
+ };
+};
+
+type Task__lookups = {
+ "Task": Task_Task_Props;
+};
+
+export declare function task(type: T, props: Task__lookups[T]);;
+
+type TerminologyCapabilities_TerminologyCapabilities_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this terminology capabilities, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Business version of the terminology capabilities
+ * */
+ version: string;
+ /**
+ * Name for this terminology capabilities (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this terminology capabilities (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the terminology capabilities
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for terminology capabilities (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this terminology capabilities is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * instance | capability | requirements
+ * */
+ kind: string;
+ /**
+ * Software that is covered by this terminology capability statement
+ * */
+ software: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A name the software is known by
+ * */
+ name: string;
+ /**
+ * Version covered by this statement
+ * */
+ version: string;
+ };
+ /**
+ * If this describes a specific instance
+ * */
+ implementation: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Describes this specific instance
+ * */
+ description: string;
+ /**
+ * Base URL for the implementation
+ * */
+ url: url;
+ };
+ /**
+ * Whether lockedDate is supported
+ * */
+ lockedDate: boolean;
+ /**
+ * A code system supported by the server
+ * */
+ codeSystem: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * URI for the Code System
+ * */
+ uri: any;
+ /**
+ * Properties supported for $lookup
+ * */
+ version: string;
+ /**
+ * Whether subsumption is supported
+ * */
+ subsumption: boolean;
+ };
+ /**
+ * Information about the [ValueSet/$expand](valueset-operation-expand.html) operation
+ * */
+ expansion: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Whether the server can return nested value sets
+ * */
+ hierarchical: boolean;
+ /**
+ * Whether the server supports paging on expansion
+ * */
+ paging: boolean;
+ /**
+ * Allow request for incomplete expansions?
+ * */
+ incomplete: boolean;
+ /**
+ * Description of support for parameter
+ * */
+ parameter: string;
+ /**
+ * Documentation about text searching works
+ * */
+ textFilter: markdown;
+ };
+ /**
+ * explicit | all
+ * */
+ codeSearch: string;
+ /**
+ * Information about the [ValueSet/$validate-code](valueset-operation-validate-code.html) operation
+ * */
+ validateCode: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Whether translations are validated
+ * */
+ translations: boolean;
+ };
+ /**
+ * Information about the [ConceptMap/$translate](conceptmap-operation-translate.html) operation
+ * */
+ translation: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Whether the client must identify the map
+ * */
+ needsMap: boolean;
+ };
+ /**
+ * Information about the [ConceptMap/$closure](conceptmap-operation-closure.html) operation
+ * */
+ closure: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * If cross-system closure is supported
+ * */
+ translation: boolean;
+ };
+};
+
+type TerminologyCapabilities__lookups = {
+ "TerminologyCapabilities": TerminologyCapabilities_TerminologyCapabilities_Props;
+};
+
+export declare function terminologyCapabilities(type: T, props: TerminologyCapabilities__lookups[T]);;
+
+type TestReport_TestReport_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * External identifier
+ * */
+ identifier: Identifier;
+ /**
+ * Informal name of the executed TestScript
+ * */
+ name: string;
+ /**
+ * completed | in-progress | waiting | stopped | entered-in-error
+ * */
+ status: string;
+ /**
+ * Reference to the version-specific TestScript that was executed to produce this TestReport
+ * */
+ testScript: Reference;
+ /**
+ * pass | fail | pending
+ * */
+ result: string;
+ /**
+ * The final score (percentage of tests passed) resulting from the execution of the TestScript
+ * */
+ score: number;
+ /**
+ * Name of the tester producing this report (Organization or individual)
+ * */
+ tester: string;
+ /**
+ * When the TestScript was executed and this TestReport was generated
+ * */
+ issued: string;
+ /**
+ * A participant in the test execution, either the execution engine, a client, or a server
+ * */
+ participant: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * test-engine | client | server
+ * */
+ type: string;
+ /**
+ * The uri of the participant. An absolute URL is preferred
+ * */
+ uri: string;
+ /**
+ * The display name of the participant
+ * */
+ display: string;
+ };
+ /**
+ * The results of the series of required setup operations before the tests were executed
+ * */
+ setup: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * A link to further details on the result
+ * */
+ action: string;
+ };
+ /**
+ * A test executed from the test script
+ * */
+ test: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Tracking/logging name of this test
+ * */
+ name: string;
+ /**
+ * Tracking/reporting short description of the test
+ * */
+ description: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ action: Extension;
+ };
+ /**
+ * The results of running the series of required clean up steps
+ * */
+ teardown: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ action: Extension;
+ };
+};
+
+type TestReport__lookups = {
+ "TestReport": TestReport_TestReport_Props;
+};
+
+export declare function testReport(type: T, props: TestReport__lookups[T]);;
+
+type TestScript_TestScript_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this test script, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the test script
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the test script
+ * */
+ version: string;
+ /**
+ * Name for this test script (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this test script (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the test script
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for test script (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Why this test script is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * An abstract server representing a client or sender in a message exchange
+ * */
+ origin: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The index of the abstract origin server starting at 1
+ * */
+ index: number;
+ /**
+ * FHIR-Client | FHIR-SDC-FormFiller
+ * */
+ profile: Coding;
+ };
+ /**
+ * An abstract server representing a destination or receiver in a message exchange
+ * */
+ destination: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The index of the abstract destination server starting at 1
+ * */
+ index: number;
+ /**
+ * FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor
+ * */
+ profile: Coding;
+ };
+ /**
+ * Required capability that is assumed to function correctly on the FHIR server being tested
+ * */
+ metadata: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Short description
+ * */
+ link: string;
+ /**
+ * Required Capability Statement
+ * */
+ capability: any;
+ };
+ /**
+ * Fixture in the test script - by reference (uri)
+ * */
+ fixture: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Whether or not to implicitly create the fixture during setup
+ * */
+ autocreate: boolean;
+ /**
+ * Whether or not to implicitly delete the fixture during teardown
+ * */
+ autodelete: boolean;
+ /**
+ * Reference of the resource
+ * */
+ resource: Reference;
+ };
+ /**
+ * Reference of the validation profile
+ * */
+ profile: Reference;
+ /**
+ * Placeholder for evaluated elements
+ * */
+ variable: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Descriptive name for this variable
+ * */
+ name: string;
+ /**
+ * Default, hard-coded, or user-defined value for this variable
+ * */
+ defaultValue: string;
+ /**
+ * Natural language description of the variable
+ * */
+ description: string;
+ /**
+ * The FHIRPath expression against the fixture body
+ * */
+ expression: string;
+ /**
+ * HTTP header field name for source
+ * */
+ headerField: string;
+ /**
+ * Hint help text for default value to enter
+ * */
+ hint: string;
+ /**
+ * XPath or JSONPath against the fixture body
+ * */
+ path: string;
+ /**
+ * Fixture Id of source expression or headerField within this variable
+ * */
+ sourceId: string;
+ };
+ /**
+ * A series of required setup operations before tests are executed
+ * */
+ setup: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Will this assert produce a warning only on error?
+ * */
+ action: boolean;
+ };
+ /**
+ * A test in this script
+ * */
+ test: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Tracking/logging name of this test
+ * */
+ name: string;
+ /**
+ * Tracking/reporting short description of the test
+ * */
+ description: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ action: Extension;
+ };
+ /**
+ * A series of required clean up steps
+ * */
+ teardown: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ action: Extension;
+ };
+};
+
+type TestScript__lookups = {
+ "TestScript": TestScript_TestScript_Props;
+};
+
+export declare function testScript(type: T, props: TestScript__lookups[T]);;
+
+type ValueSet_ValueSet_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Canonical identifier for this value set, represented as a URI (globally unique)
+ * */
+ url: string;
+ /**
+ * Additional identifier for the value set (business identifier)
+ * */
+ identifier: Identifier;
+ /**
+ * Business version of the value set
+ * */
+ version: string;
+ /**
+ * Name for this value set (computer friendly)
+ * */
+ name: string;
+ /**
+ * Name for this value set (human friendly)
+ * */
+ title: string;
+ /**
+ * draft | active | retired | unknown
+ * */
+ status: string;
+ /**
+ * For testing purposes, not real usage
+ * */
+ experimental: boolean;
+ /**
+ * Date last changed
+ * */
+ date: string;
+ /**
+ * Name of the publisher (organization or individual)
+ * */
+ publisher: string;
+ /**
+ * Contact details for the publisher
+ * */
+ contact: ContactDetail;
+ /**
+ * Natural language description of the value set
+ * */
+ description: markdown;
+ /**
+ * The context that the content is intended to support
+ * */
+ useContext: UsageContext;
+ /**
+ * Intended jurisdiction for value set (if applicable)
+ * */
+ jurisdiction: CodeableConcept;
+ /**
+ * Indicates whether or not any change to the content logical definition may occur
+ * */
+ immutable: boolean;
+ /**
+ * Why this value set is defined
+ * */
+ purpose: markdown;
+ /**
+ * Use and/or publishing restrictions
+ * */
+ copyright: markdown;
+ /**
+ * Content logical definition of the value set (CLD)
+ * */
+ compose: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Fixed date for references with no specified version (transitive)
+ * */
+ lockedDate: string;
+ /**
+ * Whether inactive codes are in the value set
+ * */
+ inactive: boolean;
+ /**
+ * Select the contents included in this value set
+ * */
+ include: any;
+ };
+ /**
+ * Used when the value set is "expanded"
+ * */
+ expansion: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Identifies the value set expansion (business identifier)
+ * */
+ identifier: string;
+ /**
+ * Time ValueSet expansion happened
+ * */
+ timestamp: string;
+ /**
+ * Total number of codes in the expansion
+ * */
+ total: number;
+ /**
+ * Offset at which this resource starts
+ * */
+ offset: number;
+ /**
+ * Value of the named parameter
+ * */
+ parameter: string;
+ /**
+ * User display for the concept
+ * */
+ contains: string;
+ };
+};
+
+type ValueSet__lookups = {
+ "ValueSet": ValueSet_ValueSet_Props;
+};
+
+export declare function valueSet(type: T, props: ValueSet__lookups[T]);;
+
+type VerificationResult_VerificationResult_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * A resource that was validated
+ * */
+ target: Reference;
+ /**
+ * The fhirpath location(s) within the resource that was validated
+ * */
+ targetLocation: string;
+ /**
+ * none | initial | periodic
+ * */
+ need: CodeableConcept;
+ /**
+ * attested | validated | in-process | req-revalid | val-fail | reval-fail
+ * */
+ status: string;
+ /**
+ * When the validation status was updated
+ * */
+ statusDate: string;
+ /**
+ * nothing | primary | multiple
+ * */
+ validationType: CodeableConcept;
+ /**
+ * The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context)
+ * */
+ validationProcess: CodeableConcept;
+ /**
+ * Frequency of revalidation
+ * */
+ frequency: Timing;
+ /**
+ * The date/time validation was last completed (including failed validations)
+ * */
+ lastPerformed: string;
+ /**
+ * The date when target is next validated, if appropriate
+ * */
+ nextScheduled: string;
+ /**
+ * fatal | warn | rec-only | none
+ * */
+ failureAction: CodeableConcept;
+ /**
+ * Information about the primary source(s) involved in validation
+ * */
+ primarySource: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Reference to the primary source
+ * */
+ who: Reference;
+ /**
+ * Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source)
+ * */
+ type: CodeableConcept;
+ /**
+ * Method for exchanging information with the primary source
+ * */
+ communicationMethod: CodeableConcept;
+ /**
+ * successful | failed | unknown
+ * */
+ validationStatus: CodeableConcept;
+ /**
+ * When the target was validated against the primary source
+ * */
+ validationDate: string;
+ /**
+ * yes | no | undetermined
+ * */
+ canPushUpdates: CodeableConcept;
+ /**
+ * specific | any | source
+ * */
+ pushTypeAvailable: CodeableConcept;
+ };
+ /**
+ * Information about the entity attesting to information
+ * */
+ attestation: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * The individual or organization attesting to information
+ * */
+ who: Reference;
+ /**
+ * When the who is asserting on behalf of another (organization or individual)
+ * */
+ onBehalfOf: Reference;
+ /**
+ * The method by which attested information was submitted/retrieved
+ * */
+ communicationMethod: CodeableConcept;
+ /**
+ * The date the information was attested to
+ * */
+ date: string;
+ /**
+ * A digital identity certificate associated with the attestation source
+ * */
+ sourceIdentityCertificate: string;
+ /**
+ * A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source
+ * */
+ proxyIdentityCertificate: string;
+ /**
+ * Proxy signature
+ * */
+ proxySignature: Signature;
+ /**
+ * Attester signature
+ * */
+ sourceSignature: Signature;
+ };
+ /**
+ * Information about the entity validating information
+ * */
+ validator: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Reference to the organization validating information
+ * */
+ organization: Reference;
+ /**
+ * A digital identity certificate associated with the validator
+ * */
+ identityCertificate: string;
+ /**
+ * Validator signature
+ * */
+ attestationSignature: Signature;
+ };
+};
+
+type VerificationResult__lookups = {
+ "VerificationResult": VerificationResult_VerificationResult_Props;
+};
+
+export declare function verificationResult(type: T, props: VerificationResult__lookups[T]);;
+
+type VisionPrescription_VisionPrescription_Props = {
+ /**
+ * Logical id of this artifact
+ * */
+ id: string;
+ /**
+ * Metadata about the resource
+ * */
+ meta: Meta;
+ /**
+ * A set of rules under which this content was created
+ * */
+ implicitRules: string;
+ /**
+ * Language of the resource content
+ * */
+ language: string;
+ /**
+ * Text summary of the resource, for human interpretation
+ * */
+ text: Narrative;
+ /**
+ * Contained, inline Resources
+ * */
+ contained: Resource;
+ /**
+ * Additional content defined by implementations
+ * */
+ extension: Extension;
+ /**
+ * Extensions that cannot be ignored
+ * */
+ modifierExtension: Extension;
+ /**
+ * Business Identifier for vision prescription
+ * */
+ identifier: Identifier;
+ /**
+ * active | cancelled | draft | entered-in-error
+ * */
+ status: string;
+ /**
+ * Response creation date
+ * */
+ created: string;
+ /**
+ * Who prescription is for
+ * */
+ patient: Reference;
+ /**
+ * Created during encounter / admission / stay
+ * */
+ encounter: Reference;
+ /**
+ * When prescription was authorized
+ * */
+ dateWritten: string;
+ /**
+ * Who authorized the vision prescription
+ * */
+ prescriber: Reference;
+ /**
+ * Vision lens authorization
+ * */
+ lensSpecification: {
+ /**
+ * Unique id for inter-element referencing
+ * */
+ id: string;
+ /**
+ * Extensions that cannot be ignored even if unrecognized
+ * */
+ modifierExtension: Extension;
+ /**
+ * Product to be supplied
+ * */
+ product: CodeableConcept;
+ /**
+ * right | left
+ * */
+ eye: string;
+ /**
+ * Power of the lens
+ * */
+ sphere: number;
+ /**
+ * Lens power for astigmatism
+ * */
+ cylinder: number;
+ /**
+ * Lens meridian which contain no power for astigmatism
+ * */
+ axis: number;
+ /**
+ * up | down | in | out
+ * */
+ prism: string;
+ /**
+ * Added power for multifocal levels
+ * */
+ add: number;
+ /**
+ * Contact lens power
+ * */
+ power: number;
+ /**
+ * Contact lens back curvature
+ * */
+ backCurve: number;
+ /**
+ * Contact lens diameter
+ * */
+ diameter: number;
+ /**
+ * Lens wear duration
+ * */
+ duration: Quantity;
+ /**
+ * Color required
+ * */
+ color: string;
+ /**
+ * Brand required
+ * */
+ brand: string;
+ /**
+ * Notes for coatings
+ * */
+ note: Annotation;
+ };
+};
+
+type VisionPrescription__lookups = {
+ "VisionPrescription": VisionPrescription_VisionPrescription_Props;
+};
+
+export declare function visionPrescription(type: T, props: VisionPrescription__lookups[T]);;
diff --git a/packages/fhir-4/types/globals.d.ts b/packages/fhir-4/types/globals.d.ts
new file mode 100644
index 000000000..205fef5b7
--- /dev/null
+++ b/packages/fhir-4/types/globals.d.ts
@@ -0,0 +1,77 @@
+// TODO this shold be imported from the base adaptor
+
+// import { HumanName } from 'fhir/r5';
+
+// Global fhir types
+// maybe we should use types/fhir for this
+// But that has its own problems and I think this is fairly simple
+
+type Identifier = {
+ system: string;
+ value: string;
+};
+
+// TODO this probably isn't complete
+type Meta = {
+ profile: string[];
+};
+
+type Coding = {
+ system: string;
+ code: string;
+};
+
+type CodeableConcept = {
+ coding: Coding[];
+ text?: string;
+ extension?: Extension[];
+};
+
+type Narrative = {
+ status: string;
+ div: string;
+};
+
+type BackboneElement = {
+ extension?: Extension[];
+ id?: string;
+ modifierExtension?: Extension[];
+};
+
+type Extension = {
+ // TODO this supports lods of value types...
+ url: string;
+ valueCodeableConcept: CodeableConcept;
+};
+
+type Reference = {
+ display?: string;
+ identifier?: Identifier;
+ reference?: string;
+ type?: string;
+};
+
+type Period = {
+ start: 'string';
+ end: 'string';
+};
+
+type Resource = {
+ resourceType: string;
+ id?: string;
+ implicitRules?: string;
+ language?: string;
+ meta?: Meta;
+};
+
+// TODO humanname is a bit more complex.. maybe I should be exporting from fhir after all
+// interface HumanName extends HN {}
+// type HumanName = HN;
+
+// these are stubbed exports
+type Duration = {};
+type HumanName = {};
+type ContactPoint = {};
+type Address = {};
+type Annotation = {};
+type Attachment = {};